David
if you just have 1 call to create a form ‘f’
how do you get f? How is that build up?
How do you create a new button without calling really newbutton() method
so before you say:
solutionModel.newForm(f)
How do you want to construct f and how do you want to construct a button on f??
those newXXX methods are constructor calls. And you have or can set there properties that are mandatory.
for example if you wanted things like solutionModel.newForm(f)
then i guess you want something like this??
var f = new JSForm(“new_form”, “server_name”, “table_name”, “style_name”, true, 400, 200);
var b = new JSButton(“btname”,x,y,z);
b.text = “text”;
f.add(b); // or maybe f.btname = b;
and then solutionModel.newForm(f) ???
but how is that smaller then:
var f = solutionModel.newForm(“new_form”, “server_name”, “table_name”, “style_name”, true, 400, 200);
var b = f.newButton(“btname”,x,y,z);
b.text = “text”;
and then i am done… (so it is even shorter the current way)
The property based method could be handy. Problem is that currently they are not scriptables (js objects)
It could be even
f.buttonname.text = “text”
That would work for fields/labels/portals because they should be name unique but a problem could be variables or methods those can have the same name as elements.
so i guess creating another indirection scope like
form.button(.name.property) is also possible and will have less conflicts
but it is not that much more typing by the way with getButton() the extra stuff you type is 2 times a "
another problem if i create for methods/command a property like: onAction or onShowOmittedRecordsCmdMethod
that it is a property and not a set method anymore so i would break the current scripts
And then i guess the type should also really change and be a String or a JSMethod