Really, really like the consistency of all functions and all expressions and getting rid of having to remember where to use "" and %. Although using stuff like Obj.%var% still seems a little off as that reminds me of the hacky protoarrays but I am coming around to it.
GUI changes are taking some learning but GUI was messing already with vVar and gSubroutine so it is worth relearning. But I wasted quite a bit of time because I did not have (*) instead of just () for my functions called by the GUI. It seems like it would just assume any number of parameters is ok when you don't care about any of the parameters. I assume it is to catch errors but it seems it will cause more errors than catch. A tutorial with lots of example code for GUI would be useful.
The other big change relearning is Objects. It took a while to get that the generic object has been split into different types of objects. My take is there are now three main ones: arrays, maps, and objects. In my mind all those are objects but objects now mean properties/methods. Again a tutorial with lots of practical example code for defining, accessing, looping, etc would be great. Just figuring out using for prop, val in Obj.OwnProps() took me quite a bit of googling. I still don't know if you can loop through the actual properties and not just the names of the properties.
I am wondering if I am missing some shorthand and longhands as shown below:
Code: Select all
MyArray := Array("One", "Two") ; Longhand
MyArray := ["One", "Two"] ; Shorthand
MsgBox 'MyArray[1] `n' MyArray[1]
MyObj := {One:1, Two:2} ; Shorthand
;~ MyObj := Object(One:1, Two:2) ; No Longhand
MsgBox 'MyObj.One `n' MyObj.One
MyMap := Map("One",1,"Two",2) ; Longhand
;~ MyMap := ["One":1,"Two":2] ; No Shorthand
MsgBox 'MyMap["One"] `n' MyMap["One"]
I get the Array longhand and shorthand.
Does Object have a longhand that lets you define multiple properties all at once?
Does Map have a shorthand that lets you define multiple maps all at once?
FG