Sorry for the long post, but just wanted to vent a bit.
The two Xojo apps I actively maintain are older, starting life back in 2010. I haven’t bothered updating them to API 2 and will never do so as I’ve switched to Swift.
I do however keep Xojo around for quick little utilities I need for personal use.
My main client work is developing web apps using PHP (generally in conjunction with a framework like CakePHP). I use MAMP locally and have several different versions of PHP installed so I can ensure I’m testing against the same version each client has. The issue is that MAMP only allows switching between two PHP versions. You can have as many installed as you like, but it only shows the latest two. You can however rename the PHP folders so MAMP ignores them, so it’s easy to switch versions by simply renaming folders and then starting MAMP.
As I do this a lot I thought it would be nice to have a little MAMP launcher app that allows me to select which PHP version I want to use. Something simple that presents a list of installed PHP versions and dependant on what I tick, it renames all the folders in background and launches MAMP for me.
I was going to use Swift, but I thought it would be quicker to knock it together in Xojo. However, that’s where my unfamiliarity with API 2 comes into play.
It wasn’t difficult to get used to the changes, but it felt like lots and lots of small, seemingly unnecessary annoyances that drove me nuts. A death by 1,000 cuts if you like. It was whilst looking for answers on Google that I came face to face with what many have been saying will be Xojo’s undoing. It opened my eyes to what it would be like for someone who is new to Xojo and what a nightmare finding any usable answers currently is.
I needed the add checkboxes to each row in my listbox. This is something I haven’t done in years, so the way I’m familiar with no longer works (and frankly I can’t really remember how!).
For something so simple, I’ll normally just do a Google search for what I need as it will nearly always bring back the exact code required without having to wade through the documentation.
So I searched for “xojo listbox row checkbox”. This is what was returned…
The first result is from 2013 and uses the old way of doing things that doesn’t work anymore.
The second is badly titled and more about SQL, so not relevant.
The third is from 2022, so more relevant, but it tells you to use:
Listbox1.ColumnTypeAt = Listbox.CellTypes.Checkbox
This gives you the wonderfully descriptive “There is more than one method with this name but this does not match any of the available signatures”, and goes on to highlight the code on the left side of the equals operator when the problem is actually on the right. At this point I knew what the issues was (the wonderfully pointless DesktopListbox), but for fun I pretended I was a true beginner and continued searching for a working answer online.
The first result on Google for a page that’s actually within the Xojo documentation is for the deprecated ListBox.CellCheck, which does at least sub-link to something relevant. I didn’t go to it at the time though as I saw ‘deprecated’ in the URL and didn’t bother clicking.
There are many more results from the Xojo forums, all of which show various methods that no longer work. The first result that is actually for non-deprecated documentation or examples isn’t until the bottom of the second page of results. I can’t see a beginner ever getting that far after none of the code examples on the first page of results actually working.
As none of the first page of results on Google pointed to any working examples or documentation, I thought I’d take a look at the Xojo documentation directly and see how beginner friendly it is. Clicked on search, typed in ‘listbox’ and smashed return. This is where I came across the next issue. If you type fast, the search is broken on the documentation site.
First time through it said ‘No results for “listbox”’.
Second time it took me straight to the reference for the deprecated “ListBox.CellCheck”.
Third time I got to the also deprecated “ListBoxColumn”.
Finally, I realised what was going on, typed like my Mum and managed to get through to the ListBox reference page.
Seriously, what a mess!
I can easily see how all of this would confuse the hell out of someone new to Xojo. Most ‘citizen’ or ‘hobby’ developers won’t read through the dense, somewhat impenetrable pages that the Xojo documentation has now become. They will dive into Google and search for direct examples of what they need.
I know it isn’t Xojo’s fault that Google is showing non-relevant results (well it kinda is actually), but it does show how their constant messing with the language is really damaging the usefulness of their forums and their documentation. I know many have been saying this for a while, but it was interesting to put myself in the position of a real beginner and try to solve a problem by searching for examples.
The new documentation for each item being all on a single page is what is damaging their visibility in Google. Search engines will see the page as being about many different things, not dedicated to one. This is why the deprecated pages that have a single page for each method have better visibility in search. The ‘ListBox.CellCheck’ page is just about checkboxes on rows, nothing else. That makes it very relevant to my search. The main ‘DesktopListBox’ page, that now also incorporates the ‘CellCheckBoxStateAt’ method is about a bunch of stuff, so search engines will see it as less relevant as it’s less dedicated to a particular topic. So I can’t see this Google search issue getting much better unless Xojo start culling the older documentation, which will be painful for those using older versions.
My final rant is a silly one, but for some reason it annoyed me more than anything else, because it just seems so unnecessary and, to me at least, doesn’t make any sense.
App.AutoQuit has changed to App.AllowAutoQuit (or Application.AllowAutoQuit if you’re fully up to date).
Why!?
I get things like ‘AllowRowDragging’ make some kind of sense (even if it is utterly pointless deckchair rearranging) . You are allowing the user to drag that row. You are allowing the user to perform an action.
Auto quit is not allowing anything. If it’s true, the app WILL auto quit when you close the last window. Surely it’s a boolean option that definitely will or will not happen. It’s like text being bold, it either is or it isn’t. Do you ‘AllowBold’? No. It’s either on or off, so it’s bold = true, or bold = false. In my head it’s the same with auto quit. Allow makes no sense in this context.
Anyway… Sorry for the rant, but it’s my first real contact with API 2 and it made what should have been a quick, simple job frustrating as hell.