• 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: migration to 10.6 SDK, loadNib problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: migration to 10.6 SDK, loadNib problems


  • Subject: Re: migration to 10.6 SDK, loadNib problems
  • From: Philip White <email@hidden>
  • Date: Fri, 12 Aug 2011 15:32:04 -0500

On Aug 11, 2011, at 6:26 PM, email@hidden wrote:

> Hello,
>  I'm migrating my apps to the App Store and my projects to Xcode 4 and the 10.6 SDK. Now my app is crashing when I try to load the window nib that contains my preferences window. I'm getting infinite recursion as shown in this sample of the stack trace. I take it this is a KVO problem but what kind of error could I have made that this would only popup when linking with the 10.6 SDK. The app ran fine previously under Lion, compiled with Xcode 3/10.5 SDK. Any tips would be appreciated.
>
> #841	0x906d4679 in loadNib ()
> #842	0x906d3a60 in +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] ()
> #843	0x906d396a in +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:] ()
> #844	0x908ce350 in -[NSWindowController loadWindow] ()
> #845	0x908ce0ee in -[NSWindowController window] ()
> #846	0x903ab16b in _NSGetUsingKeyValueGetter ()
> #847	0x903ab13c in -[NSObject(NSKeyValueCoding) valueForKey:] ()
> #848	0x903ccad5 in -[NSKeyValueNestedProperty object:didAddObservance:recurse:] ()
> #849	0x90393c54 in -[NSObject(NSKeyValueObserverRegistration) _addObserver:forProperty:options:context:] ()
> #850	0x903923ea in -[NSObject(NSKeyValueObserverRegistration) addObserver:forKeyPath:options:context:] ()
> #851	0x906f3bdc in -[NSBinder _updateObservingRegistration:] ()
> #852	0x906f2b10 in -[NSBinder establishConnection] ()
> #853	0x906e5b67 in -[NSObject(NSKeyValueBindingCreation) bind:toObject:withKeyPath:options:] ()
> #854	0x90902ed4 in -[NSNibBindingConnector establishConnection] ()
> #855	0x906de819 in -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] ()
> #856	0x906d4679 in loadNib ()
> etc...
>
>
> Thanks,
>  Philip White


I seemed to have found what is causing the problem here. I had an NSTabView's selectedIdentifier binding bound to File's Owner.window.toolbar.selectedItemIdentifier
Apparently this would cause a problem because it would call the window controller's -window method again, which would call -loadWindow again, and then proceed with all that nib loading business until it tried to make that same connection at which point it would all start over again.
This used to work just fine and I thought this was the standard way of connecting NSToolbars with NSTabViews. Must I connect this binding programmatically after the window loads?

Thanks,
  Philip

_______________________________________________

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

  • Follow-Ups:
    • Re: migration to 10.6 SDK, loadNib problems
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: core data, boolean attribute, and dynamic
  • Next by Date: Re: File Copy With Progress?
  • Previous by thread: migration to 10.6 SDK, loadNib problems
  • Next by thread: Re: migration to 10.6 SDK, loadNib problems
  • Index(es):
    • Date
    • Thread