Wish [BANano] [SOLVED]- 1.21 Map Object Enhancements

Discussion in 'B4J Bugs & Wishlist' started by Mashiane, Jan 5, 2019.

  1. Mashiane

    Mashiane Expert Licensed User

    Hi there

    The B4J Map object has two properties

    1. Keys
    2. Values

    Just learned the hard way that, the BANano map.Keys values returns the actual map object whilst the Values returns an error. If these might not work as expected, perhaps the logs should reflect an error that one should use GetKeyAt and GetValueAt instead.

  2. alwaysbusy

    alwaysbusy Expert Licensed User

    Please report all BANano errors in the questions forum and not in the B4J bug forum! Also provide sample projects that reproduce the error.
    Mashiane likes this.
  3. alwaysbusy

    alwaysbusy Expert Licensed User

    Should be fixed in 1.27
  4. Mashiane

    Mashiane Expert Licensed User

    Just found something else whilst trying to work on themes...

    Dim fName As String = "Anele"
    Dim sName As String = "Mbanga"
    Dim a As Map = CreateMap("firstname":"Anele Mbanga","surname":"Mbanga")
    Dim b As Map = CreateMap("firstname":fName,"surname":"Mbanga")
    Dim c As Map = CreateMap("firstname" : fName, "surname" : "Mbanga")
    The first (a) and the last maps (c) work, the second one (b) returns an error of 'fname' not defined. The only difference between the b and the c map is the spacing.
  5. Mashiane

    Mashiane Expert Licensed User

    Im also trying to access Map objects between different classes and or modules. Whilst a map will work perfectly inside its own defined class, getting it from another class returns a blank object {} and also running .ContainsKey always returns false.

    Executing Log(m) gets executed to the B4J logs and not on console.log()

  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