Hi Shield In what way would it be useful as you say currently it would be for you? can you give us an example so i can see if i think that would be useful for me

.
When i use say droopy libs and sometimes i forget the return type (maybe it some code ive come back too etc ) I use this tool, a quick listview that shows returnable procedures and type in the current file.
pbide tool:
ProgramParameter(0) = "%FILE"
ProgramParameter(1) = "%TEMPFILE"
shortcut: Left-Ctrl+\
Zebuddi.
Code: Select all
EnableExplicit
Global Window_0, ListIcon_0, Filename$=ProgramParameter(0) , TmpFilename$=ProgramParameter(1)
Define NewList entries.s(), event.i
Procedure DoTypes(Filename$, List entries.s())
Protected regex_proctype, *mem, buffer.i, FileString$, spos.i, epos.i, procname.s, type.s, retstring.s, nbr.i, i.i
regex_proctype.i = CreateRegularExpression(#PB_Any, "(ProcedureC\.|Procedure\.|ProcedureCDLL\.|ProcedureDLL\.)[scbwliqfdau]\s.+?\(.*\)")
Dim pt$(0)
If ReadFile(0,Filename$)
*mem=AllocateMemory(Lof(0))
If *mem
buffer=ReadData(0, *mem, Lof(0))
FileString$=PeekS(*mem)
nbr=ExtractRegularExpression(regex_proctype, FileString$, pt$())
If nbr>0
For i=0 To nbr-1
If FindString(pt$(i), Chr(46))
spos=FindString(pt$(i), Chr(46)) ; find the point
epos=FindString(pt$(i), Chr(40) , spos+1) ; find the brace
type=Mid(pt$(i), spos+1, 1) ; this is the return type
procname=Mid(pt$(i), spos+3) ; this is the procedure name
If type
Select type
Case "s"
type="String"
Case "c"
type="Character "
Case "b"
type="Byte"
Case "w"
type="Word"
Case "l"
type="Long"
Case "i"
type="Integer"
Case "q"
type="Quad"
Case "f"
type="Float"
Case "d"
type="Double"
Case "a"
type="Ascii"
Case "u"
type="Unicode"
EndSelect
AddElement(entries())
entries()=procname+Chr(10)+type
EndIf
EndIf
Next
SortList(entries(), #PB_Sort_Ascending)
EndIf
EndIf
CloseFile(0)
FreeRegularExpression(regex_proctype)
FreeArray(pt$())
FreeMemory(*mem)
If nbr=0
MessageRequester("Error", "No Procedure/s With Return Types Found")
End
EndIf
EndIf
EndProcedure
Procedure OpenWindow_0(x = 0, y = 0, width = 560, height = 310)
Window_0 = OpenWindow(#PB_Any, x, y, width, height, "Procedure Return Types", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)
CreateStatusBar(0, WindowID(Window_0))
AddStatusBarField(50)
StatusBarText(0, 0, "Entries:")
AddStatusBarField(510)
ListIcon_0 = ListIconGadget(#PB_Any, 0, 7, 560, 280, "Nbr", 50, #PB_ListIcon_GridLines)
AddGadgetColumn(ListIcon_0, 1, "Procedure", 410)
AddGadgetColumn(ListIcon_0, 2, "Ret Type", 100)
EndProcedure
Procedure Window_0_Events(event, List entries.s())
Select event
Case #PB_Event_CloseWindow
FreeList(entries())
ProcedureReturn #False
Case #PB_Event_Menu
Select EventMenu()
EndSelect
Case #PB_Event_Gadget
Select EventGadget()
EndSelect
EndSelect
ProcedureReturn #True
EndProcedure
Procedure Main(List entries.s())
OpenWindow_0()
StickyWindow(Window_0, 1)
ForEach entries()
AddGadgetItem(ListIcon_0, -1, Str(ListIndex(entries())+1)+Chr(10)+entries())
Next
StatusBarText(0, 1 ,Str(ListSize(entries())))
EndProcedure
If Filename$
DoTypes(Filename$, entries())
Main(entries())
ElseIf TmpFilename$
DoTypes(TmpFilename$, entries())
Main(entries())
Else
End
EndIf
Repeat
event = WaitWindowEvent()
Until Window_0_Events(event,entries()) = #False
End