not functioning on device

Rioven

Active Member
Licensed User
Hi, need help/advice...
not sure what went wrong. On desktop is ok but not on device.

following are excerpt from my code where I thought the problem is...
this is the listbox "LBProcess01" which is become blank on the device.(see 2nd to last code line).The other textboxes have no problem.


PHP:
.
.
.
DirCreate("/My Documents/StructFiles")
addpath="/My Documents/StructFiles/"
OpenFileSelected
.
.
.


Sub OpenFileSelected
ffl=addpath&filebox1.text&".txt"
If FileExist (ffl) = true Then

           FileOpen (c1,ffl,cRead)
           
         TxtProj01.text= FileRead (c1)
                       TxtDesc01.text= FileRead (c1)
         TbUser.text= FileRead (c1)
         TbDate01.text= FileRead (c1)   
            
LBSelect01.clear         
r=FileRead (c1): rr=r
   For i = 0 To rr
   r=FileRead (c1)
   LBSelect01.Add (r)
   Next i   


LBProcess01.Clear         
r=FileRead (c1):rr=r
   For i = 0 To rr
   r=FileRead (c1)
   LBProcess01.Add (r)  'NOT REGISTERING ON DEVICE???
   Next i   
.
.
.
 

Rioven

Active Member
Licensed User
Thanks Erel, it seems working now by changing the "/" with "\"
Strange though...other listbox is ok...
thanks again!
 

Rioven

Active Member
Licensed User
Oh No, problem still there!
any other advice?
 

Cableguy

Expert
Licensed User
maybe one of the "r" variables is getting "Out of bounds"....
since the r and rr are used in both for...next loops, maybe one of the previous loops are beeing stored...

One more thing..
if your first fileread return 10, then in order to loop 10 times either star from 1 to rr or from 0 to rr-1

Try using diferent letters for the vaiables...
 

Rioven

Active Member
Licensed User
Thanks Cableguy,

I also suspected the problem with the listbox.add or is reading the r which may not be a numeric character which returns 0 that used range in for..next?
Maybe I'll try to make some workarounds on my codings.

Since I don't know yet those incompatibilities or rules B4PPC between device and desktop, I think need to read and learn more. Do we have forum threads for this?
 

Rioven

Active Member
Licensed User
Thanks Erel...code sent.
 
Top