On May 2, 2008, at 5:33 PM, J. Todd Slack wrote:

When I use:

[NSBundle loadNibNamed:@"SettingsDialog" owner:self]; // the nib name is SettingsDialog.nib

Xcode complains that this is the first time that self is used.

I am a bit rusty right now, can anyone explain why? I thought self could be used like this.


If you're calling that from a C function, then "self" is undefined. You need to set the owner to an instance of the object that was set as the file's owner, if any, in the nib.

Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to