Other Subscribe to B4J library updates

alwaysbusy

Expert
Licensed User
Longtime User
BANano v6.09

TAKE A BACKUP!

IMPORTANT!

A BANano Custom View can now have a special Property: the AutoID Key.
If the Custom View has a property AutoID and it is set to True, then the BANano Transpiler will use a random string for the ID/Name of the component.

This will make it easier to make layouts in the Abstract Designer without having to worry about having the same name.

In the BANanoSkeleton library for example the following Custom Views have an AutoID:
  • SKRow
  • SKColumn
  • SKContainer
  • SKlabel
  • SKImage
It is important that you open your existing layouts and check if this setting is correct for your layout (as by default, this will be set to True for the above Custom Views)

You can Ignore this behavior by setting the TranspilerOptions.SetIgnoreAutoID(True), but I suggest you do the check described above for your existing layouts and make use of it as it will make it easier in the future if you have new layouts.

CHANGES:

1. [NEW] BANano.DeepMerge()
---------------------------
Merges two object into one (e.g. two maps into one)

2. [NEW] Live Updating of Layouts
---------------------------------
You can now live (while running) update the layouts in the Abstract Designer and reload them in the browser

3. [NEW] BANano.GetAsset()
--------------------------
returns the object previously loaded with AssetsLoad/AssetsLoadEvent/AssetsLoadWait
needs the exact url path used in the Load methods.

4. [NEW] Prefixing Smart Strings
--------------------------------
When you start the Smart Strings ($""$) with one of these prefixes, BANano will do some automatic replaces:

B4X:
[BANCLEAN]: removes \n and \r
[BANRAW]: replaces \n to \\n, \r to \\r, " to \"

5. [NEW] BANano.CallBackMethod()
--------------------------------
Get the BANano name of a method, to be used in e.g. AddEventListener and RemoveEventListener.

6. [NEW] BANano.Await
---------------------
Makes JavaScript wait until the promise returns a result. It has to be noted that it only makes the async (Wait) function block wait and not the whole program execution.

The method name itself has end with ...Wait (this adds the async prefix in Javascript).

7. [NEW] Typical Javascript Array methods added
------------------------------------------------
B4X:
BANano.Pop
BANano.Push
BANano.Shift
BANano.Unshift
BANano.Splice
BANano.Concat
BANano.Slice
BANano.Slice2
BANano.Sort
BANano.Sort2
BANano.Reverse
BANano.ForEach
BANano.Map
BANano.Filter
BANano.Reduce
BANano.ReduceRight
BANano.Every
BANano.Some
BANano.IndexOf
BANano.IndexOf2
BANano.LastIndexOf
BANano.LastIndexOf2
BANano.Find
BANano.FindIndex

8. [NEW] BANano Event has property ReturnValue
----------------------------------------------

9. [NEW] BANanoMediaQuery
-------------------------
A media query fires an event if a certain rule matches.

Example rules:
B4X:
(max-width: 400px)
(min-width: 401px) and (max-width: 600px)
(min-width: 601px) and (max-width: 800px)
(min-width: 801px)
(orientation: portrait)
(orientation: landscape)

Example Usage:
B4X:
Private Bigger992px As BANanoMediaQuery
...
Bigger992px.Initialize("(min-width: 992px)")
...
Sub Bigger992px_Matched()
    MainSidebar.AlwaysOpen = True
    ' and hide the hamburger button
    MainHamburgerMenu.Element.SetStyle($"{"visibility": "hidden"}"$)
End Sub

10. [NEW] BANanoObject Delete operator
--------------------------------------
The delete operator deletes a property from an object

11. [NEW] New/changed components in the BANanoSkeleton b4xlib
-------------------------------------------------------------
* SKCanvas/SKCanvasObject/SKCanvasImageData

Very similar object as in ABMaterial. Build-in Drag/Drop of objects

* SKMenu

Menu object (e.g. can be used in a Sidebar as a Hamburger menu)

* SKTextbox

Possibility to add a prefix/suffix label to the component.

* SKColorPicker

12. [NEW] BANano.LoadLayoutAppend/BANanoElement.LoadLayoutAppend/BANanoElement
------------------------------------------------------------------------------
Appends the layout at the end without emptying the target first.

13. [NEW] RemoveEventListener extra parameter UseCapture
--------------------------------------------------------
useCapture: A Boolean value that specifies the event phase to remove the event handler from.

true - Removes the event handler from the capturing phase
false - Removes the event handler from the bubbling phase

14. [FIX] Tags are not appended on thead/tbody/tfoot tags
---------------------------------------------------------
Umbrella limitation. Reason is the javascript createDocumentFragment() method does not support table tags but I have written a workaround for it.

15. [FIX] Sometimes in libraries, and error looking for a BANanoApp.jar occured
-------------------------------------------------------------------------------

16. [FIX] ...Wait methods not generated in libraries
----------------------------------------------------

17. [NEW] includes a BANano Skeleton.b4xtemplate
------------------------------------------------
Because B4X now allows templates, BANano has a template using the BANanoSkeleton library.
It has a page, sidebar, topbar and an example modal sheet.

18. [FIX] Description Meta Tag was added twice
----------------------------------------------

19. [NEW] TranspilerOptions.SetFireReadyWhenReadyStateComplete(bool as Boolean)
-------------------------------------------------------------------------------
Raises the Ready state only when the loading state is 'Complete'. Default = True

Set to False to have the old behaviour.

20. [FIX] Several smaller transpiler fixes
------------------------------------------

Download: https://www.b4x.com/android/forum/t...-abstract-designer-support.99740/#post-627764

Alwaysbusy
 

stevel05

Expert
Licensed User
Longtime User
Replacement Titlebar

Upgrade to V1.0
  • Reworked the drag logic
  • Added Emulation of windows snap to screen
  • Added more designer properties
  • Added method ResetMouseListeners
 

Star-Dust

Expert
Licensed User
Longtime User
SD TextView update rel 0.09
Add TwoIconTextView​

1605734482523.png
 
Last edited:

alwaysbusy

Expert
Licensed User
Longtime User
BANano v6.11

TAKE A BACKUP!

CHANGES:


1. [FIX] ...Wait methods not generated in libraries
----------------------------------------------------
Somehow this fix slipped through my final push for 6.09 and should now work in 6.11.

2. [FIX] AutoID for SKLabel1 in UploadForm (Server demo) was still on True
---------------------------------------------------------------------------------------
Explanation here: https://www.b4x.com/android/forum/t...ith-skcontainer-loadlayout.124707/post-778708

Download: https://www.b4x.com/android/forum/t...-abstract-designer-support.99740/#post-627764

Alwaysbusy
 

stevel05

Expert
Licensed User
Longtime User
Replacement Titlebar

Update: v1.1
  • Added listener to getChildrenUnmodifiable to automatically call ResetMouseListeners as needed.
  • Made important Titlebar views public for styling.
  • Removed redundant code
  • Added CloseRequest(EventData as Event) Event to delegate to MainForm_CloseRequest(EventData as Event)
  • Set default icon so that it's click can be captured if required.
  • Stop the form closing on Right mouse button click
  • Added override for Maximize size, mainly for Mac users.
 
Last edited:

stevel05

Expert
Licensed User
Longtime User
CodeMirror Javascript Code editor wrapper - proof of concept.

Update to 'V1.3
  • Added access to most of the available languages
  • Added b4x.js to the proper structure within CodeMirror mode folder and Meta.js
  • Added new code module to Map App Names to mime types
  • Added and implemented autoLoad addon to select language by MimeType
  • Changes to the CodeMirror library - requires downloading new version
 
Last edited:

stevel05

Expert
Licensed User
Longtime User
CodeMirror Javascript Code editor wrapper - proof of concept.

Upgrade to V1.4
  • Added doc.clearHistory to setCode to stop undo removing the new code
  • Added #javacompilerpath to ide parameter words.
  • requires download of codemirrorlib
  • Moved the call to InitializeFiles sub to the WebCodeEditor class where it belongs.
 

stevel05

Expert
Licensed User
Longtime User
CodeMirror wrapper and example b4xlibs

This is a replacement for the proof of concept example and is now easier to implement.

Additional functionality in version 1.5
  • Separated from the CodeEditor module for easier minimal implementation.
  • Added ReadOnly option
  • Added Themes
    • Requires an allowedthemes List to be passed so they can be validataed against the defined themes.
    • You can pass a subset of the defined themes so only your preferred themes are available.

  • Separated from the CodeEditor module for easier minimal implementation.
  • Added ReadOnly option
  • Added Themes
    • Requires an allowedthemes List to be passed so they can be validataed against the defined themes.
    • You can pass a subset of the defined themes so only your preferred themes are available.
 

Star-Dust

Expert
Licensed User
Longtime User
Last edited:
Top