Painting
Coding without autocomplete would be like going back to coding so many years ago it would not be fun or productive. Maybe there is a secret switch.
PaintingAt
Let’s talk about differences between CellLostFocus and CellFocusLost… amazing
Seriously, I’m still asking what are the real benefits around that migration… but we have to do sooner or later.
That is pure genius. Love it!
Would you be doing bad spirit?
I converted all my 12 projects to API2, some are big, but not very big.
And yet is how several of us experienced Xojo users are programming nowadays.
Seems like a counter intuitive decision on Xojo Incs part in my opinion. I’m not using Xojo for my current project(s) but the thought of no autocomplete on legacy projects in a new version makes me inclined not to renew and not run newer versions. Is there a feedback request to reinstate this functionality?
There were many talks about it, it was a Xojo decision as an incentive to people to move to the new standards. I guess that a FB request will be closed as “Won’t implement. This feature is as designed” or something.
At some point everyone will need to move to newer versions as the host OSs evolve and your UI gets dated or things break or your old IDE does not support the new host, as an ARM version of it.
At that point, since I’m now 75, either I’ll be gone, or by then I won’t care anymore.
This is my fear, so I think I’ll migrate in one of the next weeks… I’ll roll up my sleeves!
Clone your project, keep the stable one ready for whatever need that appears, meanwhile work on the renewed one without stress at the pace it takes.
Although I do not intend to convert to API 2.00 controls for the moment, I find myself using the new API 2.00 syntax quite easily. A project can use indifferently the old and the new. And as usual, if needed, the LR is my friend.
There are plenty of good things to like about API2. I think my favorite is the iterable dictionaries. It’s so much nicer to write
For Each Entry As DictionaryEntry In Dict
If Entry.Key = "Target" Then
MessageBox(Entry.Value)
End If
Next
Than it was to write
Dim KeyBound As Integer = Dict.Count - 1
For I As Integer = 0 To KeyBound
Dim Key As Variant = Dict.Key(I)
If Key = "Target" Then
MsgBox(Dict.Value(Key))
End If
Next
(Ignoring the potential for typemismatch of course.)
There’s a handful of things that just feel more natural and I think the language is better for it, despite the growing pains. There are others (such as the aforementioned inline formula issue) that are a step backwards, but those are rare. I struggle to think of another example actually.
I’m not so satisfied with the new control events though. There’s next to nothing to be gained and a whole bunch of pitfalls, such as not being able to iterate over both old and new controls on a window. Mix and matching is perilous.
But that could have been coded perfectly well in API1
This is probably the very first and only example of API2 code I have seen to date that is smaller and easier to understand than the API1 equivalent.
You are not wrong, and why I’ve always been in favor of smaller targeted changes, rather than throwing the baby out with the bathwater.
Most are, e.g.
Var s, api1, api2 As String
s = "ab.bcdef.cdefghij.defghijkl"
api1 = Right(Replace(nthField(s, ".", 3), "g", "x"), 4) // mess
api2 = s.NthField(".", 3).Replace("g", "x").Right(4) // reads much better
To me, neither of those is particularly easy to read
…both suffer from ‘I will write this on one line of code if it kills me’
v1 = nthField(s, ".", 3)
v1 = replace(v1,"g","x")
v1 = right(v1,4)
or
v1= s.NthField(".", 3)
v1 = v1.Replace("g", "x")
v1 = v1.Right(4)
but to each their own.
This existed before API 2!