Function Parameter Issue
Sora574
07 May 2013, 03:37I think this would be easier if I start with where this issue arises...
Let's say you want a function that does something and then runs a script that you set.
This is easy enough, even with the GUI. All you have to do is add an extra parameter and name it 'script' or something, and at the end of the function, invoke it. Example:
This isn't a problem. However, if you try to call the function with the GUI, it doesn't allow you to add a script to it. Even if you go into code view and do something like this
When you go back to the GUI, all it will say in the parameters box is "Blah".
This isn't a huge problem, and I don't think it actually removes the script (it just hides it), but it's a little irritating to go into the code view every time you have to change the script.
Let's say you want a function that does something and then runs a script that you set.
This is easy enough, even with the GUI. All you have to do is add an extra parameter and name it 'script' or something, and at the end of the function, invoke it. Example:
<function name="TestFunction" parameters="msg, script">
msg (msg)
invoke (script)
</function>
This isn't a problem. However, if you try to call the function with the GUI, it doesn't allow you to add a script to it. Even if you go into code view and do something like this
TestFunction ("Blah") {
msg ("Blah blah.")
}
When you go back to the GUI, all it will say in the parameters box is "Blah".
This isn't a huge problem, and I don't think it actually removes the script (it just hides it), but it's a little irritating to go into the code view every time you have to change the script.

jaynabonne
07 May 2013, 13:08You *could* hang the script off an object as a holder. Then you can easily edit the script in the usual way, and when you call the function just do something like:
I know, doesn't address exactly what you meant - more works around it. But it's a way to stay in the GUI.
TestFunction("Blah", object.blahScript)
I know, doesn't address exactly what you meant - more works around it. But it's a way to stay in the GUI.
Sora574
07 May 2013, 20:03I thought about that, but... It pretty much defies the purpose of using the {}'s at all.
Is there a way to add something to the scripts list without having a library? Or at least make an editor for a function?
Is there a way to add something to the scripts list without having a library? Or at least make an editor for a function?