• 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: showing window causes EXC_BAD_ACCESS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: showing window causes EXC_BAD_ACCESS


  • Subject: Re: showing window causes EXC_BAD_ACCESS
  • From: "Michael Ash" <email@hidden>
  • Date: Fri, 26 Sep 2008 16:14:27 -0400

On Fri, Sep 26, 2008 at 2:45 PM, Daniel Child <email@hidden> wrote:
> I should? Then how do I get the reference back? If windowA is a window
> outlet in my AppController, then first time around I don't do anything. It
> is automatically assigned a reference when the window loads, and I can use
> makeKeyAndOrderFront.
>
> But if I choose to automatically release the window on closing, how do I get
> the variable windowA reassigned to the window? I don't want to reload the
> entire nib because there may be other things in the nib that don't need to
> be reloaded....

Well, it's not good to be doing that in the first place, generally.
Although there are occasional exceptions, it's best to have one window
per nib, and one NSWindowController per window. This has the advantage
of lazy loading which helps performance and memory use, as well as
better organization of the program. However, for windows which get
used repeatedly it's entirely reasonable to keep them around rather
than destroying them and re-creating them when closing and opening
them.

Mike
_______________________________________________

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: 
 >Re: showing window causes EXC_BAD_ACCESS (From: Daniel Child <email@hidden>)

  • Prev by Date: Re: addTrackingRect strangness
  • Next by Date: Re: Always allowing drags from WebView inside a global NSPanel
  • Previous by thread: Re: showing window causes EXC_BAD_ACCESS
  • Next by thread: [MEET] LA CocoaHeads meeting tonight 7:30pm
  • Index(es):
    • Date
    • Thread