Can Handler Know What Params It Should Have

Mark Waddingham mark at livecode.com
Wed Feb 3 06:38:03 EST 2016


On 2016-02-02 17:05, Bernard Devlin wrote:
> I know the params can be called to find out what parameters were passed 
> to
> the handler when it is called. However, I'm wondering if a handler has 
> a
> way of knowing what parameters it had at the time it was defined.

There isn't currently a way to get this information, no.

We currently have 'the params' which returns a string form of the 
handlers invocation (which, is somewhat flawed as you can have array 
valued parameters, and strings containing quote), paramCount() which 
returns the number of parameters actually passed, and param(i) which 
returns the value (not converted to a string) of the i'th parameter 
passed to the current call.

Perhaps something like a 'paramName(i)' function?

Can you give more information about your use-case?

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




More information about the use-livecode mailing list