• 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: Prevent windows from opening multiple times
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Prevent windows from opening multiple times


  • Subject: Re: Prevent windows from opening multiple times
  • From: John Joyce <email@hidden>
  • Date: Fri, 21 Jan 2011 14:34:00 -0600

On Jan 21, 2011, at 2:27 PM, Quincey Morris wrote:

> On Jan 21, 2011, at 10:48, Luc Van Bogaert wrote:
>
>> Instead of using a local pointer variable in the action method to open the window, I thought about using an instance variable in my app delegate to hold a pointer to the windowcontroller object, and check its existance before opening the window. However, trying this failed, as now I can open and close the window just once, and the app crashes on subsequent attempts to open the window.
>
> Your approach is correct, so you have a bug in your implementation -- most likely a memory management error. You need to track this down like any other (likely) overrelease problem. If you post backtraces from the crash and/or relevant source, I'm sure people will be happy to help isolate what's gone wrong.
Check your settings for the window in Interface Builder...
don't change the defaults for
Behavior : Release when closed (YES)
Memory : Deferred (YES)
		Buffered

...unless you really know why you are changing them...
you can get this crashing behavior with have fiddled with these..._______________________________________________

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: 
 >Prevent windows from opening multiple times (From: Luc Van Bogaert <email@hidden>)
 >Re: Prevent windows from opening multiple times (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Prevent windows from opening multiple times
  • Next by Date: Re: Magazine Framework
  • Previous by thread: Re: Prevent windows from opening multiple times
  • Next by thread: Tiling, applying it in my app.
  • Index(es):
    • Date
    • Thread