Hi all,

# Other ways to manage Ref functions...

on mouseup
    put "hello" into arg1
    put "world" into arg2
    put "shout" into NameOfFunc
    answer value( format( "%s( %s, %s)", NameOfFunc, arg1, arg2 ) )
end mouseup

# Or substitute value & format with a dispatcher function

    answer dispatcher( NameOfFunc, arg1, arg2 )

 function dispatcher NoF, a1, a2
    return value( format( "%s( %s, %s)", NoF, a1, a2 ) )
 end dispatcher


# And a more generic dispatcher.....

    answer dispatcher2( NameOfFunc, arg1, arg2 )


 function dispatcher2 NoF
    put  NoF & "("  into tmp
    repeat with p=2 to the paramcount
       put quote & param( p)  & quote & ","  after tmp
    end repeat
    put ")" into last char of tmp
    return value( tmp )
 end dispatcher2


HTH,
Regards,
Thierry


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to