As a long time Xojo user, I remember the days when the examples would be file items on your disk within the Xojo folder. It was helpful to have them around, but invariably I’d often forget about them as I had to go hunting down the folder and the items within that I needed.
I don’t recall when Xojo added this to the IDE (maybe this has always been in Xojo and I’m just remembering the Real Studio/REALbasic days), but for a long time now when you create a new project, within the sidebar at the very bottom is an item for examples. These days these are fetched remotely and downloaded.
As Xojo has progressed in this manner, my own workflow didn’t. But in the last 6+ months I’ve found myself remembering the examples and using them fairly frequently whenever there’s a bit of Xojo’s technology that I either want to learn more about or get a quick jumpstart on.
So just a reminder in case folks don’t know or have forgotten, how great and easily accessible are Xojo’s examples. As a nice edition is also the ability to filter them by Kind and Platform.
I have to admit - even as a long time user I had to really hunt around to find the examples, and then the one I ran didn’t work as expected. In my opinion, this user experience could use some reexamination.
Sure, they’re not perfect and I’m sure there’s bugs out there like in all software. But at least in my own experience, they’ve been great to see how say drag-and-drop works under Xojo, without needing to figure things out solely through the docs and reinvent the wheel.
Of course everyone’s mileage will vary, but at least for me I’ve been pleasantly surprised as to how useful the examples are and how easy they are to find and get to these days.
The examples show bad code practices and use outdated code. I opened a random example and found this:
// Populate an array
Var firstNames() As Text = Array("Bob", "Bill", _
"Ben", "Brad", "Bart")
// Sort an array
firstNames.Sort
// Search an array
Var position As Integer
position = firstNames.IndexOf("Ben") // position = 2
It had been possible for many years to do declare a variable and initialise it at the same time. So why is position declared and initialised in 2 lines? Ever since the person doing the examples started with this style it has been used way more often here in the forum. And no comment on using text in 2024.
For myself, I prefer the two line declaration-assignment because it makes all assignments equal and searchable via “position=” instead of having to include the conditional “as integer”. Personal preference, and I don’t really consider it outdated.
I get it. It’s just that every time someone tries to post something positive here, there’s an immediate influx of people complaining about the product. I get that people have issues but we already have at least 20,000 complaint threads. Sorry, just tired of it.
I appreciate your frustration, but this was a particular pain point for me recently and it was right in the middle of making a decision to purchase an updated license. I had to search the web to figure out how to access the example projects, and once I did, the project I tried didn’t perform as expected.
Turns out the example in question, involving Workers, doesn’t work as expected until you buy a license - Workers are limited to a single thread if you are debugging, so if you don’t have a license, there’s no way to evaluate the Worker multiple-CPU functionality. Worse, there was no warning or explanation when debug-running the project, leaving me trying to guess if the example was just out of date, malfunctioning in some way, etc.
If I were a user who was new to the language and considering a purchase, understanding how Workers operate might be of great interest - but without a license and considerable existing knowledge of the language and IDE, you’d never figure it out. Not a good look for exactly the potential customers Xojo should be courting.
This is a technical limitation of debugging Workers, not a marketing or strategic decision. If anything, it’s a documentation issue (there is no mention of the single-CPU debug limit in the docs for Worker) and a feature request (add a warning when debugging that Workers will be limited to a single CPU core). I only discovered this limit by searching the forum.
Workers examples should contain a Note in the code and the UI that Xojo debug does not create real workers. That you need a Desktop License or higher to use them by actually building.
Xojo should take some time reviewing the examples to make sure they don’t suggest deprecated code.
ok so put in a feature request for technical ?
Nothing can get better if you do not try.
There will always be voids that need to be filled but if we at least want to try and fix them Xojo way is to file an Issue
No, I think it would better take the form of a dialog you get while debug running that you can turn off if you wish. That way it will assist all users, not just those who open the Worker example project.