• 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
is it possible to load a script library with a creation handler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

is it possible to load a script library with a creation handler


  • Subject: is it possible to load a script library with a creation handler
  • From: Timothy Bates <email@hidden>
  • Date: Sun, 01 Apr 2001 02:51:52 +1000

hi there,
I now understand how neat script libraries are (took me a while).

I have a nifty library which should be initialised when I create an instance
of it.

I was doing this with a handler that contained the script, but I want to
move to loading the scripts from file. Unfortunately, now I cannot see how
to force the user to initialise the object when they create it because you
can't pass parameters to the load script command. Is there anyway around
this?

To help explain, my old script (gutted for simplicity) was:

set myStaircase to my createNewAdapativeStairCase({1,2,3})

returnParameters() of myStaircase
--> {1,2,3}

on createNewAdapativeStairCase(parameterList)
script staircase
property parameters: parameterList
on returnParameters()
return parameters
end returnParameters
end script
end createNewAdapativeStairCase

Does anyone out there have any clues on including a handler like this in a
loadable script object so that it is called at load time? Is thought that
load like be like "run" so I could simply include the code and gets called
automagically, but no dice.

tim


  • Prev by Date: Re: CGIs with OSX
  • Next by Date: calling handler with named parameters fails from script?
  • Previous by thread: Re: CGIs with OSX
  • Next by thread: calling handler with named parameters fails from script?
  • Index(es):
    • Date
    • Thread