Managing selectedObjects
Managing selectedObjects
- Subject: Managing selectedObjects
- From: goessly <email@hidden>
- Date: Mon, 9 Jan 2006 13:10:33 +0100
I am successfully performing some actions on an array of objects from
an NSTreeController, like this:
[myTextField setStringValue:
[[[myTreeController selectedObjects] objectAtIndex: myCounter]
valueForKeyPath:@"myKey"]];
It is important to allow for multiple selections- and keep them. So I
chose to use "selectedObjects" and iterate over the array.
Writing this string value to the interface is "one-way", no problem.
_Getting_ input from the interface - i.e. via a checkbox,
representing a boolean member variable of the current object - would
usually require binding the checkbox to
arrangedObjects.selection.someBooleanMember
So how can I provide the interface with access to
[[myTreeController selectedObjects] objectAtIndex: myCounter]
so that I can use it instead of "selection" in the keypath?
I guess it's not to much trouble to just code the getters and
setters, but bindings are a bit quicker ^^
So any suggestions?
Best Regards,
goessly
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden