• 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: Picking data from a record
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Picking data from a record


  • Subject: Re: Picking data from a record
  • From: Paul Berkowitz <email@hidden>
  • Date: Sun, 26 Sep 2004 07:39:11 -0700

On 9/25/04 9:16 PM, "Michelle Steiner" <email@hidden> wrote:

>
> On Sep 25, 2004, at 8:42 PM, Paul Berkowitz wrote:
>
>> Well, this is very odd:
>>
>> It runs just fine in Script Debugger 3.0.8 without the 'get'.
>>
>> In Smile 2.5.9, it errors "Can't get h of testRecord' without the
>> 'get', but
>> runs fine with the 'get'.
>>
>> In Script Editor 2.0, it errors "AppleScript Error:
>> NSCannotCreateScriptCommandError" both with and without the 'get'.
>>
>> Which is absurd. A standard addition command (run script) should not
>> depend
>> on which editor is running it.
>
> What if you run it from an application or a script menu?

Fascinating. I added a

    display dialog finalResult

to the script. Saved as an application from all three editors, it worked
just fine both with _and without_ 'get'. It always displayed "Height" from
all three applications.

Saved as a compiled Script from all three editors, and run in Entourage's
script menu, it errored:

    can't get h of testRecord

without the 'get', and

    can't get testRecord

with the 'get'. Just the same from all three editors.

Running the identical compiled scripts from the system's Script menu, all
six of them (with and without 'get') did nothing at all: no error  no
dialog.

Therefore, the problem is with 'parent'. 'parent' is being interpreted
differently depending on whether the script is being by Script Debugger,
Smile, Script Editor, Entourage or System Events. I don't know whether
'parent' is perhaps derived from a separate instance of the AppleScript
component created for each application. Inserting a

    display dialog (name of parent)

or

    display dialog (name of (get parent))

ends to:

    Scripting component error

in all 3 application-scripts and in all 3 compiled scripts run from
Entourage. All 3 compiled scripts run from the system Script menu with
either (name of [get] parent) do nothing. (From the latter I think we can
conclude that the system Script menu or System Events is just ignoring the
error and quitting.)

So has must be right that " some editors implement
[un]documented 'run script' commands with different behaviour to the
osax version. " Or something of the sort.


--
Paul Berkowitz


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Picking data from a record (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Prevent this double dialog
  • Next by Date: Re: Picking data from a record
  • Previous by thread: Re: Picking data from a record
  • Next by thread: Re: Picking data from a record
  • Index(es):
    • Date
    • Thread