Permalink
Browse files

ArrayController selection event

  • Loading branch information...
1 parent 0d4fd74 commit bda46277ce30729cb11c71de272e1de651b7c9a5 @burtlo committed Nov 19, 2011
Showing with 101 additions and 52 deletions.
  1. +82 −52 Gravy/Pets.xib
  2. +2 −0 Gravy/PetsDocumentController.h
  3. +17 −0 Gravy/PetsDocumentController.m
View
@@ -175,7 +175,7 @@
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSTextField" id="122653699">
+ <object class="NSTextField" id="497115196">
<reference key="NSNextResponder" ref="157080717"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{17, 275}, {218, 55}}</string>
@@ -184,7 +184,7 @@
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:3944</string>
<bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="795653779">
+ <object class="NSTextFieldCell" key="NSCell" id="826170430">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">272629760</int>
<string key="NSContents">Label</string>
@@ -194,7 +194,7 @@
<int key="NSfFlags">1044</int>
</object>
<string key="NSCellIdentifier">_NS:3944</string>
- <reference key="NSControlView" ref="122653699"/>
+ <reference key="NSControlView" ref="497115196"/>
<reference key="NSBackgroundColor" ref="1066259238"/>
<object class="NSColor" key="NSTextColor" id="343853175">
<int key="NSColorSpace">6</int>
@@ -214,7 +214,7 @@
<string key="NSFrame">{{0, 363}, {420, 217}}</string>
<reference key="NSSuperview" ref="157080717"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="122653699"/>
+ <reference key="NSNextKeyView" ref="497115196"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<object class="NSOpenGLPixelFormat" key="NSPixelFormat">
<object class="NSMutableData" key="NSPixelAttributes">
@@ -259,22 +259,21 @@
<bool key="NSClearsFilterPredicateOnInsertion">YES</bool>
</object>
<object class="NSCollectionViewItem" id="1024706062"/>
- <object class="NSBox" id="365904754">
- <reference key="NSNextResponder"/>
+ <object class="NSBox" id="1055679688">
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">12</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSView" id="384697547">
- <reference key="NSNextResponder" ref="365904754"/>
+ <object class="NSView" id="714263413">
+ <reference key="NSNextResponder" ref="1055679688"/>
<int key="NSvFlags">274</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTextField" id="169463876">
- <reference key="NSNextResponder" ref="384697547"/>
+ <reference key="NSNextResponder" ref="714263413"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{103, 51}, {168, 43}}</string>
- <reference key="NSSuperview" ref="384697547"/>
- <reference key="NSWindow"/>
+ <reference key="NSSuperview" ref="714263413"/>
<reference key="NSNextKeyView" ref="185871545"/>
<string key="NSReuseIdentifierKey">_NS:360</string>
<string key="NSAntiCompressionPriority">{250, 750}</string>
@@ -295,12 +294,10 @@
</object>
</object>
<object class="NSTextField" id="185871545">
- <reference key="NSNextResponder" ref="384697547"/>
+ <reference key="NSNextResponder" ref="714263413"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{103, 7}, {168, 43}}</string>
- <reference key="NSSuperview" ref="384697547"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView"/>
+ <reference key="NSSuperview" ref="714263413"/>
<string key="NSReuseIdentifierKey">_NS:360</string>
<string key="NSAntiCompressionPriority">{250, 750}</string>
<bool key="NSEnabled">YES</bool>
@@ -315,8 +312,8 @@
<reference key="NSTextColor" ref="343853175"/>
</object>
</object>
- <object class="NSImageView" id="595671677">
- <reference key="NSNextResponder" ref="384697547"/>
+ <object class="NSImageView" id="129981603">
+ <reference key="NSNextResponder" ref="714263413"/>
<int key="NSvFlags">268</int>
<object class="NSMutableSet" key="NSDragTypes">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -331,12 +328,11 @@
</object>
</object>
<string key="NSFrame">{{15, 17}, {81, 80}}</string>
- <reference key="NSSuperview" ref="384697547"/>
- <reference key="NSWindow"/>
+ <reference key="NSSuperview" ref="714263413"/>
<reference key="NSNextKeyView" ref="169463876"/>
<string key="NSReuseIdentifierKey">_NS:2141</string>
<bool key="NSEnabled">YES</bool>
- <object class="NSImageCell" key="NSCell" id="492346424">
+ <object class="NSImageCell" key="NSCell" id="1028388802">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">33816576</int>
<object class="NSFont" key="NSSupport">
@@ -354,16 +350,13 @@
</object>
</object>
<string key="NSFrame">{{1, 1}, {278, 112}}</string>
- <reference key="NSSuperview" ref="365904754"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="595671677"/>
+ <reference key="NSSuperview" ref="1055679688"/>
+ <reference key="NSNextKeyView" ref="129981603"/>
<string key="NSReuseIdentifierKey">_NS:21</string>
</object>
</object>
<string key="NSFrameSize">{280, 114}</string>
- <reference key="NSSuperview"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="384697547"/>
+ <reference key="NSNextKeyView" ref="714263413"/>
<string key="NSReuseIdentifierKey">_NS:18</string>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -389,7 +382,7 @@
<bytes key="NSWhite">MCAwLjgwMDAwMDAxMTkAA</bytes>
</object>
</object>
- <reference key="NSContentView" ref="384697547"/>
+ <reference key="NSContentView" ref="714263413"/>
<int key="NSBorderType">1</int>
<int key="NSBoxType">0</int>
<int key="NSTitlePosition">0</int>
@@ -417,6 +410,22 @@
<int key="connectionID">48</int>
</object>
<object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">arrayController</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="19810628"/>
+ </object>
+ <int key="connectionID">114</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">collectionView</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="340065185"/>
+ </object>
+ <int key="connectionID">115</int>
+ </object>
+ <object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">contentArray: pets</string>
<reference key="source" ref="19810628"/>
@@ -445,7 +454,7 @@
<string key="label">content: arrangedObjects</string>
<reference key="source" ref="340065185"/>
<reference key="destination" ref="19810628"/>
- <object class="NSNibBindingConnector" key="connector" id="210072154">
+ <object class="NSNibBindingConnector" key="connector" id="682527474">
<reference key="NSSource" ref="340065185"/>
<reference key="NSDestination" ref="19810628"/>
<string key="NSLabel">content: arrangedObjects</string>
@@ -467,17 +476,17 @@
<string key="NSLabel">selectionIndexes: selectionIndexes</string>
<string key="NSBinding">selectionIndexes</string>
<string key="NSKeyPath">selectionIndexes</string>
- <reference key="NSPreviousConnector" ref="210072154"/>
+ <reference key="NSPreviousConnector" ref="682527474"/>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
- <int key="connectionID">112</int>
+ <int key="connectionID">136</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">view</string>
<reference key="source" ref="1024706062"/>
- <reference key="destination" ref="365904754"/>
+ <reference key="destination" ref="1055679688"/>
</object>
<int key="connectionID">67</int>
</object>
@@ -516,10 +525,10 @@
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: representedObject.imageIcon</string>
- <reference key="source" ref="595671677"/>
+ <reference key="source" ref="129981603"/>
<reference key="destination" ref="1024706062"/>
<object class="NSNibBindingConnector" key="connector">
- <reference key="NSSource" ref="595671677"/>
+ <reference key="NSSource" ref="129981603"/>
<reference key="NSDestination" ref="1024706062"/>
<string key="NSLabel">value: representedObject.imageIcon</string>
<string key="NSBinding">value</string>
@@ -532,10 +541,10 @@
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">transparent: selected</string>
- <reference key="source" ref="365904754"/>
+ <reference key="source" ref="1055679688"/>
<reference key="destination" ref="1024706062"/>
<object class="NSNibBindingConnector" key="connector">
- <reference key="NSSource" ref="365904754"/>
+ <reference key="NSSource" ref="1055679688"/>
<reference key="NSDestination" ref="1024706062"/>
<string key="NSLabel">transparent: selected</string>
<string key="NSBinding">transparent</string>
@@ -552,10 +561,10 @@
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: selection.name</string>
- <reference key="source" ref="122653699"/>
+ <reference key="source" ref="497115196"/>
<reference key="destination" ref="19810628"/>
<object class="NSNibBindingConnector" key="connector">
- <reference key="NSSource" ref="122653699"/>
+ <reference key="NSSource" ref="497115196"/>
<reference key="NSDestination" ref="19810628"/>
<string key="NSLabel">value: selection.name</string>
<string key="NSBinding">value</string>
@@ -674,7 +683,7 @@
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="84989064"/>
- <reference ref="122653699"/>
+ <reference ref="497115196"/>
</object>
<reference key="parent" ref="764218945"/>
</object>
@@ -685,10 +694,10 @@
</object>
<object class="IBObjectRecord">
<int key="objectID">66</int>
- <reference key="object" ref="365904754"/>
+ <reference key="object" ref="1055679688"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="595671677"/>
+ <reference ref="129981603"/>
<reference ref="169463876"/>
<reference ref="185871545"/>
</object>
@@ -701,7 +710,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="333525891"/>
</object>
- <reference key="parent" ref="365904754"/>
+ <reference key="parent" ref="1055679688"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">19</int>
@@ -715,7 +724,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="575076259"/>
</object>
- <reference key="parent" ref="365904754"/>
+ <reference key="parent" ref="1055679688"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">34</int>
@@ -724,31 +733,31 @@
</object>
<object class="IBObjectRecord">
<int key="objectID">49</int>
- <reference key="object" ref="595671677"/>
+ <reference key="object" ref="129981603"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="492346424"/>
+ <reference ref="1028388802"/>
</object>
- <reference key="parent" ref="365904754"/>
+ <reference key="parent" ref="1055679688"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">50</int>
- <reference key="object" ref="492346424"/>
- <reference key="parent" ref="595671677"/>
+ <reference key="object" ref="1028388802"/>
+ <reference key="parent" ref="129981603"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">85</int>
- <reference key="object" ref="122653699"/>
+ <reference key="object" ref="497115196"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="795653779"/>
+ <reference ref="826170430"/>
</object>
<reference key="parent" ref="157080717"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">86</int>
- <reference key="object" ref="795653779"/>
- <reference key="parent" ref="122653699"/>
+ <reference key="object" ref="826170430"/>
+ <reference key="parent" ref="497115196"/>
</object>
</object>
</object>
@@ -827,7 +836,7 @@
<reference key="dict.values" ref="1002"/>
</object>
<nil key="sourceID"/>
- <int key="maxID">112</int>
+ <int key="maxID">136</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -856,15 +865,21 @@
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>animationView</string>
+ <string>arrayController</string>
+ <string>collectionView</string>
<string>gameObjects</string>
<string>pets</string>
+ <string>selectedIndexes</string>
<string>window</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>MacGLView</string>
+ <string>NSArrayController</string>
+ <string>NSCollectionView</string>
<string>GameObjects</string>
<string>NSMutableArray</string>
+ <string>NSIndexSet</string>
<string>NSWindow</string>
</object>
</object>
@@ -873,8 +888,11 @@
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>animationView</string>
+ <string>arrayController</string>
+ <string>collectionView</string>
<string>gameObjects</string>
<string>pets</string>
+ <string>selectedIndexes</string>
<string>window</string>
</object>
<object class="NSMutableArray" key="dict.values">
@@ -884,6 +902,14 @@
<string key="candidateClassName">MacGLView</string>
</object>
<object class="IBToOneOutletInfo">
+ <string key="name">arrayController</string>
+ <string key="candidateClassName">NSArrayController</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">collectionView</string>
+ <string key="candidateClassName">NSCollectionView</string>
+ </object>
+ <object class="IBToOneOutletInfo">
<string key="name">gameObjects</string>
<string key="candidateClassName">GameObjects</string>
</object>
@@ -892,6 +918,10 @@
<string key="candidateClassName">NSMutableArray</string>
</object>
<object class="IBToOneOutletInfo">
+ <string key="name">selectedIndexes</string>
+ <string key="candidateClassName">NSIndexSet</string>
+ </object>
+ <object class="IBToOneOutletInfo">
<string key="name">window</string>
<string key="candidateClassName">NSWindow</string>
</object>
@@ -19,6 +19,8 @@
@property (nonatomic,assign) IBOutlet GameObjects *gameObjects;
@property (nonatomic,retain) IBOutlet MacGLView *animationView;
+@property (assign) IBOutlet NSCollectionView *collectionView;
+@property (assign) IBOutlet NSArrayController *arrayController;
@property (nonatomic,assign) IBOutlet NSMutableArray *pets;
@property (nonatomic,assign) NSURL *baseResourcesURL;
Oops, something went wrong.

0 comments on commit bda4627

Please sign in to comment.