Re: binding an array controller to columns in an NSTableView

2012-09-11 Thread Chuck Soper
On 9/11/12 11:23 AM, "Quincey Morris" wrote: >On Sep 11, 2012, at 10:13 , Chuck Soper wrote: > >> When adding additional colors, I understand that the following code can >> create a color object, but I'm not sure where to put this code or if I >>can >> use bindings instead. >> NSManagedObject *co

Re: binding an array controller to columns in an NSTableView

2012-09-11 Thread Erik Stainsby
I keep wondering as I'm watching this thread if it might be easier and more closely match the extensibility of the "row of color views" Chuck is trying to create if he were to use an NSMatrix instead of the full blown NSTable ? Sent from my iCapsule somewhere in orbit On 2012-09-11, at 11:23

Re: binding an array controller to columns in an NSTableView

2012-09-11 Thread Quincey Morris
On Sep 11, 2012, at 10:13 , Chuck Soper wrote: > When adding additional colors, I understand that the following code can > create a color object, but I'm not sure where to put this code or if I can > use bindings instead. > NSManagedObject *color = [NSEntityDescription > insertNewObjectForEntityF

Re: binding an array controller to columns in an NSTableView

2012-09-11 Thread Chuck Soper
On 9/10/12 7:15 PM, "Quincey Morris" wrote: >On Sep 10, 2012, at 18:40 , Chuck Soper wrote: > >> I understand how to bind an array controller (for an entity) to rows in >>a >> table, and how to bind a Text Field in the Table Cell View to an entity >> property. I'm not sure how to go about this f

Re: binding an array controller to columns in an NSTableView

2012-09-10 Thread Dave Fernandes
Wait, did you mean you want consecutive items in the array to be consecutive table columns? I can't think of any way to do that. On 2012-09-10, at 10:02 PM, Dave Fernandes wrote: > Select the table column in Xcode, and bind its Value binding to the array > controller with Controller Key = arra

Re: binding an array controller to columns in an NSTableView

2012-09-10 Thread Quincey Morris
On Sep 10, 2012, at 18:40 , Chuck Soper wrote: > I understand how to bind an array controller (for an entity) to rows in a > table, and how to bind a Text Field in the Table Cell View to an entity > property. I'm not sure how to go about this for columns in a table. I > assume that I may need to

Re: binding an array controller to columns in an NSTableView

2012-09-10 Thread Dave Fernandes
Select the table column in Xcode, and bind its Value binding to the array controller with Controller Key = arrangedObjects, and Model Key Path = attributeName for the entity. On 2012-09-10, at 9:40 PM, Chuck Soper wrote: > An have an "Color" entity in my data model (I'm just using the word > '

binding an array controller to columns in an NSTableView

2012-09-10 Thread Chuck Soper
An have an "Color" entity in my data model (I'm just using the word 'color' for demonstrative purposes). Typically, I only expect to have 6 or 8 colors for each instance. I'd like to create an NSArrayController for the Color entity, then bind it to columns in an NSTableView. I'll need to add and re