map

  1. C

    Android Question CLV , CreateMap - How i can get the specific Values

    I need to get the values that are mapped and do a routine to assign these values in a normal lstview. but I always return the last value in the index. and also I did not understand how I can pull the keys of the created map and assign to the item of the listview. 'dim mapaEscalonado as map...
  2. S

    B4A Class Get value from complex structure (combination of map, list, array)

    Hello, This is a module code to retrieve value from complex structure (combination of list, map, array and primitives types). Give the path with a dot (.) separator to get the value or the default value if not accessible. example : m=createmap("Name":"John" ,"Friends":array as...
  3. Multiverse app

    Android Question map assignment question

    I have a simple question. Dim mapGlobal As Map mapGlobal.Initialize mapGlobal.Put("Key1", "Value1") map2=mapGlobal Does the "=" the pass the reference of the mapGlobal to map2 or creates an object at new memory location?
  4. Mashiane

    B4J Question [BANano] [SOLVED] Map.IsInitialized Inclusion on map keys

    Hi there I was just cleaning my project and removed all .clear methods for my maps as I noted in the transpiled code that clearing them was not necessary due to to .initialize method just after 'dim m as map', thing is this has resulted in something else. This is what happens... When maps are...
  5. Mashiane

    B4J Question How to detect the variable type of a map value?

    Ola How do I determine the type of value a map value is e.g. string, map, list, int, float etc Is it possible? Thanks
  6. K

    Android Question list.size slowing down app

    I have json file which contain nearly 37000 record when I'm using : Dim list1 As List list1 = json.NextArray Dim exact_record As Int exact_record = list1.Size It slow down app. this work fine : Dim exact_record As Int exact_record = 38000 what i'm doing wrong?
  7. Maodge

    Android Question [solved]question on "Null"

    pls look at the following code dim map1 as map dim s as string dim o as object map1.Initialize map1.Put("4","d") map1.Put("1","a") map1.Put("101","a") s = map1.get(1) ' s = null o = map1.Get(1) 'o = null If s<> Null Then Log("s is not null") Else Log("s...
  8. nibbo

    Android Question List key sequence

    Hi All I use a webservice to return JSON data which looks something like: Data:[{"col1":"value1","col2":"value2","col3":"value3","col4","value4"}{…etc...}] I store save the above to the list: dim recordList = root.Get("Data") I then iterate through the list using: For i = 0 To recordList.Size...
  9. Pete_S

    Android Question Save Map To KeyValueStore, Load Map From KeyValueStore

    I created this code. It works but I was wondering if there is an easier/optimized way to save a map to a KeyValueStore and retrieve it back from the KeyValueStore. Main: Sub Process_Globals End Sub Sub Globals End Sub Sub Activity_Create(FirstTime As Boolean) Dim map1 As Map...
  10. analizer3816

    Android Question cannot get data in List & Map from java library

    I can't get size or data in list and map from java lib [I need java lib + b4a and use list in map , map in map, map in list or list in list] please suggest me for fixed this problem thanks this is my test lib java library code: ackage testlib; import anywheresoftware.b4a.BA; import...
  11. LucaMs

    Android Question JSON & Maps

    JSON generator / parser seems to convert maps' keys to string: Dim mapSource As Map mapSource.Initialize Dim i As Int For i = 1 To 3 mapSource.Put(i,i) Next Dim jg As JSONGenerator jg.Initialize(mapSource) Dim sJSON As String = jg.ToString Dim...
  12. LWGShane

    Other [B4X] GetIfExists for Map [Map.Get already does this]

    Here's a little piece of code that allows you to get a Key from the provided map. If the map doesn't contain the key then it'll return null. Private Sub GetIfExists (SourceMap As Map, Key As Object) As Object If SourceMap.ContainsKey(Key) Then Return SourceMap.Get(Key) Else...
  13. MarkusR

    Android Question [solved] EncryptText String in Map

    hello, i try to Encrypt a string into a map Password key. i will use WriteMap for saving then i will use ReadMap and Decrypt the key Password back into original but decrypt did not work and run into error^^ code modul start with Test 'Code module 'Subs in this code module will be accessible...
  14. FERNANDO SILVEIRA

    Android Question Problem using list / map

    Hello guys, I've seen this issue in many other threads here, but now that I need it I'm unable to find the answer. I cast labels on the activity and want to save their information for later retrieval (.text, .left, .top, etc). I created a map with the fields I want to save. I lstLetters.add...
  15. LucaMs

    Android Question AnotherDatePicker (B4X) error r/w to a Map

    I'm using a Map to save a date (long) selected with AnotherDatePicker. When I read the map I get "strange" error (set a breakpoint on line 67 - Dim lngDate...).
Top