What am I doing wrong here? - Forum

Forum Navigation
You need to log in to create posts and topics.

What am I doing wrong here?

I'm trying to get all the folders in a location into a ListBox, but I'm only getting the first folder. I've checked that it displays the folder variable count correctly in the debugger.

:OppdaterNotatMapper
FileList "[PubDir]Data\Notater\" "Folders" "[NotatMapper]"
If "[NotatMapper]" "<>" "True"
   ListBoxDeleteItem "Notater" "1"
   ListBoxSize "Notater" "[AntallMapper]"
   StrParse "[NotatMapper]" "[#13]" "[Mapper]" "[x]"
   Loop "1" "[AntallMapper]" "[i]"
        ListBoxAddItem "Notater" "0" "[Mapper[i]]"
   EndLoop
   .ListBoxSort "Notater" "True"
EndIf
Return

 

FileList "[PubDir]Data\Notater\" "Folders" "[NotatMapper]"
If "[NotatMapper]" "<>" ""
   SetObjectCaption "Notater" "[NotatMapper]"
   ListBoxSize "Notater" "[AntallMapper]"
   ListBoxSort "Notater" "True"
EndIf

 

Or

FileList "[PubDir]Data\Notater\" "Folders" "[NotatMapper]"
If "[NotatMapper]" "<>" ""
   .ListBoxDeleteItem "Notater" "1"
   SetObjectCaption "Notater" ""
   .ListBoxSize "Notater" "[AntallMapper]"
   StrParse "[NotatMapper]" "[#13]" "[Mapper]" "[x]"
   Loop "1" "[AntallMapper]" "[i]"
        ListBoxAddItem "Notater" "0" "[Mapper[i]]"
   EndLoop
   ListBoxSize "Notater" "[AntallMapper]"
   .ListBoxSort "Notater" "True"
EndIf