I’m gonna start testing your Banano library for a web app I have on the steps, a rather large system for hotels and lodging.
I need a timeline scheduler for my project, and this component has a nice one.
I also am guessing that to access a database, you need to do this via a REST Api?
Sure. Adding components is easy in BANano using the CustomView. Here is a demo to get you started (the component has a lot of features, so this is just a basic example). If you have problems implementing a certain part of their API, let me know. I here use a BANanoFetch to get the events from a static json file, but this can be from a REST Api call too.
@Alwaysbusy, what files do I use from the fullcalendar download? Seems you
But I cant find them anywhere. I have donwloaded the fullcalendar from github.
Sorry, just trying to get my head around how this works
They are in the zip in the folder /Files. I just renamed the main.min.js and main.min.css files from the download with the prefix calendar because ‘main’ sounded weird
oh, blind I guess
but, I get a blank screen when I try to run this
Are you running it on a WebServer? (not by just opening the .html file from disk from your browser, that does not work as a fetch does require a webserver).
Easiest I found is running this plugin in your chrome Browser for testing:
For some things in BANano, e.g. cookies, you will need to run it on a server as just opening the html file in your browser from disk does not support everything.
A very easy way to do so is by installing the 'Web Server For Chrome' plugin...
In Chrome, Press F12 to bring up the Dev console to give you a clue what went wrong (post a screenshot maybe)
not running a web server no, will do that ASAP
Still, it is weird that you get a blank page. This is what I get when I double click on the .html file:
What do you see when you check the console and network tab in Chrome? Maybe I forgot something in the zip
Do you see errors from the BANano transpiler in the logs in B4J?
blank bage in chrome webserver to, se images:
The B4J logs show a lot of BANano transpiler errors.
The only thing I can think of is that you are not using the latest BANano libraries:
Latest version of BANano:
Looks fine. Real puzzle but we will get there
In your logs I see missing CSS and JS files too. Can you copy the complete log in a .txt file? And maybe run in Debug mode instead of Release.
It looks like it just does not find the BANanoSkeleton library (is it in the B4J Additional Libraries folder?)
ha, it wokrs in debug mode
and I moved the skeleton library to the additional libraries insted of B4j libraries
Ok, now retry it in release mode. If it does not work, send me the complete logs.
That is going to be it probably. BANanoLibraries need to be there, not in the main B4J Libraries folder. That is the place where the Transpiler looks for them.
yesss, works in both modes now
thank you so far
Cool! I’ll add an entry in the BANano download section on the B4J forum about where BANanoLibraries have to be placed.
EDIT, it was there in the Getting Started section but I’ve put it in bold
maybe a dumb question, but can I use databases like in abmaterial, or du I have to have an api for that?
You can use a database in the browser’s Local Storage (BANanoSQL) that allows you to use SQL queries like this:
SQL.ExecuteWait("CREATE TABLE IF NOT EXISTS flights (flightNo INT, fromCity STRING, toCity STRING, isInTheAir BOOL)", Null)
Dim ret As List = SQL.ExecuteWait("SELECT COUNT(*) AS myCount FROM flights;", Null)
Dim MyCount As Int = SingleResult(ret, "myCount")
Log("MyCount Before: " & MyCount)
MyCount = MyCount + 1
SQL.ExecuteWait("INSERT INTO flights (flightNo, fromcity, toCity, isInTheAir) VALUES (?, ?, ?, ?)", Array(MyCount, "Brussels", "Paris", True))
for more info:
There is also a BANanoLibrary on the forum
here that uses php to connect with MySQL and other databases.