Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to define events code for AddObject controls.
Message
From
17/11/2000 18:44:52
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00442646
Message ID:
00443318
Views:
7
Well, you can't do what DBase did with codeblocks, but you can get part way there with my public domain CodeBlock VFP program. You could, for example, define a class of buttons that can be added to forms after the fact. Perhaps:
DEFINE CLASS AddableButton AS BUTTON
cClickCodeBlock = NULL
PROCEDURE CLICK
IF VARTYPE( THIS.cClickCodeBlock) = "C"
  = CodeBlock( THIS.cClickCodeBlock)
ENDIF
ENDPROC
Then, even though you can add a method after the fact, this class allows you to add code as a *property*. Requires of course that you have CodeBlock (available here) in your project.

-- Randy
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform