Hi!
For what you need this? There are always OOP-like approaches that does not require ANY assigning of code to method/event in run-time. There is a way to do this (described below), but it have limited capabilities and does not work for ActieX/OLE objects.
set procedure to MyHooks.PRG
loMyObject = thisform.TextBox1
thisform.AddObject("oHook","MyClass")
* MyHooks.PRG:
DEFINE CLASS MyClass AS Custom
oMyObject = loMyObject
procedure oMyObject.Valid
= messagebox("Something")
endproc
ENDDEFINE
HTH.
>Hi
>how to assign code to method in runtime?
>
>Thank you
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.