I don't like the DoubleDerefs/Dynamic Variables, but as long as there are "Commands" in the Syntax, I don't see any reason to remove them.
Remove this concept completely or let it be.
Commands provide under some circumstances simpler Syntax. Saying commands, especally the handling of gui commands, are noobfriendly is not that prooven as some people say. In my expirience this is something which can be truly improoved.
Quote:
As long as Gui variables exist, so will dynamic variables. I have no intention to redesign the Gui commands.
Using Commands to create a LV but being forced to use Functions to handle it is far away from being consistent. Using Commands with strange syntax to modify a Control is also far away being noobfriendly.
This is one part about usage. The other part about commands and the Gui handling is, it is very inflexible for advanced users. Guis and Controls should be Objects, which provides much better data structures. We can have a List of Controls - we can easy write some Layout-Manager for controls, as a Pane has a list with Child-Controls etc.
To not confront newbies with objects, one can provide a intuitive Syntax to handle them.
Creating a Gui without functionality is somewhat nice the way it is.
But if it comes to defining behaviors/actions like change something, it's getting very weird and unintuitive.
Code:
Gui, add, Edit, w100 vmyText
Gui, add, ListView, w200 h300 vmyLV, Name|Age
Gui, show, ,Title
addTextAndRows()
return
addTextAndRows(){
global ;
LV_Add("","Eric", 22) ; which LV!?
GuiControl,,myText, Max ; two commas? GuiControl?
}
An OOP replacement takes out a lot of the magic. The following example can be combined with better and shorter syntax off course.
Code:
myText := Edit(100)
myLV := ListView(200,300)
myLV.addColumn("Name")
myLV.addColumn("Age")
myGui := Gui("Title")
myGui.add(myText)
myGui.add(myLV)
myGui.Show()
addTextAndRows()
return
addTextAndRows(){
global
myLV.addRow("","Eric", 22)
myText.Text := "Max"
}
The point is, as an User I want to have a EditBox. I want to take this thing and do whit it whatever I want. This is the way humans work. We think in Objects, not in Functions
Using Objects is very intuitive, even for newbies. Objects are here to make things easier. Objects are much more "real" Things and therefore easier to understand for humans Writing Objects yourself isnt noob friendly, but is not required.
Setting the Value of a Text-Box is so much easier to understand, if you can say: "Well I have a TextBox called
myedit and I want to set its text;
Code:
GuiControl,,myText, Max
;vs
myText.Text := "Max"
This looks much simpler, no external Function is needed.
Quote:
So what is the difference between a function and a command
They have different usage as functions. A User has to learn two things instead of one. Commands even are implemented a way which forces you to lookup their documentation to guess if an Expression or traditional String is expected.
About your clipboardall discussion. Whats the point? The Clipboard is an static Class/prefixed Function-Collection , which may have an method getBinaryData() for advanced useres.
Code:
bin := Clipboard.BinaryData
;..somewhere else
Clipboard.BinaryData := bin
Clipboard.setText("Hello World")
Where "bin", which is a copy of the current Clipboard-Data, itself is a datastructure - be it a byte Array or a simple AHK Object which provides a possibility to get a pointer to the start.