Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: avoiding to open window multiple times



on 06/02/19 08:16, Joris Mans at email@hidden wrote:

> Is this a good way of handling this? Isnt there a better way?

Maybe not "better", but "another" way: Create each of these window
controllers as "singletons", which are kind of glorified global variables.
Your Xcode Cocoa documentation has a document "Creating a Singleton
Instance" which you might want to read.  I just make a global variable
assigned to nil, and before allocating a new one test that it != nil.

Depending on the long-range business plan for your application, what you
have already done may be just fine.  It works and you understand it.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >avoiding to open window multiple times (From: "Joris Mans" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.