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.

    DirCreate("/My Documents/StructFiles")
    addpath="/My Documents/StructFiles/"

    Sub OpenFileSelected
    If FileExist (ffl) = true Then

    TxtProj01.textFileRead (c1)
    TxtDesc01.textFileRead (c1)
    TbUser.textFileRead (c1)
    TbDate01.textFileRead (c1)   
    =FileRead (c1): rr=r
    For 0 To rr
    =FileRead (c1)
    LBSelect01.Add (r)
    Next i   

    =FileRead (c1):rr=r
    For 0 To rr
    =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 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
    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 /
    Can you send me a zip file with your code and the file you are loading?
    Send to
  8. Rioven

    Rioven Active Member Licensed User

    Thanks Erel...code sent.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice