Re: Bindings and Buttons
Re: Bindings and Buttons
- Subject: Re: Bindings and Buttons
- From: James DiPalma <email@hidden>
- Date: Thu, 22 Jul 2004 11:40:47 -0700
And this outlet is used for what purpose? What is "selection"?
I just created a test PB project (cocoa-document based) and added a
BOOL called "state" to MyDocument.h:
BOOL state;
Then opened MyDocument.nib and added a check box and bound 'value' to
file's owner with a model key path of "state"; then added a button and
bound 'enabled' to file's owner with a model key path of "state".
This is what andreas is suggesting you do; I don't know what his outlet
might have been for and ".selection." is maybe a fixed action pattern,
or a copy/paste error, or I am missing something completely.
-jim
On Jul 22, 2004, at 8:27 AM, Andreas Mayer wrote:
The model controller might of course be the File's Owner. In that case
you'll need an outlet to the first button (button1) and a variable to
hold the state:
IBOutlet NSButton *button1;
BOOL button1State;
Now bind both, button1's 'value' binding and button2's 'enabled'
binding, to <controller>.selection.button1State. Done.
_______________________________________________
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.