sharedscripts
Andre Garzia
soapdog at mac.com
Wed Feb 23 15:42:02 EST 2005
On Feb 23, 2005, at 5:21 PM, Rob Meijer wrote:
> Andre,
> I cannot find the right syntax. 'Start using' did not match.
> I am looking for something like:
> "insert script of button "wijzigen" into script of field "content""
> but here I get an errormessage "missing script"
> ??????????????????????????
> Thanks for your help
> Rob
Rob,
quoting Richards reply:
"you can use the "insert script" command to put a script of any object
into the message path for use by any other object, and you can use
"start using" to make something roughly equivalent to TB's sysbooks.
For notes on these and more see:
<http://www.fourthworld.com/embassy/articles/
revolution_message_path.html>"
start using will add a script of a stack to the message path, but not
the script of a button. You can add the script of a button as a
backscript or a frontscript but I don't think that's what you're
looking for.
Ron, I don't know the behaviour you want to achive. If you want just to
share scripts between controls, check revolution "groups", if you want
to make a script as library, put it inside a stack and use "start using
stack "myStack"" to use the stack as lib. But if this script is
pre-coded, why not putting it inside the field content anyway? For
example, I have here some small reusable scripts that I use all the
time but they are too small to deserve a library, so I created a little
palette that will check the selected object in Rev IDE and insert that
script on the object. I can go adding scripts to this pallete... this
servers me fine for it does not alter the message path in anyway...
if you want to change the script of a button at runtime (or at
interactive time), then I think you can set the script property of the
button, but we need help from the experts on this topic, I don't know
what happens if you use:
set the script of fld "content" to the script of btn "wijzigen"
but it might work, give it a try!
:D
andre
>
--
Andre Alves Garzia ð 2004 ð BRAZIL
http://studio.soapdog.org
More information about the use-livecode
mailing list