• 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
Script Objects - help please!!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Script Objects - help please!!


  • Subject: Script Objects - help please!!
  • From: Simon Forster <email@hidden>
  • Date: Fri, 10 Jun 2005 21:19:22 +0100

I've got a script object set up in an external library file. This external library file also has a couple of functions unrelated to the script object:

on handleThis()
    ...
end

on handleThat()
    ...
end

script renderQueue
    property renderClient : {}
    ....
end

I load the external library file:

set myLib to load script file pathToScript

and then copy the render queue script to the end of a list x times, calling the script object's init method as I go:

set theList to {}
repeat...
    copy renderQueue of myLib to end of theList
    tell last item of theList to init(someData)
end

While the subsequent references do not appear to be pointers to the same object, when I call the object's getXX() method the results are identical for both objects - the someData supplied to the last object's init method.

tell item 1 of theList to display dialog (getXX() as string)
tell item 2 of theList to display dialog (getXX() as string)

Can someone give me hints as to what I'm doing wrong here - or how to investigate this further so that I can work it out for myself? I've tried wrapping the script object in an initializing handler as per the language guide and I've tested a simple stand alone example (single file though) which works exactly as I'd expect it to. Am I screwing up by having the script object in an external library file? If so how? Why?

Any and all help gratefully appreciated.

_______________________________________________
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


  • Prev by Date: Scripting text edit
  • Next by Date: Controlling execution priority of a script
  • Previous by thread: Re: Scripting text edit
  • Next by thread: Re: Script Objects - help please!!
  • Index(es):
    • Date
    • Thread