Re: Trouble with design pattern
Re: Trouble with design pattern
- Subject: Re: Trouble with design pattern
- From: Jon Gary <email@hidden>
- Date: Fri, 18 Feb 2011 17:57:52 -0500
Maybe I'm missing your point but the compiler warning is trivial to address.
- [NSWindowController document] returns an id. If you want to call methods in your document class,
CarlosDocument * doc = (CarlosDocument*) [windowController document];
[doc carlosMethod];
However if your views are calling methods on your document, you're doing it wrong. Your views should operate on data provided by your document (preferably via bindings) and by actions your views call into your document (or window controller, depending upon how you've designed your app).
--
Jon Gary / Object Orienteer / Ambrosia Software, Inc. -- http://www.AmbrosiaSW.com
On Feb 18, 2011, at 2:20 PM, Carlos Eduardo Mello wrote:
> 1) Is there a better way to approach this?
_______________________________________________
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