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

Hi

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

B4X:
var str = numeral(3000).format('0,0[.]00');

Then I remembered that there was something to Initialize JQuery and Leaflet being

B4X:
Dim J As BANanoObject
J.Initialize("$")

So I decide, let me try this idea out, so

B4X:
Dim N As BANanoObject
N.Initialize("numeral")

And I need to pass the value 3000 and then run format...

B4X:
Dim str As Object
str = N.Selector("3000").RunMethod("format",Array("0,0[.]00"))

Works like a charm.

Ta!
 
Top