Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compare Two Forms
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01153700
Message ID:
01156812
Views:
21
Russell,

Ok I finally got around to digging this up. This is for the VFP9 version of the code, but it should be the same all the way back to all versions of the class browser.

At the bottom of browser.prg add this function:
function SortMethods( lcMethodCode )

local lcStr, i, j, n, lcMethodName, lnSelect

lnSelect = select()
create cursor methods ( methodname c(64), methodcode m )

lcStr = lcMethodCode
do while ( ! empty( lcStr ) )
   i = at( "ENDPROC", lcStr )
   lcMethodCode = left( lcStr, i+8 )
   lcStr = substr( lcStr, i+9 )
   n = alines( laMethod, lcMethodCode )
   for i = 1 to n
      if ( at( 'PROCEDURE', laMethod[i] ) = 1 )
         lcMethodName = alltrim( substr( laMethod[i], 11 ) )
         exit
      endif
   endfor
   insert into methods values ( lcMethodName, lcMethodCode )
enddo

select methodcode, upper( MethodName ) as MethodName ;
   from methods ;
   into cursor methods2 ;
   order by 2

select methods2
lcStr = ""
scan
   lcStr = lcStr + methods2.methodcode + chr(13) + chr(10) + chr(13) + chr(10)
endscan
lcStr = left( lcStr, len( lcStr ) - 4 )
lcStr = strtran( lcStr, chr(9), "   " )
use in methods
use in methods2
select (lnSelect)
return lcStr
There are two places in browser.prg where FormatMethods() is called that need to be changed:
...
   lcMethods = SortMethods( lcMethods )
   lcAppendDefineCode=lcAppendDefineCode+toBrowser.FormatMethods(lcMethods)
...
   lcMethods = SortMethods( lcMethods )
   lcMethods=toBrowser.FormatMethods(lcMethods)
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform