Hello,
Which version of the VFP do you use? You may do little trick in VFP8 with BINDEVENTS() function. It could look like:
You have dbf with fields ControlID, MethodID, mCode. When you scan this table, you look for the real control object with same controlID and create some oApp.aExternalEvents[x] = Createobject("conroller",ControlID,MethodID) object, and bind this control event to the controller object "onEvent".
Controller object is a custom class, and in the "OnEvent" method of this class you can search in the table This.ControlID, This.MethodID and if FOUND(), then EXECSCRIPT(mCode)
I do like this way... works great ;)
Denis
>Hello !!!!
>
> I can add method code at runtime ?????
>
> How.....????
>
> Thanks...
>
> Emilio G. Burgoa
> San Juan - Argentina
> egburgoa@hotmail.com
>
egburgoa@yahoo.com.ar