iOS Question How do I dynamically load an action sheet?

davepamn

Active Member
Licensed User
Longtime User
B4X:
        Dim oItems As List
        Dim arrGroups() As String
        oItems =p.NextArray

        For i = 0 To oItems.Size - 1
            oRowMap=oItems.Get(i)
            sValue =oRowMap.Get("sValue")
            sDescription=oRowMap.Get("sDescription")

            .... Redim Preserve gives me a syntax error

        Next

        ashGroups.Initialize("Groups","Pick A Group","Cancel",arrGroups)

I am getting an error, Redim is undeclared

Is Redim not available in b4i
 
Last edited:

davepamn

Active Member
Licensed User
Longtime User
B4X:
    Dim oGroupsList As List
    oGroupsList.Initialize
   oGroupsList.AddAll(Array As String())

   oItems =p.NextArray
   For i = 0To oItems.Size - 1
       oRowMap=oItems.Get(i)
       sValue =oRowMap.Get("sValue")
       sDescription=oRowMap.Get("sDescription")
        oGroupsList.add(sValue & "-" & sDescription)
    Next

    ashGroups.Initialize("Groups","Pick A Group","Cancel","",oGroupsList)
    ashGroups.show(page3.RootPanel)

I found a code sample that shows how to type cast a list to a string type
 
Last edited:
Upvote 0
Top