Hi Micha,
if I've understood what you mean, you want to assign to an event a function with a variable parameter... well, actually it's not supported but is easy to implement this feature.
Actually the function you assign is called with only one parameter, a table containing the member <id> and <event>, respectively the numeric id of the activated gadget and the event that has generated the function call, I can add another parameter that can be a custom table with your personal parameters.
In the meantime you can handle your functions using global variables and/or switching the right value checking the <id> of the activated gadget.
Supposing you have planned something like:
Gadget "ButtonA"
Code:
{ OnPushed = fPrintSomething("Something") }
Gadget "ButtonB"
Code:
{ OnPushed = fPrintSomething("Something else...") }
You can use this code:
Gadget "ButtonA"
Code:
{ OnPushed = fPrintSomething() }
Gadget "ButtonB"
Code:
{ OnPushed = fPrintSomething() }
Code:
function fPrintSomething(msg)
Local ButtonA_id = scui.GetIFOID("ButtonA")
Local ButtonB_id = scui.GetIFOID("ButtonB")
Local MyString = ""
Switch msg.id
Case ButtonA_id
MyString = "Something"
Case ButtonB_id
MyString = "Something else..."
EndSwitch
Print(MyString)
EndFunction
This is just an example, hope it can helps
Good coding
Fabio