Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Supercls problem
Message
From
05/05/1998 13:01:31
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00096692
Message ID:
00097083
Views:
23
Thanks David -

I'll take a look at your code. This is a problem for me as I'm still adding and tinkering with classes, so frequently have to get out of my code and go look at the class code to remember what the heck it does.

Sylvia

>Sylvia,
>
>Personally I've never found much use for supercls as a tool. I thought the new autocomplete stuff was worth a look but wasn't really happy with the way it worked and didn't want to spend the rest of the time getting it to work in my normal way of working in VFP which has various windows open.
>
>Here's the code I was tinkering with in the superclassbutton.GetWinOnTop with some limited amount of success, but it's pretty hard to follow all the code.
>
LOCAL lcWinOnTop,lcWChild,lnCount
>
>lcWinOnTop=""
>FOR lnCount = 0 TO WCHILD()
>	lcWChild=WCHILD(lnCount)
>	debugout debstr( lcWChild, lncount )
>	if ( ( "PROJECT MANAGER - " $ lcWChild ) or ;
>	     ( "FORM CONTROLS" $ lcWChild )  or ;
>	     ( "Command" == lcWChild ) or ;
>	     ( "SUPERCLASS" == lcWChild ) or ;
>	     ( "DEBUGGER" == lcWChild ))
>	   loop
>	endif
>*	IF EMPTY(lcWChild)
>*	debugout "would exit"
>*		EXIT
>*	ENDIF
>   if ( ! empty( lcWChild ) )
>      lcWinOnTop = lcWChild
>   endif
>ENDFOR
>debugout debstr( lcWinOnTop, wchild() )
>RETURN lcWinOnTop
>
>>I just tried that and got the same result. However, when I opened a test form, put some of the same buttons on it from one of the classes, and then tried to run Supercls, it did work fine (except for one thing which I'll ask you about shortly). So, evidently my problem is related to what you suggested, but slightly different...
>
>>Re: the 'other thing' I could see the parent class code for one of the classes, but not another. The one which isn't working does have code in the click event of the class, but when I try to look at it I get the message "Supercls code cannot be found". In looking at the difference between the two classes, the one which isn't working is a button (in a container class) whose parent is commandbutton. Do you know whether Supercls doesn't work if the parent class is the base class?
>
>The code used GETPEM() to get at the method code does not return the methods of contained objects. It's a limitation of the function.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform