[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: How know what functions are defined in a lua script ?
- From: Christophe Gimenez <chris@...>
- Date: Wed, 29 Mar 2000 14:04:47 +0200
Don't know but your first idea is good for me ...
Here is what I will do :
if strsub(funcname,0,3) == 'on_' then
Then, for an incoming event I'll just have to see if a qualified handler exist for that object...
De: Vincent Penquerc'h [SMTP:firstname.lastname@example.org]
Date: mercredi 29 mars 2000 11:38
A: Multiple recipients of list
Objet: RE: How know what functions are defined in a lua script ?
> It sounds like you'd be better off using a table to contain each
> function and all the argument
> information you want.
I think the original poster did want to find out which functions
were added, without a registration system, and I think this table
would count as a registration system. But indeed, it would be
much simpler to do that...
To the original poster:
Or, without registration again, why not impose a naming convention,
a little like C++ name decoration, which adds characters to a
function name based on the parameters it expects...
Would this be too cumbersome ? And it looks like the beginnings
of registration too...