B4J Library [ABMaterial Poll] What to do next?

It has come to my attention that a lot of the ABMaterial users would ask for multiple new features for ABMaterial. However, as I only have two hands , I thought it may be a good idea to set up a poll to prioritize on what I should work on next. Some people are not that patient and start writing there own tools, but the chances they become obsolete in the future is very possible. I have my own ideas on how ABMaterial will develop in the long run and I cannot take into account other tools.

I came up with 3 things to do. Note: All of them will be implemented, but you'll have a say in what order they will be worked on. All three would require about the same develop time.

1. ABMXPlay
This is the component you have seen some demos of in this forum and will be more for game developers. It still needs a lot of attention before it can be released.

2. B4JS
The Basic to Javascript transpiler is now in its very early stages. It is a tough one to write without finishing ABMXplay first, as the ABMXPlay component would be the first to really benefit from it. The B4J core functions have been covered, but big parts of all ABMComponents need to be refactored to start using B4JS.

3. ABMAbstractDesigner
A full blown Abstract Visual Designer like the one in B4J. This is NOT a code generator but the real deal. Code generators may look nice at first sight, but like Harris pointed out in another topic, have a huge disadvantage: they go one way. ABMAbstractDesigner would work like the B4X ones: you create a layout, develop, change the layout, continue to develop and so on without losing what you have written in code. I'll use the Grid Designer I've shown as a proof of concept in another post + the possibility to put ABMComponents on them. I've done some tests this weekend and it would work very similar as the other B4X tools.

So, it is up to you now: Vote! My fingers are eager to start typing :)

Alwaysbusy
 
Last edited:

Cableguy

Expert
Licensed User
Longtime User

Harris

Expert
Licensed User
Longtime User
I now understand the grid - as I should - been experimenting long enough. It is not that difficult (however complex). It just takes some time to learn (when you know and understand you are dealing with three different perspectives - phone, tab and desktop - and 12 cells). It is quite amazing when you populate the method params with correct values! (even when not, the framework 'somehow' deals with it correctly).

The only issue I have, as I have posted somewhere else, is when I need to insert a new row within a built grid (with different cell construct).
Not a big deal, but I need to adjust the row numbering after the new row insert (cause I did not foresee the true design) - (inc each successive row by one (or x many). I tried to think about how I could accomplish this with logic code to no avail. (forgive me if you have already addressed this issue).

How to make row numbering dynamic (enum)? Right now, we reference rows as 1,2,3, etc).

Many other smart fellows may have already figured this out. Pls enlighten me.

Maybe we are stuck here because the way the compiler works.

As always, I just can't emphasis enough my joy about this marvelous framework!

Thanks
 

alwaysbusy

Expert
Licensed User
Longtime User
@Harris This was indeed why the CellR() method was introduced. (The 'R' stands for relative to another row).

e.g. using cell:

page.cell(1,1).addComponent("...")
page.cell(2,1).addComponent("...")
page.cell(3,1).addComponent("...")

What if we want to 'insert' a new component between 1 and 2?

page.cell(1,1).addComponent("...")
page.cell(2,1).addComponent("...") <-- new line
page.cell(3,1).addComponent("...") <-- change line
page.cell(4,1).addComponent("...") <-- change line

Now with cellR:

page.cellR(0,1).addComponent("...") <-- the 1st row is where we are so we do not have to move relative to it (0)
page.cellR(1,1).addComponent("...") <-- relative 1 to previous
page.cellR(1,1).addComponent("...") <-- relative 1 to previous

Adding a new component
page.cellR(0,1).addComponent("...")
page.cellR(1,1).addComponent("...") <-- new line, the rest we can leave as it is.
page.cellR(1,1).addComponent("...")
page.cellR(1,1).addComponent("...")

All this will drastically be made easier once the Grid Editor is in place.
 

Harris

Expert
Licensed User
Longtime User
I see what you mean above. The grid generator used this (where I had not when hand coding). This shall work fine when the row you reference after has the same type of cell structure.

However,
I have carefully laid out my initial grid with 11 rows of different formats...

B4X:
 public Sub BuildPage()
  ' create the page grid
    page.AddRowsM(1,True, 10,  3, "rowtheme").AddCellsOSMP(1,0,0,0,  4,4,4,  5 , 5, 0,0,"cnter").AddCellsOSMP(1,0,0,0,4,4,4,5 ,5,0,0,"cnter").AddCellsOSMP(1,0,0,0,4,4,4,5,5,0,0,"cnter")  'row 1
    page.AddRowsM(1,True, 15, 0,"").AddCells12(1, "cnter")  'row 2
    page.AddRowsM(1,True, 0,  0,"").AddCells12(1, "")  'row 3
    page.AddRows(8,True, "").AddCellsOSMP(2, 0 ,0, 0, 12,  12,  6, 0 , 0,   15,15,"")   ' row (4 * 8)
   
    page.BuildGrid 'IMPORTANT once you loaded the complete grid AND before you start adding components

Then, after review, I need to insert (another) row 1 - (type/format) after row 2 (before row 3). It has 3 cells where row 3 has 1. If I don't change the numbering when adding components, I will get Cell(x) not found??? Can I use CellR(1) in this fashion and carry on and not insert the new row?

"Funky Cold Medina" grids...
 

alwaysbusy

Expert
Licensed User
Longtime User
Mixing is probably not such a good idea. It should work, but then you have to be very careful you do indeed update all the rows AFTER the newly added, just as you must do if you only use cell().

CellR() was added much further into the development of ABMaterial. I too still have pages that are using only Cell(). But once this was introduced, I always use cellR() in my new forms.
 

techknight

Well-Known Member
Licensed User
Longtime User
I just stumbled upon this thread from the other thread. DEFINITELY a designer!!!
 

techknight

Well-Known Member
Licensed User
Longtime User
Just a thought...
It is not difficult to read B4X layout files: https://www.b4x.com/android/forum/t...s-files-to-json-and-vice-versa.41623/#content
Maybe you can create a set of custom controls and use B4J designer to create the layout.

I honestly think this library, its power, and everything wrapped around it could become a totally new product line like B4W. Take all the glue code, web sockets, java, etc.. and make it transparent in the background. Not seen to the user unless explicit.

Layout the page in Visual Designer, and then click/drop labels, buttons, controls, etc like normal. And define the controls and subroutines in the code as is with B4a/B4I. all the websocket stuff and glue code is generated in the background.

Something to think about.
 
Top