METHOD FillFuncList() CLASS TFivedit
local nLines := ::oEditor:GetLineCount(), n
local aFuncs := {}, aTemp := {}, cToken, cLine
local a, nItem := 0
::aFunLines = {}
for n = 1 to nLines
cToken = Lower( Left( cLine := LTrim( ::oEditor:GetLine( n ) ), 4 ) )
if cToken $ "static func,func,proc,clas,meth,hb_f"
AAdd( aTemp, { cLine, n, n, Upper( cLine ) } )
endif
if cToken $ "retu" .or. Left( cToken, 1 ) == "}"
if ! Empty( ATail( aTemp ) )
ATail( aTemp )[ 3 ] = n
endif
endif
next
ASort( aTemp,,, { | x, y | x[ 1 ] < y[ 1 ] } )
for n = 1 to Len( aTemp )
AAdd( ::aFunLines, { aTemp[ n ][ 2 ], aTemp[ n ][ 3 ] } )
next
ASort( aTemp,,, { | x, y | x[ 4 ] < y[ 4 ] } )
for n = 1 to Len( aTemp )
AAdd( aFuncs, aTemp[ n ][ 1 ] )
next
::oFunList:SetItems( aFuncs )
return nil
METHOD FillFuncList() CLASS TFivedit
local nLines := ::oEditor:GetLineCount(), n
local aFuncs := {}, aTemp := {}, cToken, cLine
local a, nItem := 0
::aFunLines = {}
for n = 1 to nLines
cToken = Lower( Left( cLine := LTrim( ::oEditor:GetLine( n ) ), 4 ) )
if cToken $ "static func,func,proc,clas,meth,hb_f"
AAdd( aTemp, { cLine, n, n, Upper( cLine ) } )
endif
if cToken $ "retu" .or. Left( cToken, 1 ) == "}"
if ! Empty( ATail( aTemp ) )
ATail( aTemp )[ 3 ] = n
endif
endif
next
ASort( aTemp,,, { | x, y | x[ 4 ] < y[ 4 ] } )
for n = 1 to Len( aTemp )
AAdd( ::aFunLines, { aTemp[ n ][ 2 ], aTemp[ n ][ 3 ] } )
AAdd( aFuncs, aTemp[ n ][ 1 ] )
next
::oFunList:SetItems( aFuncs )
return nil
METHOD FillFuncList() CLASS TFivedit
local nLines := ::oEditor:GetLineCount(), n
local aFuncs := {}, aTemp := {}, cToken, cLine
::aFunLines = {}
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 35 guests