NSArrayController manage array in MyObject
NSArrayController manage array in MyObject
- Subject: NSArrayController manage array in MyObject
- From: matt neuburg <email@hidden>
- Date: Fri, 23 Apr 2004 12:49:10 -0700
I'm having some sort of mental block understanding NSArrayControllers. The
problem is that there is something I commonly do with NSObjectControllers
and now I want to graduate to NSArrayControllers and do a parallel thing,
and I don't know how. This question is *very* elementary.
Here is what I do with NSObjectControllers. I have an NSObjectController
whose "content" outlet points at a MyObject instance in the nib. Then in the
interface I can bind something - let's say a text field - to the
NSObjectController. If I designate a name in this binding, such as
selection.coolText, this causes the NSObjectController to manage the
NSString called coolText that is an instance variable of MyObject, through
key-value-coding.
Okay. Now I want to do the parallel thing with an array (of mutable
dictionaries). So I've got an NSMutableArray in MyObject call coolArray.
I've got the "content" outlet of an NSArrayController pointing at MyObject.
How can I bind a table column to coolArray through this NSArrayController?
In other words, how do I specify that the thing the NSArrayController should
manage within MyObject is coolArray? (You see why this would be parallel to
what I'm doing now?) Thx - m.
PS I see how to do this by binding, but you can't bind an NSArrayController
to anything except the file's owner and the shared defaults. That's why I
want to do it with with the "content" outlet.
--
matt neuburg, phd = email@hidden,
http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
AppleScript: the Definitive Guide! NOW SHIPPING...! (Finally.)
http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt
Subscribe to TidBITS! It's free and smart.
http://www.tidbits.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.