Wish Designer Scripts in a more compact way...

BlueVision

Well-Known Member
Licensed User
Longtime User
Hi Erel,
just try to give my app a polishing by using the designer scripts feature. Honestly, a great tool to make the final program looking good on different screen sizes. Works very good in connection with the UI cloud, so often I am able to try things out and see the effect on different screens.

My wish: Writing all the options for an object (button, panel or whatever) chained and separated by a comma inside paranthesis behind the name of that object. This would make the scripts much more compact. On the first look, it may look confusing, but writing again and again the name of the target object first in the line makes it also not easier to "keep the flow". In other words: The look of the script could be equal to a line you write in the program editor when using a complex statement with several parameters.

Just an idea, no complain.

Cheers, BV
 

BlueVision

Well-Known Member
Licensed User
Longtime User
By now it looks this way:

WebView1.Top = 12%y
WebView1.Left = 0%x
WebView1.Width = 100%x
WebView1.Height = 70%y

Could be this way:

WebView1(12%y, 0%y, 100%x, 70%y,,,false,,,,true)

False and true in this case are not making sense, only for showing, that there could be other unused options inbetween...

Hope it's more clear now. Sure, first look is not easy. But you can faster and exactly find the point, where to change something. Jump into the line during editing and a small declaration of syntax could pop up, as when writing program code.
 

NJDude

Expert
Licensed User
Longtime User
I don't see that as a good choice, in some cases you might need for example to have the same width for some views:
B4X:
WebView1.Width = 20%x
WebView2.Width = WebView1.Width
WebView3.Width = WebView1.Width
The code above will be a time saver since by changing the width of WebView1 you automatically adjust the rest, with your proposal, you will have to write too much code, and yes, it also looks complicated.
My opinion.
 

BlueVision

Well-Known Member
Licensed User
Longtime User
Ok, it was only an idea. If you have to walk through an application with 5 activities, tons of buttons and popups, then it is hard work to make everything fit. But finally I made it I think.
"Copying" the settings of an layout works inside a given activity, but it does not work over "activity-borders". This means, you cannot give an object the same settings from another sourceobject, if it's not within the same activity. It may work if there is a way to address the objects "home", the activity. If so, then the written code gets also more and more complicated. My intent was meant in a way, to address all object-properties in one single line. If there are tons of objects to describe, then it would be much easier.
Sure, you can copy the written code itself and change the objectnames you want to modify, if there are some activities with a "close look" to another one.
In my special case, it's 5 panes (activities) now, each with up to 250 lines of code only for design... But it works. This Counts.

Thanks for responding!
 
Top