Re: Trouble with design pattern
Re: Trouble with design pattern
- Subject: Re: Trouble with design pattern
- From: Carlos Eduardo Mello <email@hidden>
- Date: Fri, 18 Feb 2011 20:22:30 -0200
On Feb 18, 2011, at 5:46 PM, email@hidden wrote:
On Feb 18, 2011, at 11:20 AM, Carlos Eduardo Mello wrote:
I need to declare an instance of MyDocument inside my view's
classes. The compiler won't let me do this unless I import
MyDocument to the class definitions.
you can use:
@class MyDocument;
in your .h file to forward declare MyDocument as a class without
importing its definition.
Thanks for the tip.
I've just tried your suggestion: placed the forward declarations in
the custom view files and declared instances of the MyDocument type. I
checked all the details and tested several times, but the compilers
still give me the same warnings, and now there is a nother problem:
[[[self window] windowController] document]] doesn't seem to be
garanteed to return something other than nil at [awakeFromNib].
Is there some other point in the document intializing cycle where I
could put that call so I can store it for repeated use during app's
execution?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden