Hi, I'm new to Cocoa and I'm trying to make some kind of canvas control that can contain and display sub-controls in various locations (think of dashboard with buttons instead of widgets to get a picture). Compared to other toolkits have experienced, this seems kind of hard to do with Cocoa. I've got some issues that cocoa programmers should be to able clarify.
1) In various toolkits, controls can contain other controls and you have a whole hierarchy of embedding. It seems that in Cocoa it is not the case, the hierarchy has only two levels: controls and cells. Is there a way that a cell can contain a control? The place where I wanted such a thing was for editing a stringValue displayed in some way by a custom cell. Fortunately there's a fieldEditor control which is associated to the window just for this purpose. But imagine I'd like to display some other control or view, like a color selector, the only solution I have is to make an external window. Is this really the case or am I missing something? 2) Is there some kind of protocol that a container control, i.e. a control with multiple cells, should implement? I had an hard time making a valid mouseDown method allowing to be able to edit NSTextFieldCell but also to just "click" NSButtonCell. Worst I don't know if my method will be able to work with any cells. 3) Can I apply an affine transform to a cell. For example, can I display a NSButtonCell rotated by an angle of say 33 degrees? I see a way of doing so, but it's not pretty: draw the cell on a pdf, display the pdf with an affine-transform in the control, modify the mouse event to be in the local coordinate system... Thanks, and sorry if my questions are a bit strange and/or stupid. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com