[Gambas-user] file list in combobox
Peter Russell
spitzz992000 at ...43...
Tue May 2 19:54:01 CEST 2006
Hi all
Using Version 1.0.15
I actually resolved this but thought it may be an issue worth commenting on.
I had the following code in my program for getting a number of files from a directory with the extension ending in .z and then removing the extension.
*****************
sFiles = Dir("players", "*.z")
cboxPlayers.Clear
FOR EACH sFile IN sFiles
sName = Split(sFile, ".")
cboxPlayers.Add(sName[0],i)
INC i
NEXT
***********************
This ran fine until I created the exexcutable file where it crashed in this routine
The following changes fixed the crash.
********************
sPath = Application.Path & "/players"
sFiles = Dir(sPath, "*.z")
cboxPlayers.Clear
FOR EACH sFile IN sFiles
sName = Split(sFile, ".")
cboxPlayers.Add(sName[0],i)
INC i
NEXT
***************************
Strange! Hope this may help someone unless someone can enlighten me to a better way.
Oh by the way I'm new to the list and only been messing with gambas a short while. In one word! Fantastic. Thanks.
Regards Pete
---------------------------------
Get amazing travel prices for air and hotel in one click on Yahoo! FareChase
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20060502/9a6b1874/attachment.html>
More information about the User
mailing list