iOS Question CustomListView does return the correct Index and Value

Discussion in 'iOS Questions' started by Keith Yong, Jul 7, 2018.

  1. Keith Yong

    Keith Yong Member Licensed User

    Hi,

    I build a library for dialog for my own use. In the dialog has customlistview, when i click on the customlistview, it doesn't return the correct index, it always return the last index that i added.

    2nd issue, as you can see the attachment picture. The header is not under customlistview, but when i click on the header, it did fire the customlistview_itemclick

    I attach here a coding, can you let me know what am i did wrong?
     

    Attached Files:

  2. Erel

    Erel Administrator Staff Member Licensed User

    The first step is to remove the old CustomListView module and only use xCustomListView library.
     
  3. Keith Yong

    Keith Yong Member Licensed User

    In the project i didn't include the CustomListView and already use xCustomListView library, but the problem remain the same.
     
  4. Keith Yong

    Keith Yong Member Licensed User

    It seem working fine now after remove the CustomListView class permanently from the folder. Thanks for your help.
     
  5. Keith Yong

    Keith Yong Member Licensed User

    i think something wrong somewhere. I did not make changes and the customlistview back to problem again. As you can see the attachment, i'm actually click on the header, but last row was selected.

    Just now was working fine for a while...:(
     

    Attached Files:

  6. Erel

    Erel Administrator Staff Member Licensed User

    1. I recommend you to use the visual designer to create the layout. It will be simpler and more flexible. You shouldn't assume that the page size is constant.

    2. Never initialize an object and then assign a new object to the same variable:
    Code:
    Dim m As Map: m.initialize
           m = Lst.Get(i)
    It should be:
    Code:
    Dim m As Map = Lst.Get(i)
    This code:
    Code:
    Dim mDlg As Map: mDlg.Initialize
       mDlg.Put(
    "Value""444")
       mDlg.Put(
    "Display""444")
       lstDlg.Add(mDlg)
    Can be written like this:
    Code:
    lstDlg.Add(CreateMap("Value""444""Display""444"))
    It is shorter and safer.


    I ran your project and wasn't able to reproduce the issue you described.
     
  7. Keith Yong

    Keith Yong Member Licensed User


    Thanks for your advise. Actually i remove the control virtual designer and re-put it again, now is working fine after several test..:)
     
Loading...
  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