• 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
Re: KVC with an path, AppleScript and InterfaceBuilder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: KVC with an path, AppleScript and InterfaceBuilder


  • Subject: Re: KVC with an path, AppleScript and InterfaceBuilder
  • From: Matt Neuburg <email@hidden>
  • Date: Mon, 23 Jan 2006 10:21:33 -0800
  • Thread-topic: KVC with an path, AppleScript and InterfaceBuilder

On Mon, 23 Jan 2006 00:00:39 +0100, Thomas Engelmeier
<email@hidden> said:
>Hi,
>
>I try get scriptability in an Cocoa application up and running.
>
>Basically there are a bunch of model objects which store most of
>their data in a NSMutableDictionary called settings. The UI is
>attached with Cocoa-bindings to the object instance via
>settings.KeyName which resolves fine. However, specifying the same
>key in the .sdef for AppleScript values does not resolve, instead the
>objects valueForUndefinedKey method is invoked.
>
>Is there anything special I need to do to in order to have paths
>resolved for AppleScript properties?

Everything depends upon Cocoa Scripting's peculiar view of KVC-compliance. I
suggest that you write a completely separate set of accessors for the use of
Cocoa Scripting's KVC, and key the .sdef to them. (It is usual to put these
accessors in a category.) The details in the .sdef are extraordinarily
touchy. If you are just getting started adding scriptability, I have put up
a tutorial that might help:

<http://www.tidbits.com/matt/scriptability/scriptabilityTutorial.html>

A later version of that tutorial also appears in the new edition of my
AppleScript book. And there are other tutorials floating around the web. m.

--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>



 _______________________________________________
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

  • Follow-Ups:
    • Re: KVC with an path, AppleScript and InterfaceBuilder
      • From: Thomas Engelmeier <email@hidden>
  • Prev by Date: Re: NSSound vs QuickTime
  • Next by Date: Small version of Square Pulldown NSPopUpButton?
  • Previous by thread: KVC with an path, AppleScript and InterfaceBuilder
  • Next by thread: Re: KVC with an path, AppleScript and InterfaceBuilder
  • Index(es):
    • Date
    • Thread