Cocoa – Bind to NSCollectionViewItem will cause Xcode crash

Using XCode 4.1, whenever I try to use CollectionView, I get a crash.

These are the steps I’m doing:

>From the new project, edit the MainMenu.nib file.
>Add NSCollectionView in the window, which will also add a Collection View
Project and new view in the new view
>Add something similar to NSTextField Control
>Select the control, and then switch the inspector to the binding pane.
>Try to bind some content to the Collection View Item.
After selecting “Collection View Item” in the drop-down menu , Then
an “internal error” dialog box appears. Try to continue from this dialog box
The binding pane disappears until you restart XCode

Will this happen to other people? , Or is it just something I have encountered?
Is there a way to solve it to allow me to bind to the collection view item (I hope to eventually bind to the representObject value) in XCode or in code.

I am trying to create a custom NSCollectionViewItem sub Class, it uses a separate nib file and sets it as the itemPrototype of NSCollectionView, but things are very wrong.

I found that splitting the collection view item view into its own XIB and then reconnecting the connection so that the collection view item prototype loads the new XIB will allow you to create bindings in the interface builder without crashing. I follow These steps…

>Remove the collection view item view from the default xib.
>Create a new view and XIB inherited from NSCollectionViewItem.
>Create a collection in the new view View item.
>Bind the field to the file owner of the new view.
>Return to the collection view xib, update the properties of the collection view item to load the bin name of the new xib.

I Not sure it is faster than programmatically, but it does allow you to manage bindings without writing code. I have some applications like this now.

Use XCode 4.1 Whenever I try to use CollectionView, I get a crash.

These are the steps I am doing:

>From the new project, edit MainMenu.nib File.
>Add NSCollectionView in the window, which will also add a Collection View
item and new view in the new view
>Add a control like NSTextField
>Select the control, and then set the inspector Switch to the binding pane.
>Try to bind some content to the Collection View Item.
After selecting “Collection View Item” in the drop-down menu, you can
The “Internal Error” dialog box appears Box. Try to continue from this dialog
The binding pane disappears until you restart XCode

Will this happen to other people, or is it just something I have encountered?
Is there a way to solve it to allow me to bind to the collection view item (I hope to eventually bind to the representObject value) in XCode or in code.

I am trying to create a custom NSCollectionViewItem sub Class, it uses a separate nib file and sets it as the itemPrototype of NSCollectionView, but things are very wrong.

I found that the collection view item view Split into your own XIB, then reconnect the connection so that the collection view item prototype loads the new XIB will allow you to create bindings in the interface builder without crashing. I followed these steps…

< p>>Remove the collection view item view from the default xib.
>Create a new view and XIB inherited from NSCollectionViewItem.
>Create a collection view item in the new view.
>Bind the field to The file owner of the new view.
>Return to the collection view xib, update the properties of the collection view item to load the bin name of the new xib.

I’m not sure it is faster than programmatically, but it does Allows you to manage bindings without writing code. I have some applications like this now.

Leave a Comment

Your email address will not be published.