• 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: Passing *possible* variables to a handler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing *possible* variables to a handler


  • Subject: Re: Passing *possible* variables to a handler
  • From: has <email@hidden>
  • Date: Fri, 19 Jul 2002 15:54:10 +0100

Nigel Garvey wrote:

>>> Ey lad, looks like you've almost incidentally discovered constructor
>>> functions (except that your example above doesn't actually return the
>>> script object created).
>>
>>Actually, it almost does. Oddly, "script obj...end script" doesn't set
>>'result', but an anonymous "script...end script" does.
>
>Have you guys discovered a version-specific bug? Script objects *always*
>return run-time results on my machines - unless they're at the very top
>level of a script. Then I get the same effect that Scott describes. (I'm
>using AS 1.6 and AS 1.3.7.)

Ahhh... <sound of furious backpedalling here>

Really, I'd _swear_blind_ it didn't used to work. Maybe that was on my old
8.6 setup or something, but trying it right now on 9.2.1/AS1.6, no problem.
Damn. Am I paranoid, or is AS really out to get me? (Perhaps I should dig
up my old 8.6 installer and try it there...)


[clarification to the clarification]
>... I find that, at the very top level of a script, *named* script
>objects are intialised at compile time. Anonymous ones aren't.

Oh, good catch. Yes, that makes obvious sense. (In fact, you couldn't
declare an unnamed script object outside an explicit run handler even if
you wanted to.) I'm glad one of us was paying proper attention (it
obviously wasn't me:p).

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: USB Device Detection and Alarm
  • Next by Date: Akua Sweets - list entries
  • Previous by thread: Re: Passing *possible* variables to a handler
  • Next by thread: Re: Passing *possible* variables to a handler
  • Index(es):
    • Date
    • Thread