Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Control class problem
Message
From
21/11/2002 20:05:12
 
 
To
20/11/2002 21:45:04
Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00724519
Message ID:
00725563
Views:
8
As far as the debugger goes, you won't be able to see any PEMs of contained controls in a Control class externally regardless of the visibility.
e.g., In the Form designer for the form the Control class is on, look in the Properties Window drop-down - the contained controls don't show. Same goes for the debugger. The Control class "protects" the contained controls in this way. That it comes up in the textbox instance's GotFocus() surprises me, actually. (well, only a little...).

I'm not sure why the method call is failing though. I tried what I think is your scenario and it works just fine for me.

Just so I understand where the code is:
1) your base textbox has a protected MyMethod() method, and the GotFocus() here calls MyMethod
2) in a Control class, you have an instance of this base textbox. It has some code in it's GotFocus() plus a DoDefault() to the base method.

couple of things I'd try (if you haven't already):
(1) This is a SWAG, but you have the code in the base GotFocus() in an With...EndWith - what happens if you take the code out of that and simply use this.MyMethod()? I seem to recall some nesting issue with code inside a With block in one object's method calling another object's method which also has a With block (even subclassed methods calling the dodefault() in the base)

(2) if you leave out (not comment out) the code in the textbox instance GotFocus() and just let the base GotFocus() run, what happens?

>This.Name produces an "Expression could not be evaluated" value in the debugger. Same goes for every other property that I try (width, top, height, etc).
>
>This is driving me crazy!!! What gives?
>
>Mike
>
>
>>In the debugger, you check the value of 'This' and it reports an object. Can you check the value of 'This.Name'?
>>
>>Alan
Insanity: Doing the same thing over and over and expecting different results.
Previous
Reply
Map
View

Click here to load this message in the networking platform