• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSController, KVC & AppleScript not co-operating
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: NSController, KVC & AppleScript not co-operating
      • From: mmalcolm crawford <email@hidden>
    • Re: NSController, KVC & AppleScript not co-operating
      • From: Dustin Voss <email@hidden>
    • Re: NSController, KVC & AppleScript not co-operating
      • From: Don Briggs <email@hidden>
  • Prev by Date: Test if a file is local or via file sharing?
  • Next by Date: Re: NSController, KVC & AppleScript not co-operating
  • Previous by thread: Re: Test if a file is local or via file sharing?
  • Next by thread: Re: NSController, KVC & AppleScript not co-operating
  • Index(es):
    • Date
    • Thread