B4J Code Snippet [BANano]: Executing code without using BANano.Eval

Discussion in 'B4J Code Snippets' started by Mashiane, May 1, 2019.

  1. Mashiane

    Mashiane Expert Licensed User

    Hi

    So here I am trying to figure out how I will execute this code.

    Code:
    var str = numeral(3000).format('0,0[.]00');
    Then I remembered that there was something to Initialize JQuery and Leaflet being

    Code:
    Dim J As BANanoObject
    J.Initialize(
    "$")
    So I decide, let me try this idea out, so

    Code:
    Dim N As BANanoObject
    N.Initialize(
    "numeral")
    And I need to pass the value 3000 and then run format...

    Code:
    Dim str As Object
    str = N.Selector(
    "3000").RunMethod("format",Array("0,0[.]00"))
    Works like a charm.

    Ta!
     
    joulongleu likes this.
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