B4J Tutorial [Pen&Paper] Create & Run a simple 'Hello ABMaterial' WebApp

Hi there

I have been requested to do a simple something on how one can create a simple ABMaterial WebApp using the Pen&Paper code generator. The attached video seeks to demonstrate with a simple 'Hello ABMaterial' ABMLabel, just how one can just do that.

The expectations for anyone to use Pen&Paper is that they know ABMaterial. One needs ABMaterial 3.5 do compile the generated source code.

1. Download Pen&Paper from here.
2. Follow the attached video (switch to HD view)


This covers...

1. Creating a new project
2. Create a new page
3. Adding a ABMLabel on the page RC location and specifiying its text
4. Compiling the generated B4J ABMaterial source code
5. Running the generated ABMaterial WebApp on your browser.

Everything else Pen&Paper is here.

Enjoy...
 

Mashiane

Expert
Licensed User
Longtime User
Source Code Files for this example

Attached are two sqlite files. hello.zip is the application database (i.e. the one to be distributed with the app) and projects_hello.zip contains the pen&pen source code project.

1. Create a folder and save the pen n paper.jar inside it. As soon as you start the jar file, some folders will be created. The projects folder will store all the projects you create.
2. Create a project called hello inside pen & paper. This will create a hello folder and a hello.db file in the projects folder. Close the pen & paper application.
3. Unzip hello.db in the root folder where the pen & paper jar is residing
4. Unzip the projects_hello.zip in the projects folder, this should replace the existing hello.db that exists.
5. You now should have two hello.db files, one in the root of where you have the jar file is stored and the other inside the projects folder.
6. Open pen & paper.jar again. Open the hello project, this will now open the newly updated project.
7. On the project screen, browse to the hello.db file in the root folder for the database file, click Apply.
8. Compile the project, the source code will be generated...
 

Attachments

  • hello.zip
    1.8 KB · Views: 623
  • projects_hello.zip
    71.1 KB · Views: 568

MbedAndroid

Active Member
Licensed User
Longtime User
hi
i downloaded your project from dropbox. Start Pens&Papers.jar.
It opens. When i click new, it asked for a projectname. Insert a new project name, after that the program quits...?
It saves the new database. When i retry to open this database, same issue...program quits..
Same to your hello.db

Whats wrong?
 
Last edited:

Mashiane

Expert
Licensed User
Longtime User
hi
i downloaded your project from dropbox. Start Pens&Papers.jar.
It opens. When i click new, it asked for a projectname. Insert a new project name, after that the program quits...?
It saves the new database. When i retry to open this database, same issue...program quits..
Same to your hello.db

Whats wrong?
I have recompiled Pen&Paper and fixed the bugs, please download a new version from this post here...
 

MbedAndroid

Active Member
Licensed User
Longtime User
hi
i downloaded already the new version and the problem is gone.
New problem is that after compiling a page i got the message: no connection to the database... Might be a setting?
 

Mashiane

Expert
Licensed User
Longtime User
hi
i downloaded already the new version and the problem is gone.
New problem is that after compiling a page i got the message: no connection to the database... Might be a setting?
Yes, see #7 in post 2. Do a Test Connection first to see if the connection to the db has been established. Yes the database is not needed for this particular example but by default with the templates, the assumption is that there is a database. I will add an option to disable a database in an upcoming version.

Thanks.
 
Top