Initting "enabled" binding for button
Initting "enabled" binding for button
- Subject: Initting "enabled" binding for button
- From: Rondelle Jones <email@hidden>
- Date: Mon, 22 May 2006 10:29:35 -0700 (PDT)
Hi,
I am learning to use bindings. I'm having trouble
getting a button's enabled state to be set properly at
launch. It is bound to the canRemove state of an
array controller. It always comes up enabled and
doesn't seem to synchronize with the binding until I
do something, such as click on the column header of a
related table view to sort the items (even though no
items yet exists). I tried to use setSortDescriptors
to make it sync programmatically, but that didn't
work.
Here is what I am doing:
I have a main controller class with a mutable array of
items. I have an NSObjectController whose content is
bound to that array. I have an NSArrayController
whose contentArray is bound to the
NSObjectController.selection.myArray. myArray
contains an array. I have an NSArrayController bound
to the selection of myArray's
NSArrayController.mySubArray. And mySubArray has an
array inside of it, so I have a third
NSArrayController that is bound to mySubArray's
NSArrayController.selection.mySubSubArray.
The names of items in myArray are displayed on a popup
via the popup's content, contentValues and
selectedIndex bindings.
There is a table bound to display the names of items
in mySubArray, and another table bound to display the
names of items in mySubSubArray.
The display is working. Adding and removing items is
working. It's just this problem with the +/- buttons
for adding items to the tables that isn't in sync at
first.
What should I do?
Thank you.
Rondi
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
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