Android Question How to get the map in the map ?

Discussion in 'Android Questions' started by fash866, Apr 19, 2015.

  1. fash866

    fash866 Member Licensed User

    please see my code:
    Dim test As Map
    Dim test2 As Map
    Dim ok As Map

    Dim ok2 As Map
        ok2 = ok.Get(
    "c"' Here is the wrong code, How to get the "test2"
  2. DonManfred

    DonManfred Expert Licensed User

    Did you get any error message? WHAT ERROR MESSAGE?????

    To save a map in a map you need to write and read a OBJECT
    Writemap does only work on primitives int, long, real, string

    Use Keyvaluestore and write (and reread) the map with
    ' write the map

    ' read the map
    dim m as map =  kvs.GetObject("map")
    Last edited: Apr 19, 2015
  3. NJDude

    NJDude Expert Licensed User

    You are not initializing the "ok2" map.
    lemonisdead likes this.
  4. fash866

    fash866 Member Licensed User


    Attached Files:

  5. Erel

    Erel Administrator Staff Member Licensed User

    File.ReadMap returns a map with strings (as File.WriteMap creates a text file).

    You should use KeyValueStore class instead.
    fash866 likes this.
  6. Troberg

    Troberg Well-Known Member Licensed User

    No need to initialize it if you are assigning an initialized map to it.

    Simplified example, this is perfectly valid:
    Dim map1 as Map

    Dim map2 as Map
  7. fash866

    fash866 Member Licensed User

    Yes ! I need it!
  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