From: Tim P. <he...@ti...> - 2007-07-04 08:54:12
|
Hey Guys I am subclassing NSView to try and make a toolbar like the one in iPhoto (the one which runs accross the bottom quarter of the window, holiding the operation buttongs like "Play" and "Search"). I took a look at what apple had done with iPhoto and it seems they subclassed NSView, then subclassed there new subclass calling it IPToolbar. I would look to replicate this, so i have subclassed NSView setting the background colour with no problem. So my question is, if i had an array of items (NSMutableArray), how would I add and remove items from my view? Would this just be like adding and removing any other object? I have not done anything with rolling your own views before, so im at a bit of a loss on the actual implementation code.. Also, are there any performance issues in making the view code go over the bridge? I see the RubyCocoaStickies example which seems to work fine using RC for the view implementations. Would anyone be able to push me in the right direction? Any help would be greatly appreciated! Cheers Tim |