B4J Tutorial [Web] SithasoDaisy5 Demo (Code Only Version) - For Non Abstract Designer Users

Hi Fam

Experience on Vercel
Download Code

The first draft of the SithasoDaisy5 Demo Code Only Version is out. This demo has been built with code only and does not need abstract designer layouts to work.

Why did we also consider this approach? We have recognized that some developers prefer to type code / use AI to code above and beyond using the abstract designer and we needed to make this option available.

The code has been generated directly from the layouts, i.e. we look the existing layouts and just converted each component in them into b4x code, e.g. Initialize & AddComponent with properties settings in-between. We used the same code used from our BJL/BAL/JSON coding tool to assist with the conversion and a lot of ChatGPT Codex to get here

This UI should be the same as the layout based version. You will need the SithasoDaisy5 b4xlib to run the source.

1771114630710.png



#SharingTheGoodness


Related Content

 
there are many errors
1771226227271.png


module: pgToast
Code: Copy
Sub Process_Globals
    Private BANano As BANano        'ignore
    Private app As SDUI5App            'ignore
    Private toast2 As SDUI5Button        'ignore
    Private toast3 As SDUI5Button        'ignore
    Private toast4 As SDUI5Button        'ignore
    Private toast5 As SDUI5Button        'ignore
    Private SDUI5Toast2 As SDUI5Toast        'ignore
    Private SDUI5Toast3 As SDUI5Toast        'ignore
    Private SDUI5Toast4 As SDUI5Toast        'ignore
    Private SDUI5Toast5 As SDUI5Toast        'ignore
End Sub

Code: Copy
toast3.Image = "./assets/addfolder.svg" 'image is readonly


module: pgButtons
Code: Copy
    SDUI5Button26.Image = "./assets/pig.svg"
    SDUI5Button26.ImageHeight = "32px"
    SDUI5Button26.ImageWidth = "32px"
   'is readonly
and many others
 
there are many errors
View attachment 169953

module: pgToast
Code: Copy
Sub Process_Globals
    Private BANano As BANano        'ignore
    Private app As SDUI5App            'ignore
    Private toast2 As SDUI5Button        'ignore
    Private toast3 As SDUI5Button        'ignore
    Private toast4 As SDUI5Button        'ignore
    Private toast5 As SDUI5Button        'ignore
    Private SDUI5Toast2 As SDUI5Toast        'ignore
    Private SDUI5Toast3 As SDUI5Toast        'ignore
    Private SDUI5Toast4 As SDUI5Toast        'ignore
    Private SDUI5Toast5 As SDUI5Toast        'ignore
End Sub

Code: Copy
toast3.Image = "./assets/addfolder.svg" 'image is readonly


module: pgButtons
Code: Copy
    SDUI5Button26.Image = "./assets/pig.svg"
    SDUI5Button26.ImageHeight = "32px"
    SDUI5Button26.ImageWidth = "32px"
   'is readonly
and many others
We need Sithaso Daisy 55.88, will upload soon..
 
SithasoDaisy 55.88 is out.

1. New SithasoDaisy5Demo Code - this features a demo app for those who are non abstract designer users.


This helps anyone who writes code can create apps by just writing code and not use an abstract designer. We ported all the layouts to actual code with 100% parity.

This has been added and is part of the Source Code on the report

Experience it on Vercel

NB: There are a few layouts in the "code" demo due to BANano.LoadLayoutArray, others are related to the whatsapp component that are embedded into the SithasoDaisy5.b4xlib. These can be removed if not needed from your project.

2. Enhancements and some bug fixes.
 
Hi Mashiane , how can I use SDUI5Browser to show a webpage? The one from your sample/demo code just show as a label.
B4X: Copy
SDUI5Browser1.URL = "https://www.b4x.com"
b4x.jpg
 
Last edited:
Hi Mashiane , how can I use SDUI5Browser to show a webpage? The one from your sample/demo code just show as a label.
B4X: Copy
SDUI5Browser1.URL = "https://www.b4x.com"
View attachment 173373

I just did have it work after some AI interactions. Code as given below, but certain webpage won't display with embedded browser (work-around may be needed). Mashiane your work is great, I appreciate it. Thank you.

B4X: Copy
    SDUI5Browser1.URL = "https://www.b4x.com"
    BANano.Await(SDUI5Browser1.AddComponent)
 
    Dim BrowserEl As BANanoElement
    BrowserEl = BANano.GetElement("#" & SDUI5Browser1.ID)
    'BrowserEl.SetHTML($"<iframe src="${SDUI5Browser1.URL}" style="width:100%; height:500px; border:none;"></iframe>"$)
    BrowserEl.Append($"<iframe src="${SDUI5Browser1.URL}" style="width:100%; height:500px; border:none;"></iframe>"$)
image.png
 
Last edited:
Back
Top