Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

change events outside the class

Status
Not open for further replies.

SYN

Programmer
Nov 2, 2000
45
NL
I'm rewriting fox2x-source to vfp8. A lot of @Get's has to be 'transformed' into for example textboxes. Most old @get's have valid and when parameters. I want to create 1 textbox class for these @get's.
The valid and when events are readonly. Is there a possibiliy to use my old valid parameters (in a string) and bind these to the valid event? I don't want and simply can't make for each @get a new class.

Suggestions?


 
the parameters being sent in would have to be literals or be public variables I guess. Then you could just pass a single string into the valid event of your textbox class and parse that string apart in your valid event to the individual parameters sent in and then use Evaluate() to get the values of those parameters or Macro substitution (&) in order to work directly with those variables...seems like a bit of a mess and there are probably better ways to handle this, but in answer to your question it can be done.

Since you are taking the time to rewrite the fox 2.x program why not move the code (and parameters) to events like lostfocus (for textboxes) and click (for commandbuttons) and do it right. You'll be happier later that you took the time... take it from someone who has done lots of conversions. Get rid of the formsets and pageframes the converter creates while you are at it and use regular forms. :)

Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
I tried this and works Ok for me. Thanks.
 
SYN,

Glad I could help. :)

Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top