not functioning on device

Discussion in 'Questions (Windows Mobile)' started by Rioven, Aug 15, 2007.

  1. Rioven

    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.textFileRead (c1)
                           
    TxtDesc01.textFileRead (c1)
             
    TbUser.textFileRead (c1)
             
    TbDate01.textFileRead (c1)   
                
    LBSelect01.clear         
    r
    =FileRead (c1): rr=r
       
    For 0 To rr
       r
    =FileRead (c1)
       
    LBSelect01.Add (r)
       
    Next i   


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

     
  2. Erel

    Erel Administrator Staff Member Licensed User

    I'm not sure if that is the problem but you shouldn't not set the value of AppPath.
    It is a reserved keyword.
    Another thing is that you should use \ instead of / for the folders.
     
  3. Rioven

    Rioven Active Member Licensed User

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

    Rioven Active Member Licensed User

    Oh No, problem still there!
    any other advice?
     
  5. Cableguy

    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...
     
  6. Rioven

    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?
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    There is no problem with sharing the same variables in several loops / for...next.
    Can you send me a zip file with your code and the file you are loading?
    Send to erel@basic4ppc.com
     
  8. Rioven

    Rioven Active Member Licensed User

    Thanks Erel...code sent.
     
Loading...