• 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: handler failure [oops! correction]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: handler failure [oops! correction]


  • Subject: Re: handler failure [oops! correction]
  • From: has <email@hidden>
  • Date: Wed, 13 Nov 2002 19:40:06 +0000

Paul Skinner wrote:

>> set b's bar to a's foo
>> b's bar
>> --> <<handler foo>> --!!!!!
[...]
>It looks to me like you meant to ...

Awww, shit.

Sorry, but I screwed up that sample code completely. (A typo, made in haste
when retyping from memory after bloody Eudora ate my original post.)

Here's a fixed version. (I've also taken the liberty of adjusting the code,
to make it a little easier for you to see what's going wrong.)

======================================================================

script a
property _val : 1

on foo()
return _val
end foo
end script

script b
property _thing : "hello"

property bar : missing value
end script

a's foo()
--> 1

set b's bar to a's foo
b's bar()
--> "hello" --!!!!!

======================================================================

As you can see, the result is completely crack-addled. (I know what's going
wrong here, but let's see who else can figure it out.)

has (class idiot since 1971)

--
http://www.barple.pwp.blueyonder.co.uk -- The Little Page of 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.

  • Follow-Ups:
    • Re: handler failure [oops! correction]
      • From: Paul Skinner <email@hidden>
    • Re: handler failure [oops! correction]
      • From: Michael Terry <email@hidden>
  • Prev by Date: Re: scripting Mail
  • Next by Date: Why the speed difference? (was: Problem with modification date of file...)
  • Previous by thread: Re: Where's the cookie, monster?
  • Next by thread: Re: handler failure [oops! correction]
  • Index(es):
    • Date
    • Thread