Re: Custom NSFormatter classes

2010-01-04 Thread Henri Häkkinen
setup in IB, passing it a property of Foo. All the best, Patrick On Jan 3, 2010, at 1:47 , Henri Häkkinen wrote: Hello. I have an array of custom Foo objects which I would need to display in an NSTableView object. I implement the data source delegate like this: - (NSInteger

Re: Custom NSFormatter classes

2010-01-04 Thread Henri Häkkinen
Thanks for your answer again, Patrick. By the way, what is the general opinion about the Cocoa Bindings technology among Mac developers? I have been looking into it lately and while it looks very neat I have found it troublesome to actually put it into practical use. I am contemplating whether

Re: Custom NSFormatter classes

2010-01-03 Thread Henri Häkkinen
Hello Patric. I was able to get the NSFormatter subclass to work properly by ignoring all non-Foo objects sent to it. The Cocoa docs are indeed lacking in this respect as there is no mentioning that the cell's title will first be sent. To me this feels a bit odd anyway since I can think of no

Custom NSFormatter classes

2010-01-02 Thread Henri Häkkinen
Hello. I have an array of custom Foo objects which I would need to display in an NSTableView object. I implement the data source delegate like this: - (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView { return [arrayOfFoos count]; } - (id)tableView:(NSTableView *)tableView

Simple question on Menus and Document-based apps

2009-12-21 Thread Henri Häkkinen
Hello. This is probably a basic question but I haven't been able to find an answer from the ADC guides so far. So I have a simple document-based application which has MyDocument with some other classes. The application has the default MainMenu.xib and MyDocument.xib interface files. I would

Re: odd problems with NSData / OpenGL

2009-12-08 Thread Henri Häkkinen
); } // Release the OpenCTM context. ctmFreeContext(context); } return self; } -- David Duncan Apple DTS Animation and Printing Regards, Henri Häkkinen ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: odd problems with NSData / OpenGL

2009-12-08 Thread Henri Häkkinen
better read the Memory Management and Garbage Collection guides again. Do you use the 'bytes' method? Are you aware of the issues with it under GC? Yes, I do use their bytes method when accessing their contents in drawRect: method. What are the issues? Regards, Henri Häkkinen

resize handle and custom view classes

2009-12-08 Thread Henri Häkkinen
? For example, put a NSOpenGLView to a window and make it as large as the window's content area, and draw the OpenGL view with black. The resize handle gets overdrawn. To make it visible, is there any other way than to draw the handle manually with OpenGL? Regards, Henri Häkkinen

odd problems with NSData / OpenGL

2009-12-07 Thread Henri Häkkinen
Hello. I have odd problems with using NSData, maybe someone could point me what's going wrong here. I have a simple Cocoa document-based application, which uses a custom NSOpenGLView derived class. This view object has a reference to the document object (this binding is set in the nib file),

Some questions/problems regarding CALayers

2009-11-30 Thread Henri Häkkinen
Hello. I'm trying to implement my custom NSView derived class to draw a chessboard with chess pieces on it. I'm using Core Animation's CALayer classes since I want to use animation with other effects later on. Currently I have have Board and Piece classes, which both derive from CALayer.

Problems understanding CALayer geometry

2009-11-21 Thread Henri Häkkinen
understand this, I think it should just draw a 100x100 rectangle at the position (100, 100). What am I missing? Regards, Henri Häkkinen ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

Keeping NSView square

2009-11-18 Thread Henri Häkkinen
the window to get bigger, the custom view does not get bigger properly. I have enabled Autoresizing in the Interface Builder for the custom view. What would be the proper way of handling this? How do I make the custom view to stay square? Thanks. Regards, Henri Häkkinen

Vector images on Cocoa

2009-11-17 Thread Henri Häkkinen
that implementing my own SVG parser would be of too much work. What would you recommend? EPS? Thank you. Regards, Henri Häkkinen ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list