NSController, KVC & AppleScript not co-operating
NSController, KVC & AppleScript not co-operating
- Subject: NSController, KVC & AppleScript not co-operating
- From: Nicholas Shanks <email@hidden>
- Date: Sat, 6 Mar 2004 22:49:54 +0000
When I set a parameter in my app via AppleScript, UI elements do not
update.
e.g. my app has a checkbox called "Bob is fishing" which is bound to
bob.isFishing, and I call the applescript "tell bob to set isFishing to
true", the -setIsFishing: method gets called, but the checkbox does not
get set in the UI.
"get isFishing of bob" return true.
Funnily enough, if setIsFishing: calls [self setValue:[NSNumber 0]
forKey:fishCaught], the UI updates the text field displaying fish
caught.
Also, creating a command "go fishing" which calls setValue:forKey:
updates the UI, but if the command sets the variable directly, no UI
updates are seen (this is as expected).
Can anyone tell me how to get UI elements bound to NSControllers to
update when applescript changes their values?
Do I have to set up a dummy accessor key which sets the value of the
real key for every variable in my app? (Yikes!)
- Nick.
_______________________________________________
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.