I noticed that, by default, when creating a new Document Based application, if you open the MyDocument's nib file, the FileOwner's object (i.e. MyDocument's instance) already has an outlet named "window" which is connected to my main document's window. However, it seems like it's impossible to access this "window" outlet in my code... using

[window setToolbar:] for example gives me an error saying that "window" wasn't declared....

If I try to declare a "window" outlet in my code and try to connect it in IB, I end up with 2 outlets named "window"...

Of course the easy work around was to declare a new outlet that I named "mainWindow" and connected to my file owner, that way I can access the main window from my code... but still I was wondering why it is not possible to access the "window" outlet that is created automatically with every new "Document Based" project...? What's the use of this outlet if I can't access it in my code?

Jean-Nicolas Jolivet
_______________________________________________

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