• 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: Safe time to add accessory view to NSSavePanel in sandboxed app?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Safe time to add accessory view to NSSavePanel in sandboxed app?


  • Subject: Re: Safe time to add accessory view to NSSavePanel in sandboxed app?
  • From: Graham Cox <email@hidden>
  • Date: Fri, 17 Jul 2015 09:57:34 +1000

> On 17 Jul 2015, at 6:20 am, Mike Abdullah <email@hidden> wrote:
>
>>> Is it trying to be clever and re-use existing accessory views, or is a fresh one created each time?
>>
>> Why do you ask? Is this a known problem?
>
> My thinking is _setSuperview: seems somewhat a surprising place to crash.
>
> I’m hazarding a guess that the accessory view is not a fresh one, and still has a reference to its previous superview. Apple’s code doesn’t expect that situation, and finds the pointer to the previous superview to be invalid perhaps.
>
> This is Apple’s bug, but if my guess is correct, you could probably work around it by manually _removing_ your accessory view from NSSavePanel once the panel returns, rather than leaving semi-attached there.


In my case the accessory view is reused, in that it’s defined in a nib and referenced by an outlet. I keep a strong reference to it so it is ‘owned’ by the controller, and added to each save panel as needed. I’m not doing anything special to clean up when I’m done with the save panel - I’ll look into whether manually removing it and/or clearing the superview reference fixes the problem.

—Graham



_______________________________________________

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: 
 >Safe time to add accessory view to NSSavePanel in sandboxed app? (From: Graham Cox <email@hidden>)
 >Re: Safe time to add accessory view to NSSavePanel in sandboxed app? (From: Conrad Shultz <email@hidden>)
 >Re: Safe time to add accessory view to NSSavePanel in sandboxed app? (From: Graham Cox <email@hidden>)
 >Re: Safe time to add accessory view to NSSavePanel in sandboxed app? (From: Mike Abdullah <email@hidden>)
 >Re: Safe time to add accessory view to NSSavePanel in sandboxed app? (From: Martin Wierschin <email@hidden>)
 >Re: Safe time to add accessory view to NSSavePanel in sandboxed app? (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Re: NSSecureCoding with containers (or, is NSArray lying?)
  • Next by Date: Re: NSPredicate or Collection operators?
  • Previous by thread: Re: Safe time to add accessory view to NSSavePanel in sandboxed app?
  • Next by thread: Re: Safe time to add accessory view to NSSavePanel in sandboxed app?
  • Index(es):
    • Date
    • Thread