On Dec 5, 2009, at 5:22 AM, Alberto Piu wrote: >> shortcutsTable = [[NSTableView alloc] init];
There are several problems here: 1. The designated initializer of views is -initWithFrame:, not -init. 2. Even if you got that right, it would still not work, because you are resetting the pointer to the table view object to a brand new object. The table view object you probably want to address is freeze-dried in the nib, and will be connected once the nib is loaded, and so you shouldn't overwrite the pointer with something else unless you want to programmatically get rid of it and create a new one (if you're working on a dynamic interface, for instance). 3. Even if you corrected that, you can't send messages to objects connected by IB outlet in -init, because it's most likely that the nib has not been loaded yet unless you explicitly loaded it there. If you need to initialize things in the UI, then you should do that in -awakeFromNib instead. HTH... Nick Zitzmann <http://www.chronosnet.com/> _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
