Reading ini file values into a combox-list

Discussion in 'Questions (Windows Mobile)' started by Softselect, Nov 14, 2007.

  1. Softselect

    Softselect Member Licensed User

    Hi Mastercoders,
    I am wanting to transfer values from a ini file into a combobox-list
    I am attaching my attempt
    Any better ideas ;)

    I am Finaly getting the hang of Basic4PPC, being self schooled on BBC Basic back in the eighties, this event driven concept is new to me.

    Thanks for all your help
    Friedrich
     

    Attached Files:

  2. specci48

    specci48 Well-Known Member Licensed User

    Hi Softselect,

    I don't know if it's a really better idea, but I would change your code to:
    Code:
    ...
    FileOpen(c2,
    "ring.ini",cRead)
    ring=FileRead(c2)
    Do While ring <> EOF        'loop to read till end of file
        sizepick.Add(&ring)       'adds string of ring to list
        ring=FileRead(c2)
        
    'Msgbox(ring,"value")     'used for debug
    Loop 
    FileClose(c2)
    ...
    so you don't need to exit the do...loop manually.


    specci48
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    Why do you add & before ring?
    Code:
    sizepick.Add(&ring)
    If you are working on the desktop you can set a breakpoint instead of using a msgbox.
     
Loading...