• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Trouble with design pattern
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Trouble with design pattern (From: Carlos Eduardo Mello <email@hidden>)

  • Prev by Date: Re: NSDistributedNotificationCenter questions.
  • Next by Date: Re: NSDistributedNotificationCenter questions.
  • Previous by thread: [Solved]: Trouble with design pattern
  • Next by thread: RE:Trouble with design pattern
  • Index(es):
    • Date
    • Thread