• 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: IB 3.1 breaks NSCollectionView bindings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IB 3.1 breaks NSCollectionView bindings?


  • Subject: Re: IB 3.1 breaks NSCollectionView bindings?
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 31 Jul 2008 17:47:46 -0700

On Jul 30, 2008, at 10:46, Gerd Knops wrote:

I noticed that the bindings only fail for pre-existing objects, objects added after the xib was loaded work fine.

That lead me to a workaround: After loading the xib, I briefly set the content array that the NSArrayController which governs the NSCollectionView observes to nil and then back to the original value. Now the interface works as expected.

I am pretty sure the bug is within NSCollectionView's initialization. My guess is that the order of bindings in the nib control when the view template's bindings are established and when the CollectionView Item becomes valid. One way around it works, the other way around it does not.

FWIW, a very similar thing just happened to me (or rather to a co- worker to whom I had recommended the use of NSCollectionView for a particular piece of the interface). Same thing about editing the XIB file fixing or breaking the problem at different times.


I'm wondering if the problem is not in NSCollectionView's initialization, but in the handling of the view prototype's bindings. In our case, the NSCollectionView actually had the correct number of views (matching its content array), but items of the individual view bound through the collection view item with key "representedObject.someProperty" were not getting their values set.

I presume that when NSCollectionView creates an actual collection view item and view from the prototype objects, it has to mimic the bindings of the prototype view in the created view, so that the created view's bindings point to the view's own collection view item. Perhaps this is the step that's going wrong, in some way that's dependent on the order that the original bindings were encountered.


_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >IB 3.1 breaks NSCollectionView bindings? (From: Gerd Knops <email@hidden>)
 >Re: IB 3.1 breaks NSCollectionView bindings? (From: Jonathan Hess <email@hidden>)
 >Re: IB 3.1 breaks NSCollectionView bindings? (From: Gerd Knops <email@hidden>)
 >Re: IB 3.1 breaks NSCollectionView bindings? (From: Gerd Knops <email@hidden>)
 >Re: IB 3.1 breaks NSCollectionView bindings? (From: Gerd Knops <email@hidden>)

  • Prev by Date: Re: LLVM or GCC or Intel?
  • Next by Date: Re: automatic reload of externally modified files
  • Previous by thread: Re: IB 3.1 breaks NSCollectionView bindings?
  • Next by thread: Guard Malloc Crash in AEProcessAppleEvent on 10.5
  • Index(es):
    • Date
    • Thread