• 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
inconsistencies in getting a non-existent object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

inconsistencies in getting a non-existent object


  • Subject: inconsistencies in getting a non-existent object
  • From: has <email@hidden>
  • Date: Sun, 26 May 2002 21:43:42 +0100

Hi,

[Thanks go to Anthony Adachi for drawing my attention to the following
problem.]

Below is a test script. I would expect the 'get test2 of foo' line to
generate a "Can't get test2 of foo" error -1728.In practice, life does not
appear quite so simple...

THE SCRIPT:

script foo
script test1
end script
end script

on run
try
get test2 of foo
--get result
on error e number n
display dialog e & n
end try
end run


[Note: for clarity, I'm trapping the error and displaying the message in a
dialog.]

--

THE RESULTS:

- In Script Editor it displays a dialog "Can't make some data into the
expected type.-1700"

- In Smile it gives the dialog "Can't get test2.-1728"

- When running as an applet, I get the same error as SE.

- Script Debugger 3.0.3, however, swans right through the script, no dialog
appearing at all. The following appears in its Apple Event log:

---------------------
Script "untitled 4" started
tell current application
get test2
end tell
Script "untitled 4" finished
---------------------

Note: if you uncomment the 'get result' line, SD will now give the dialog
"The variable result is not defined.-2753". (Well, at least it notices
*something* I can trap...<sigh>)

--

THE QUESTION:

What the #@$*!! is the reason for such horribly inconsistent behaviour
between these different environments? The SE/applet/Smile disagreement on
what error to throw seems downright bizarre, while SD has me at a _total_
loss.


HELP!!!

has

--
http://www.barple.connectfree.co.uk/ -- The Little Page of Beta AppleScripts
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Saving lists of records to a text file
  • Next by Date: Re: Applescript "set name of" different in 10.0 vs 10.1?
  • Previous by thread: Re: A modest request?
  • Next by thread: Re: inconsistencies in getting a non-existent object
  • Index(es):
    • Date
    • Thread