Reference Function Name Via Variable?
briany at qldlearning.com
Thu Jan 15 22:56:25 EST 2009
I think the two major options - do / value or using an extra parameter
are already out there, but one more pattern that might work for you is
something like this:
put someFunction(a, b, c) into someValue
You would call setFunctionMode once, and until you changed it again,
your generic function would operate in that mode. This could work well
if you want to be able to flip modes for a whole stack at a time. If
you want to mix a lot of custom functions all at once, it's probably
easier to just use an extra parameter.
> Recently, Mark Schonewille wrote:
>> The easy way to do this might be to use a custom property instead
>> of a
>> function. Get the someProperty[pData1 & cr & pData2] of me. Perhaps
>> someProperty[pData1][pData2] works too, I haven't tried that yet.
>> again, why don't you simply put the function into a backscript?
> Hi Mark:
> I'm trying to be economical. I have about 12 functions that do
> processing routines but they all use the same parameters. I want to
> be able
> to programmatically call the name of each function using a
> combination of
> variables, so I can end up using one master function to handle all 12.
> Scott Rossi
> Creative Director
> Tactile Media, Multimedia & Design
More information about the Use-livecode