Vector images on Cocoa

2009-11-17 Thread Henri Häkkinen
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

Keeping NSView square

2009-11-18 Thread Henri Häkkinen
but when I resize 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. Regar

Problems understanding CALayer geometry

2009-11-21 Thread Henri Häkkinen
ll). How I 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 c

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. Board

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), a

Re: odd problems with NSData / OpenGL

2009-12-08 Thread Henri Häkkinen
X(sqrt(x*x + y*y + z*z), _radius); } // Release the OpenCTM context. ctmFreeContext(context); } return self; } > -- > David Duncan > Apple DTS Animation and Printing > Regards, Henri Häkkinen ___ Cocoa-dev mailing

Re: odd problems with NSData / OpenGL

2009-12-08 Thread Henri Häkkinen
agement issue. I 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 issu

resize handle and custom view classes

2009-12-08 Thread Henri Häkkinen
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äk

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 li

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 ob

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 r

Re: Custom NSFormatter classes

2010-01-04 Thread Henri Häkkinen
e > convenient to write > your own NSCell subclass, because you can control editing and formatting much > easier. > You can even use an attached formatter that you setup in IB, passing it a > property of Foo. > > All the best, > Patrick > > > On Jan 3, 2010

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