• 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: Calling maincontroller
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling maincontroller


  • Subject: Re: Calling maincontroller
  • From: "email@hidden" <email@hidden>
  • Date: Thu, 7 Oct 2010 20:18:37 +0100

On 7 Oct 2010, at 19:58, Hans van der Meer wrote:
>
> I am not very happy with the static variable but do not see another way to accomplish this. I fear my solution is not as much in the spirit of Cocoa programming as it should be.
> Is there a better way?

The Cocoa way is to wrap your static in a singleton:

http://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaObjects/CocoaObjects.html#//apple_ref/doc/uid/TP40002974-CH4-SW32

Regards

Jonathan

_______________________________________________

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: 
 >Calling maincontroller (From: Hans van der Meer <email@hidden>)

  • Prev by Date: Calling maincontroller
  • Next by Date: NSComboBox bound to NSMutableArray of NSMutableDictionary with NSArrayController?
  • Previous by thread: Calling maincontroller
  • Next by thread: Re: Calling maincontroller
  • Index(es):
    • Date
    • Thread