Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with child class
Message
From
13/12/2006 13:03:17
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
13/12/2006 11:06:06
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgia, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01177142
Message ID:
01177291
Views:
13
>Mike,
>I am a little confused by your reply. Do you mean that if I edit the class and press any key while it is open and then save it, then the default will no longer fire. Or do you mean that if I edit the class, do not hit any key, and then save it the default will no longer fire.

Define default. The default is to run any code that's in the method (even if it's the Lparameters line alone), or parent code if there's no code at this level.

The automatic insertion of the lparameters line is there to help you - I know it helps me a lot, because I can't possibly remember the parameters for all methods, and it's surely faster than having to open the parent method, which was actually hard to do prior to VFP7 (or so), before we had that "view parent code" button.

Now it all comes to what do you do next. If you close that window without saving, the line is gone, you haven't touched anything. If you save that particular piece of code (by pressing ctrl+s or ctrl+w while it's open), VFP can only think you did that intentionally. I sometimes do that - when I specifically want to disable a method, though I rather replace the line with just a comment, like "* override - don't need this to run here".

>I understand that a space, tab, or enter key will fool the compiler into thinking something is there, but when I opened this the cursor was blinking at the end of the parameter with nothing in between. In any case, this is a good argument for requiring something like an 'override' keyword. The 100 or so customers that downloaded this update will have a difficult time understanding that their application no longer functions correctly even though no code was changed ( at least not willingly ).

Ouch. This did bite you.

So you accidentally saved the method which you shouldn't have. From my experience with other languages, there are numerous ways to shoot your foot in each.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform