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:
[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
------------------------------------------------
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:
(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:
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