No, I will not go back in creating named controls. They are great I think.
But after having implemented some of them ... as soon as I started to develop example scripts I discover that my implementation was done on the wave of the enthusiasms and I didn't thought well about all the aspects.
For example:now a named control is a global variable of a certain class (type).
But what if more controls have the same name but different parent control/window?
A bug: I cannot have two global variables with the same name.
So I need to think how to implement names in order to remove ambiguity.
Maybe dotted notation like ParentName.ControlName.Property like:
Window1.ListBox1.x = 10
so you can also have another ListBox1 in a second window like
Window2.ListBox1.x = 10
Also ReneMiner just noticed:what if I need more controls with the same name over the same window?
In some Visual languages you can have an array of controls with the same name.
So I need to think I to implement an array of controls.
Windows1.txt(index).x = 5
where txt() is an array of textboxes all with the same name but different index
Things like that, if implemented, will change current naming.
So I will wait before documenting them.
An example of current implementation can be found in \thinBasic\SampleScripts\UI\NamedControls\ directory.
Bookmarks