Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Open multiple methods with Document View
Message
From
08/08/2002 14:17:12
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00687310
Message ID:
00687654
Views:
16
But aren't you glad he did?!!! I am! :o)
Tracy

>Gee Dave, I didn't mean for anyone to go and write a program for it. I can wait for VFP 8 (or more likely 9). :)
>
>Of course since you did go through the effort, I'll play around with what you got here. Thanks for your time.
>
>
>BTW: Are you a fan of Lance? Ever see him riding around out there?
>
>
>Thanks again,
>
>- Brian
>
>
>
>Brian,
>>
>>The following code is about 98% of what's needed to do this.. the only errors I can't quite works past right now:
>>
>>1) if you have an object selected on a form and you run the code it doesn't open the right windows.
>>
>>2) it needs some more tweaking to get all the stuff right to work for a class of a classlib.
>>
>>To use it open a form in the designer and run the prg, it'll open a code window for every overridden method of the form and all the contained objects.
>>
>>I can maybe work on this a bit more tomorrow night.
>>
>>>Am I missing something, or is there some way to open mulitple Method/Event windows with Document View in VFP 7? I've tried every click-key combination that I can think of to no avail. Personally I think it would be nice to hold Shift+Left Click to open another Method window instead of changing the current one that's open...
>

>
>>
* OpenAllMethods.prg 08-Aug-02
>>
>>* this function opens all overridden methods
>>
>>local laJunk[1], loOutermost
>>
>>set step on
>>
>>=aselobj(laJunk,1)
>>
>>* filename, [classname] needed inside recursive function
>>
>>private lcFile, lcClass
>>
>>lcFile = upper( sys( 1271, laJunk[1] ) )
>>
>>* find the outermost object
>>
>>loOutermost = laJunk[1]
>>
>>if ( "VCX" $ lcFile )
>>   do while ( ( type( "loOutermost.parent" ) == "O" ) and ;
>>              ( type( "loOutermost.parent.parent.parent" ) == "O" ) )
>>      loOutermost = loOutermost.parent
>>   enddo
>>   lcClass = loOutermost.Name
>>else
>>   do while ( type( "loOutermost.parent" ) == "O" )
>>      loOutermost = loOutermost.parent
>>   enddo
>>endif
>>
>>DrillDown( loOutermost )
>>return
>>
>>function DrillDown( loObject )
>>
>>* find the full containership name
>>
>>local lcObjectName, loFullname
>>
>>lcObjectName = ""
>>loFullname = loObject
>>do while ( type( "loFullname.parent" ) = "O" )
>>   lcObjectName = loFullname.Name + "." + lcObjectName
>>   loFullname = loFullname.parent
>>enddo
>>
>>* strip off the outermost container
>>
>>lcObjectName = substr( lcObjectName, at( '.', lcObjectName ) + 1 )
>>
>>local i, n, laMembers[1], lcMethod
>>
>>n = amembers( laMembers, loObject, 1, 'C' )
>>
>>for i = 1 to n
>>   if ( laMembers[i,2] $ "Method Event" )
>>      lcMethod = lcObjectName + laMembers[i,1]
>>* debugout ">" + lcMethod + "<"
>>      if ( ".SCX" $ lcFile )
>>         modify form (lcFile) nowait method &lcMethod
>>      else
>>         modify class (lcClass) of (lcFile) nowait method &lcMethod
>>      endif
>>   endif
>>endfor
>>
>>* process contained objects
>>
>>n = amembers( laMembers, loObject, 2 )
>>
>>for i = 1 to n
>>   DrillDown( evaluate( "loObject." + laMembers[i] ) )
>>endfor
>>
>>return
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform