B4J Question [BANano] Dim ... As Object is not supported

Kiffi

Well-Known Member
Licensed User
Longtime User
Hello,

this B4J-Code:
B4X:
Dim myArray() As String
Dim myObject As Object
is transpiled to this JS-Code:
B4X:
// [31]  Dim myArray() As String
_myarray=[];
// [31]  Dim myObject As Object
_myobject=// NOT SUPPORTED;

why isn't myObject transpiled to this one?
B4X:
_myobject={};

Thanks in advance & Greetings ... Peter
 

alwaysbusy

Expert
Licensed User
Longtime User
This looks right. Object is not supported by BANano. I use it in some methods, e.g. because a method can return several types and there is no casting like B4J (java) has.

E.g. in the RunInlineJavascriptMethod(), I have no idea what you will return. So you need to make the receiving variable the correct type.
 
Upvote 0
Top