B4J Question [BANano] running example Server Client project fails (version 1.05)

mindful

Active Member
Licensed User
Hello, I wanted to try the new BANano framework and I can't get it to run :(

I installed the chrome local web server which works but when I access the localhost:8887/client.html it gives an error in console:

The error is : Uncaught SyntaxError: Unexpected identifier

And it is raise at : if (await banano_isconnectedWait()) { from the code below:
B4X:
// [58] public Sub Login_Clicked(event As BANanoEvent) 
this.login_clicked= function(_event) {
if (self==null) self=this;
var _token;
// [59]  Dim Token As String = BANano.GetCookie( {45} ) 
_token=(Cookies.get("BANanoDemoCookie") || '');
// [60]  If Token = {46} Then 
if (_token == "") {
// [61]  If BANano.CheckInternetConnectionWait Then 
if (await banano_isconnectedWait()) {
// [63]  BANano.GetElement( {47} ).SetChecked(True) 
u("#loginform").checked(true);
// [64]  Else 
} else {
// [66]  MiniCSS.Content( {48} , {49} , {50} ) 
_banano_minicss.content("r3c1","contajax","You are not connected to the internet!");
// [67]  End If 
}
// [68]  Else 
} else {
// [69]  BANano.RemoveCookie( {51} , {52} ) 
Cookies.remove("BANanoDemoCookie", {});
// [71]  MiniCSS.Button( {53} , {54} , {55} , {56} , Me, True) 
_banano_minicss.button("r1c1","login","Login","primary",_banano_bananoclient,true);
// [72]  MiniCSS.Content( {57} , {58} , {59} ) 
_banano_minicss.content("r3c1","contajax","You are now logged off from the server!");
// [73]  End If 
}
// End Sub
};

I didn't modify the project in anyway ... I just compiled and pointed to chrome local web server to the compiled app path (BANanoClient).
 

alwaysbusy

Expert
Licensed User
Longtime User
Yes, I've noticed this just myself. My test was buffered and did't had this test. Just until I can fix it, remove the 'If BANano.CheckInternetConnectionWait Then' check in Login_Clicked().

for some reason, this line is missing the async keyword:

B4X:
this.login_clicked= function(_event) {
 
Upvote 0

mindful

Active Member
Licensed User
another error now: Uncaught SyntaxError: Unexpected token var

in app.js:1 (i can't pretty format): (""+void 0==typeof global?""+void 0==typeof self?this:self:global)var bananoglobal=this;
 
Upvote 0
Top