What Developer Components/Utilities Do We Need?

BKeeney Software has been doing Xojo development for a long time.  Our clients span continents and industries and when we’ve needed something that doesn’t already exist we’ve created it.  This is how ActiveRecord/ARGen and Shorts came into existence.  In both of those cases we used them internally for quite a while before making them available for others.  Some products, like Formatted Text Control, were purchased when the developer left the community and since we depended on the product we decided to keep up development on it.

The question of the day is this:  What components does the Xojo developer community really need/want that we don’t have yet?

To me, the clear winner is a nice grid component.  At one point I recommended the Einhugur StyleGrid and DataGrid controls but it was never updated for HiDPI and there are no plans to do so.  As far as I know there aren’t really any good replacements for them.  Add any suggestions to the comments below.

We use a ton of plugins but it makes no sense to have every plugin installed for every project.  We also don’t update plugins unless we have a need so a minor update to a three year old application probably doesn’t need the latest plugin.  Managing plugins across vendors is a real pain.  Likewise managing Xojo versions for client projects is a chore because one project might be on Xojo 2015 R4.1 for some technical reason while another is at a newer version (but not the latest) and some projects are on the 2017 R2.1. While it’s not hard to manage all this it’s harder managing that across multiple developers. I’d love to have a utility to manage Xojo and its plugins by project.  As far as I know there’s nothing out there that does all of this.  Do I need to write this myself?  And really, how many developers need this level of Xojo/plugin management?

What else do you need/want to make your Xojo development life easier?

Xojo.Core.Date Revisited

Geoff Perlman wrote a blog post https://blog.xojo.com/2017/11/04/get-better-dates-with-the-new-xojo-framework/ on how the new Xojo.Core.Date gives you a better date.  Better in that it does a superior job of handling timezones.

I will concede the point that the new Xojo Date class is better at timezones.  Timezones are icky and there are various areas of the world where they observe only partial increments of timezones.  The existing, global framework simply can’t handle those geographical timezones properly.  In addition to that, the global framework can get it wrong.  So the new framework is inherently better with timezones:  got it.

Where Geoff’s blog post goes sour, in my opinion, is when he talks about how the new Xojo Date and DateInterval classes cause more code but then goes on to show how it can made shorter.  I think his shortened example is indicative of the overall problem with new framework.

He starts with this example (note I am not implementing the Using keyword on purpose):

Dim d As New Xojo.Core.Date (2017, 11, 5, Xojo.Core.TimeZone.Current)

Dim di As New Xojo.Core.DateInterval

di.Hours = 3

d = d + di

MsgBox(d.ToText)

The results is a message dialog displaying:  2017-11-05 02:00:00.  This is what the old Date.SQLDateTime method returned and what many developers need for database SQL operations.

He then goes on to show that this code can be reduced to:

Dim d As New Date (2017,11,5,TimeZone.Current)

Dim di As New DateInterval(0, 0, 0, 3)

d = d + di

MsgBox(d.ToText)

Sure, it’s reduced, but now we’re passing parameters into the DateInterval constructor that we have to just know what they are.  Granted, it’s not hard to figure it out but when I’m reading code I don’t want to have to ‘figure it out’.  Whereas the first example was pretty explicit (add three hours) now I have to parse the number of parameters to figure out it’s three hours and not three days or three months or three seconds.  If when writing code I accidentally leave out a 0 it wouldn’t be immediately obvious that I’m not adding three hours but three days.  Ambiguity is never a good thing and I can’t tell you how many errors I’ve found in methods that have multiple parameters with default values because someone (usually me) missed a parameter.

I’d also argue that the documentation for Xojo.Core.Date is using, at worst, wrong example code or, at best incomplete documentation.  Using the variations of ToText results in some counterintuitive results.  If you use Xojo.core.Locale.Current (as all of the Xojo examples do), you get results based on YOUR system settings.  Really what you should be using is Xojo.core.Locale.Raw.  Below is a table that shows the differences for the following line of code when run on my macOS machine:

Dim s1 As String = d.ToText(Xojo.core.Locale.X, Xojo.core.Date.FormatStyles.Full, Xojo.core.Date.FormatStyles.None)

X = Xojo.core.Locale.CurrentXojo.core.Date.FormatStyles.Full 2017-11-05
Xojo.Core.Locale.Current Results
Format Result
Xojo.core.Date.FormatStyles.Long Sunday, November 5, 2017
Xojo.core.Date.FormatStyles.Medium Nov 5, 2017
Xojo.core.Date.FormatStyles.Short 11/5/2017
Xojo.core.Date.FormatStyles.None
Xojo.Core.Locale.Raw Results
Format Result
Xojo.core.Date.FormatStyles.Long 2017-11-05
Xojo.core.Date.FormatStyles.Medium 2017-11-05
Xojo.core.Date.FormatStyles.Short 2017-11-05
Xojo.core.Date.FormatStyles.None 2017-11-05

So given these results it’s impossible in the new framework to get just SQLDate as the FormatStyles.None is ignored.  <feedback://showreport?report_id=50242>  Until this fixed, to do this on your own you would have to split the Text on the space and use the first half of it.

The only reason why anyone should ever use Xojo.Core.Locale.Current is to display the date/time to a user.  Xojo.Core.Locale.Raw should be used for everything else.  The distinction between these variations is confusing even to experienced Xojo users so I can only imagine the frustration from newcomers.

Ultimately, the New Xojo framework is not very discoverable and this leads to frustration.  While writing this article, to figure out the parameters in the Xojo.Core.Date.ToText function, I had to look in the freaking documentation.  Yes, there is the tips area but it’s not very helpful while you’re typing.  To see what the tip is you have to stop and hover your mouse over the method.  And that only works if it’s not an overloaded method.

This leads to some users complaining that Xojo isn’t as much ‘fun’.  At first I pooh-poohed the idea but the more I think about it, it’s true.  The new Xojo framework is verbose and hard to discover and therefore not as much fun.  I work in this language every day and while calling it ‘fun’ might be a bit of a stretch I can tell you that using the new framework isn’t fun.  The two client iOS projects I’ve done in Xojo have been painful for a number of reasons and not being fun is a valid but minor point.  I don’t find the documentation to be nearly as easy to read and discover related topics, and frankly the new framework seems to make things harder than necessary.  Certainly there is a ‘this is the way I like it’ factor you’d get from someone with nearly twenty years using a language but I do feel that the new framework is needlessly nit-picky.

My first blog post https://www.bkeeneybriefs.com/2014/12/xojo-core-date/ on the Xojo.Core.Date class was in December of 2014.  It’s nearly three years later and we’re still dealing with bugs and idiosyncrasies and it’s not widely used despite clearly being ‘better’.  It’s no wonder why people don’t really want to use the new framework and I wonder if any parts of the IDE are using the new framework.

What are your thoughts on the Xojo framework?

Xojo 2017 R2.1 and Updated Roadmap

I’ve had a hellacious travel schedule the past six months so I apologize that I’ve not been up to snuff on Xojo news. Last week Xojo 2017 Release 2.1 was made public and earlier this week Xojo CEO, Geoff Perlman, penned a blog post about the short-term roadmap for Xojo. Let’s dig in!

First, the 2.1 release has a mere 16 bug fixes in it. This dot release fixes some critical Linux, and Windows bugs. A few IDE bugs were addressed and the PostgreSQLDatabase plugin was updated. Many of these bugs won’t affect everyone but it’s definitely worth upgrading from R2 if you have not already done so.

Now on to Geoff’s short-term roadmap. You can read the entire blog at https://blog.xojo.com/2017/09/19/the-short-term-xojo-roadmap/. To summarize it in a nutshell: 64-bit is taking them longer than expected.

To this I say, ‘Duh’. Anyone who expected 64-bit to be done by this time hasn’t been around very long. Xojo has consistently blown their estimates for most (all?) of their big projects. The transition to Cocoa from Carbon took a lot longer than originally announced. iOS took longer than expected. The introduction of the Xojo IDE from the Real Studio IDE was also delayed (as a side note I’m still amused at the accusation that I personally caused a 6-month delay in the Xojo IDE due to a blog post).

The point isn’t, ‘Oh my gosh, Xojo has yet another delay’ it’s that Xojo is very bad at estimating this stuff. Some of this is on them but some of it is beyond their control. Supporting mac OS, Windows, Linux, iOS, Raspberry Pi, desktop, console, and web apps is a mammoth undertaking. I am constantly amazed at the magic Xojo performs without my knowledge. To me it ‘just works’.

Apple, bless their hearts, changes things on a whim every year at a minimum (sometimes even more often than that) and causes Xojo to play catch up. And they usually do this with little notice. The current change being that the iOS Simulator will no longer support 32-bit apps so guess who has to scramble to make it work now?

Linux distributions seem to change daily. Xojo has to scramble to catch up with those changes too. They recently updated Xojo to use GTK3 and that was a big deal. They sort of had to do this upgrade because GTK2 was pretty long in the tooth. I can only imagine the internal efforts they did for testing.

Windows doesn’t change much for better and worse. The technology from ten years ago still works but that’s not necessarily the best ‘modern’ approach for Windows. Many users complain about flicker when windows are resized. This is a valid complaint but because Windows does not double-buffer their windows like Mac and Linux the older Win32 controls flicker like mad under many circumstances.

Regardless, 64-bit is the roadblock for other things. If you were hoping for Android, interops, or plugins compiled in Xojo to be released in 2017 you’re out of luck. This is what happens with a small development team. There simply isn’t enough man-hours to work around delays in some projects. This happens in ALL software development products but with a small team this impacts everything.

The only bit of good news from Geoff’s blog post is that the Windows framework is getting a big update. This update will ‘dramatically’ reduce flicker according to Geoff. No word on what exactly they’re changing though a thread on the forums from Aug 9 might give a little clue. Changing transparency seems like a little thing but perhaps they plan on implementing a double-buffering scheme. Until we find out more it’s not worth speculating. It seems like this new scheme might make it by the end of this year. So either this has been in the works for a long time or it’s not huge from a coding standpoint.

Promising services based on a product feature that doesn’t yet exist is dangerous. If you were promising Cocoa, iOS, or 64-bit versions before they were actually released you did your customers a disservice. I remember one XDC where a database ORM (Object Relational Model), similar to ActiveRecord, was shown with a lot of interest by those attending. I’m still waiting on it. The lesson is to not depend on vaporware!

So what are your thoughts on R2.1 and the Short-term Roadmap?

Xojo 2017 Release 2

Last week Xojo 2017 Release 2 hit the download servers. This release has the usual mix of new, changes, and bug fixes. At first blush it doesn’t seem like there is a lot to mention but there is, but I’ll get to that in a minute.

Before we get into the highlights it’s worth mentioning, again, that R2 does not have 64-bit debugging for Windows. As Xojo mentioned in their blog post (http://blog.xojo.com/2017/07/26/the-best-laid-plans-64-windows-debugging/) the LLVM compiler and toolset just wasn’t ready to be included in R2.

Despite the lack of a 64-bit debugger for Windows a number of things were corrected in 64-bit Windows builds. Icons are now applied correctly and they also show the correct version information. The 64-bit MS SQL Server database plugin now works when compiled on the Mac. Game Input Manager also works in 64-bit now. Images assigned to an ImageWell are now drawn properly.

Also related to 64-bit builds, the Split and Join functions for Unicode strings is much faster and Replace and ReplaceAll behaves like the 32-bit versions. Exceptions no longer leak memory. Virtual Volumes now work. Copying a picture to the clipboard now works. XojoScript is now available in 64-bit builds.

Linux GTK3. See Xojo blog post (http://blog.xojo.com/2017/08/15/goodbye-gtk-2-hello-gtk-3/) detailing some of the changes. The switch to GTK3 was necessary for HiDPI support and now scales automatically on integral scale factors (i.e. 1x, 2x, 3x, etc). This also lets child controls clip properly on parent controls whereas they did not always clip properly in prior versions.

Be aware, though, that this switch may affect how your controls draw. While it’s always been true that default control sizes are bigger in Linux you could sometimes cheat and use the open events (or subclass the controls) and make them slightly larger in Linux and perhaps make the system font a little smaller and things would look good enough to not require a bigger UI change. With this switch to GTK3, however, it seems like some controls, PopupMenu and Pushbutton come readily to mind, in that their caption location is definitely lower than the prior version thus making them look odd without more work. For me, what worked in R1.1 just doesn’t look good in R2.

This change begs the question that if we could make a Xojo theme for Linux that would make control heights smaller, text sizes smaller, and change the caption locations to make this a non-issue. Perhaps someone with more knowledge about Linux themes could answer that.

A few other things that might ruin your day in Linux is that not all Linux distributions now allow you to remove the border of TextFields. It wouldn’t surprise me if additional issues are found in GTK3 as time goes on.

iOS has a couple of important changes. The first is that the AutoLayout Priority property in prior versions was calculated on its own. In R2 new constraints get the ‘Required’ priority. Any existing projects should get thoroughly tested on multiple sized devices to make sure nothing needs to be fixed. In our own testing we had to simply change the priority to Required to fix any issues.

Another iOS change that may affect you is that setting the CopyFileStep to the “Frameworks” destination now properly creates the Frameworks folder inside the iOS package and puts the files there. Before you had to create a manual directory for it to work properly.

Another nice fix is that a numeric suffix is no longer added to copied iOS controls unless they need it. This was an annoying bug. Not hard to fix but annoying nonetheless.

The web framework received some attention in this release as well. The WebPage width and height properties are now correctly updated before the Shown event is fired. A number of WebMapViewer errors were fixed including an annoying JavaScript error on the first refresh and where it would fail if there was more than one instance used in the app at a time.

The Session timeout now takes touch events into account when figuring out the last interaction with the app. In addition to that, web apps now try to reconnect if they’ve lost connection to the web app and will continue to do so for three minutes or until the user navigates away from the disconnect screen.

The Listbox control received some updates. For Linux, HelpTags are now positioned properly and in Windows they disappear properly when the mouse leaves the control Also in Windows the endcap is drawn correctly and headers no longer flicker when hovered over by the mouse or when clicked on.

A regression was reported for R2 that affects dragging items to the Listbox. In Windows the X & Y coordinates are incorrect. This was reported in Feedback 49190.

New Drag events were added to the Listbox. Except for a jumbled paragraph in the release notes I’m not sure anyone would notice. I would spend more time talking about it but as far as I can tell these are not documented in the Language Reference, either local or online and there is no example. I find it inexcusable to have a major change to such an important control not be documented. This seems like it should automatically make it into the documentation. Do better Xojo!

The IDE received a bunch of bug fixes and changes. New items in the Menu Editor no longer ‘fly in’ and arrow keys work now. Long error messages are wrapped and row heights adjusted in the error reporter are adjusted as needed (as a side note does this forebode variable height list boxes?) Recent Items in the Project Chooser now show size, date created, and date modified when possible. Pressing the Escape key now acts as a “Revert Now” to changes.

It also appears that a regression bug was introduced in Raspberry Pi. Button.Action events don’t fire if using a touchscreen. They appear to work properly when using a mouse. Feedback 49221.

As always, look through the release notes to see what else has changed. It’s also a good idea to test your applications thoroughly when upgrading to a new version.

Xojo 2017 Release 2 was chock full of new things and changes. I hope a dot release is issued to fix some of the bigger regressions. Up next is 64-bit debugging and remote debugging, the new plugin format, interops, and Android. Think they can get it all done in 2017?

Sorry for the delay in getting this out. Those pesky clients sometimes want on-site help and the last thing I feel like doing is writing after a long day of coding.

 

Software Development is Fluid

Software development is fluid. Some bug fixes and feature requests that seem simple are often not so simple, or, take a lot longer than originally thought. Some that seem like they’re hard are not, or, take practically no time at all. What’s worse, is that sometimes you don’t know what the level of effort is until you start the work.

Historically, the only way to know what future feature sets will be in Xojo is attend a Xojo developers conference where the CEO of Xojo, Geoff Perlman will sometimes tell us what’s coming up. These announcements are almost always preceded with a “we expect to release that feature in this timeframe.” It’s smart because he knows that software development is fluid.

The problem is that what we hear is, ‘Release X will have this feature.’ We hear a promise despite all the hedging made by Geoff. Like every user I want that feature now and there are times that I need that feature to sell some work. I think it important to remember that when selling any work you have to use the current (and proven) technology instead of what’s coming up.

64-bit Remote Debugging in Windows comes to mind. Geoff at last years XDC said that in the first quarter of 2017 Remote Debugging will be available across all platforms. In Berlin in May he said Release 2. Well, as they said in their blog post at http://blog.xojo.com/2017/07/26/the-best-laid-plans-64-windows-debugging/ this isn’t going to happen for 2017 Release 2. Apparently the LLVM compiler and toolchain isn’t ready for primetime yet. So instead of giving us a buggy (and probably unusable Remote Debugger) they pulled it.

I understand and applaud the decision. Software development is fluid and some things are out of their control. Since Xojo is not in charge of the LLVM compiler and toolkit for Windows they are at the mercy of other developers. It stinks but that’s just the way it works.

I know that some of you will jump on the ‘let’s criticize Xojo’ bandwagon and you have every right to do so. However, keep in mind that they do hedge their announcements with ‘we plan’ or ‘we expect’ to do x by this time or this release. If we want to get any information out of them about future plans we need to cut them some slack. They have zero obligation to tell anyone about their long-term plans.

What Xojo does is magic. For a vast majority of Xojo users it ‘just works’ on every platform they target. It’s been a long time since I’ve had something work on one platform and not on another (that wasn’t my own fault). Think about it: Desktop, Console, and web apps for Mac, Windows, Linux, and Raspberry Pi just work with a simple checkbox. iOS applications are different and use the new framework but I expect Android (promised by end of year) to be very similar (if not identical in most respects). And let’s not forget 32-bit and 64-bit apps just work too despite 64-bit being a relatively new target.

Software development is fluid and every year Xojo has to deal with whatever Apple, Microsoft, Raspberry Pi, all the Linux distributions, and all the browsers throw at them. I’d say they’ve earned some slack from us users. I’d rather have a release that works than one that doesn’t (I remember some that didn’t work).

Does this mean we should stop criticizing Xojo? Pft. Please. The day I stop criticizing Xojo is the day I stop using it. It is our responsibility to keep reminding them of what we need. A long standing criticism are bugs that have been reported and have been around a long time. But yet every release has many dozens of fixes so they do fix a lot of bugs. The one’s that are hard to excuse are new features that have obscure bugs that last multiple releases.

Some of the criticism must be on us users. We don’t always report bugs. Never assume someone else has reported it. Always try to give them an example project demonstrating the bug. Xojo has some responsibility for this, too, as Feedback hasn’t always worked for some users. This is part of the give and take of a software development tool company and its users. We need them and they need us.

So yes, it stinks that 64-bit Remote Debugging isn’t available for Windows yet. And you’ll note that they’ve not said when it will be available. We can hope that it will happen for Release 3 but until the next beta round we won’t know for sure. I expect that all of their other plans for 64-bit are probably delayed too. A 64-bit IDE might be a few releases away. We don’t know what this means for the new plugin format, or Android, either. Software development is fluid so go with the flow until we see something solid.

Happy coding!

Is Xojo the Right Development Tool

Quite often prospective clients, and developers thinking of learning Xojo, ask my opinion of Xojo.  They are about to embark on a journey spending tens of thousands of dollars on a cross-platform tool and they want to know if Xojo is a right for them.  It’s a good question and I’ll share some of what I share with them in no particular order.

Xojo is pronounced “Zo Jo”.  I can’t tell you how many times I’ve heard it pronounced “Ex Oh Jay Oh” or something else.  They just don’t know and I think it spooks a lot of people as it doesn’t exactly roll off the tongue.  Xojo has been around under various names (REALbasic and Real Studio) for twenty years – all with the same company.  At that point it’s easy to name a dozen languages/development environments that were popular twenty years ago that either don’t exist today or been sold so many times that they’re now obscure tools.

This isn’t your fathers BASIC.  Xojo uses the BASIC syntax but this isn’t like the venerable Visual Basic or even older GWBasic or QBasic.  Xojo apps are NOT interpreted at runtime – they compile down into native code for each of the platforms.  The language itself is a modern object-oriented language that happens to use the BASIC syntax.  Xojo is updated three to four times a year and has undergone a lot of upgrades in the past two decades.  It first supported 68000 code, then PowerPC and Fat applications, Carbon, and now finally Cocoa on the Mac side.  They’ve added Windows, Linux, Raspberry Pi (Linux ARM), desktop and console application targets.  In the mobile space they’ve added iOS, and by the end of the year Android.  They’re also in the middle of the transition from 32-bit only applications to 64-bit applications.  For the most part things ‘just work’ and developers don’t experience too many issues (bugs happen but think about how many targets they’re supporting!).

Xojo applications are self-contained.  Take a compiled Xojo application and (with very few exceptions) literally copy the files to another computer and the application will just work.  Even Windows applications don’t need an official installer, however, it is recommended since most Windows users are comfortable and familiar with using them.  Most Mac applications are installed via drag-and-drop from a disk image but an installer can be used on the Mac as well.  This ease-of-installation is huge and it’s rare to have “DLL Hell” issue since all required libraries and resources are bundled together.  This does make the resulting output larger than some other development tools that depend on system libraries but I’ve rarely seen this an issue.

Xojo provides nearly everything you need in one tool (with some caveats).  The Xojo IDE has Code, Form, Menubar, Database, and Report editors (to name some of the big ones) in one tool so you never have to use another tool.  We’ve found the database editor to not be powerful enough so we prefer external database editors.  The built-in reporting tool also isn’t very powerful so we created our own reporting tool (Shorts) which has served us well in our consulting projects.  The nice thing is that all of the built-in tools work seamlessly with each other so the tools that are powerful enough for you ‘just work’ with few hassles.  The editors try really hard to protect your from hurting yourself while other tools are just a big text file that must be in an exact format.

The Xojo community is incredibly helpful.  The Xojo Forums are filled with some of the most helpful people I’ve ever met.  Some of the Xojo engineers respond to questions, but usually the community answers before they get to it.  Many other support forums are rude and condescending to newcomers to their language/tool.  The Xojo forum has even been known to answer questions about other tools.

Xojo is a cross-platform tool and because of this it has some compromises.  Controls are often the lowest- common denominator.  Grids especially aren’t as powerful as some are used to in the Windows world.  This is mainly because complex grids are not common in Linux and Mac environments.  Other controls have similar issues.  Things like automatic spell checking in TextArea’s are platform specific as on the Mac.  At times it is disappointing that there aren’t more control options for Xojo right out of the box (think date and calendar controls) but thankfully there is a third-party market for controls and libraries for Xojo that can often help.  Even though much is provided for you, it’s possible for a developer to use OS API’s using Declares that can significantly modify the appearance and functionality for some applications.

Xojo is a Rapid Application Development (RAD) environment.  Between the all-in-one IDE and the language creating applications in Xojo is fast.  This means that an initial investment can get your app developed faster and cheaper than many other languages.  Obviously some of this depends on the developers doing the work but it can make a huge difference.  We’ve always told clients that if they’re not happy with Xojo performance after the initial release they can use our code as the proof of concept to the developer in whatever language they choose.  There have only been a handful of clients that have ever switched languages after release and that’s usually been switching from desktop apps to web app.

The cost of Xojo isn’t very high compared to some tools.  For $699 per year per developer you can create web, console, and desktop apps for Mac, Windows, Linux, and Linux ARM plus iOS apps.  That’s all in the same environment and same language and with the exception of iOS applications (which requires a Mac) you can use Mac, Windows, or Linux to create everything.  Many developers use third party controls and libraries and even those are relatively inexpensive.  Plus, there are no royalty fees for your Xojo made applications.  All-in-All it can be a relatively inexpensive tool.

What considerations have I missed?

Xojo 2017 Release 1.1

Xojo 2017 Release 1.1 hit the web today.  This dot release contains some very important Windows framework bug fixes related to printing and is recommended for all users.  There are a few other changes as well.

For those that are trying to print reports in Xojo this release fixes some critical bugs.  First, the Printer.Landscape property is now honored whereas before it used the default printer orientation.  Second, the PrinterSetup.Setup string is now built and restored properly and works when set.  These fixes now allow reporting tools like BKS Shorts to print properly in landscape mode when restoring the PrinterSetup.SetupString.

A couple of exceptions were fixed in the IDE.  Toggling the line number display in Windows no longer disables the cursor.  You can now toggle the line numbers in IDE scripts.  Duplicating an instance of a container control no longer create an invalid control set.

It is important to recognize the value of this dot release.  For many developers this isn’t an important release but for those of us that rely on printing this was a big deal.  2016 R4 broke printing almost entirely and it was mostly corrected in 2017 R1.  Each release of Xojo brings new features and many bug fixes it’s often very difficult to revert to an older version.  So kudos to Xojo Inc. for doing a dot release.

Discoverability in Xojo

Xojo has a big API and it’s impossible to know everything. This is made even more impossible since Xojo gets updated three to four times a year and, in the past couple of years, they’ve added two new targets (iOS and Raspberry Pi) and a new framework that is going to be used more in the future.

Despite my nearly sixteen years of constant usage I find myself struggling, at times, to find things in the Xojo documentation. Don’t get me wrong, I can usually guess at the right location but I think discoverability in Xojo is lacking. I think this hurts all developers, not just those new to Xojo.

Local Language Reference: This was rewritten a few years ago and is very reminiscent of the popular documentation tool Dash. It starts with a basic landing instruction page along with the overall list of ‘sections’ and the user can either drill down in the list or use the single search field to filter the list.

The nice thing about it is that it’s fast. Type in ‘Record’ and you’ll quickly get every entry that has record in the name (it’s a lot, by the way). Each entry has a blurb on what it does, a listing of the Events, Properties, and Methods. You can click on any of these and you’ll be taken to the page for that particular item. Many entries have a notes section and example section.

Perhaps more importantly, some entries have See Also information. For example, the Recordset class entry can take you to the Database Class, DatabaseField, Database Record, etc. All things an average developer might eventually want to know in relation to databases.

What what I’ve gathered the local Language Reference is simply an extract of the wiki (below) and put into a database that the IDE accesses.

http://docs.xojo.com (the Wiki): If you’re not using the local Language Reference, you’ll be taken to the online Wiki hosted by Xojo. As far as I can tell this is exactly the same information as the local Language Reference, just shown in a web browser (or HTMLViewer if you’re using a Xojo window). This is handy for providing links to the documentation for people in the Forums, because yes, sometimes people don’t know about the Wiki.

Since it’s essentially the same as the local Language Reference it’s only real advantage is that it can be updated without a new Xojo release. The drawback, of course, is that you need an internet connection and because of this, and speed, I prefer the local version.

There were also some contributors to the wiki. If you look at http://docs.xojo.com/index.php/Special:ListUsers you’ll see the people that could modify the wiki.  I’m not sure how much this was used but I feel that this should be an important factor in documentation.  And because it’s a wiki, is there anything stopping someone from hosting a copy of this and modifying it?

http://developer.xojo.com (Xojo Dev Center): The first impression is that it’s a cleaner look since it uses a large font, has ample spacing, etc.. You have the option to save the page or the entire site as a PDF document. All of the new Xojo framework is in this format so I suspect this might be the format of the future.

Find Xojo.Crypto, for example, and the page lists a summary of the class. It lists the Enumerations, methods, related classes, platforms and project types supported, lists example projects and any related classes. Click on any of those items and you’ll be taken to the section describing it in more detail

I don’t find the new documentation all that useful. Everything about that class is in one large page rather than individual pages. It gives the documentation a cluttered and hard-to-use feel. A great example of this is selecting one of the methods and having the entire page scroll to the method. Hitting the browser back button does not take you back to the top like I expect so I’m forced to manually scroll to the top.  Not exception onerous, mind you, but harder to use than it should be, in my opinion.

I also find the notes and example sections far less complete than what I would like. And since there’s no way to add my own notes to the documentation the only option I have is to created a Feedback report to get it changed.

Creating a feedback report isn’t a great solution. There’s the right and proper way to use classes and then there are edge cases that are how real-world developers might use them. This is where the ability to ask a question and then have contributors and/or Xojo engineers answer them is helpful.

To the best of my knowledge there is no way for the community to add or modify this content. This does the experts in the community a disservice since there are times when we could add helpful information. To do this now, we need to submit a Feedback report.

New Project Pane in the IDE: The Xojo Examples directory is chock full of examples. Some better than others. Create a new project in the IDE and look at the Examples section. There are hundreds of projects to choose from but finding them is difficult. Sure, I can sometimes guess where something is, but should it not be easier? If I’m looking for FolderItem examples it sure would be nice to search for FolderItem and show me all projects that use it.  It’s a common class and I’d like to see all the examples that use it.

I found something in iOS quite by accident last week when I decided to peruse the iOS projects and found something I needed. Filter functionality would have made this trivial and it would have made my task much easier.

I don’t claim that there is an easy way to add this functionality as it simply does a directory scan. To do this type of searching you’d have to either search the projects on the fly (ew…) or come up with metadata on each project and store it in a database. This is not impossible task, and I think it would help all uses out a lot. I submitted a feedback report on this <feedback://showreport?report_id=47629>

Xojo Forums: The Xojo Forums are a wealth of information. Years worth of questions and answers make this my go-to resource for general questions. However, the built-in search is just a step above worthless and it’s sometimes easier to use Google instead to find the information that should be a simple search in the forum.

The Xojo Forum is often slow to respond and the Notifications dropdown is, for me at least, an exercise is patience as it’s so slow. It’s obvious that esoTalk does not scale properly with 314,000 posts. Perhaps it’s time to look into something more robust.
Discoverability in Xojo isn’t important for just new developers. It’s a useful and important feature for everyone since the API is too big to know everything. While there are many parts of Xojo that help you in discovering classes, events, properties and methods you didn’t know about they are scattered and disorganized. Searching is an important feature and there are times when searching doesn’t exist or isn’t as helpful as it should.

If you could make Xojo better in terms of discoverability, what would you do?

Berlin Xojo Developer Conference

We are 30 days away from the biggest Xojo developers conference of 2017.  Monkeybread Software is hosting this two-day conference in Berlin, Germany May 4th and 5th.

There are currently 79 attendees from all over the world which is an impressive number.  Let’s make this event even bigger.  Sign up today at http://www.monkeybreadsoftware.de/xojo/events/berlin-2017-event.shtml.

I’ve made no secret of this over the years – I love these events!  It’s a great way to connect with other Xojo developers and talk Xojo and meet all those people you’ve ‘talked to’ on the Xojo forums for years.  I’ve also made first contact with a lot of clients at these events too.  In some cases it’s been the only face-to-face meeting I’ve ever had with them.

Hope to see you in Berlin next month.

Xojo 2017 Release 1

The road to 64-bit took another step forward today with the release of Xojo 2017 R1.  This important release let’s you do 64-bit Remote Debugging for some targets with some important caveats.  It also adds the ability to Remote Debug Raspberry Pi applications.  And, as with every Xojo release there are a mix of new features and important bug fixes.

64-bit Remote Debugging

2017 R1 lets you remote debug 64 desktop, console, and web applications on macOS and Linux assuming that neither one uses XojoScript.  64-bit XojoScript is still missing in action which is preventing the IDE itself from being 64-bit.  I believe this is scheduled for Release 2.

Missing is the ability to remote debug 64-bit iOS, and 64-bit Windows applications.  Presumably iOS shouldn’t take long since macOS is already working.  From what I gather the LLVM compiler for Windows isn’t as far along as macOS and Linux so it’s taking longer to get working.

The Remote Debugger Stub has been updated to version 2.1 and now has 32-bit and 64-bit versions for Mac, Windows, and Linux, and a Linux ARM version for the Raspberry Pi.  The 64-bit version can switch between 32-bit and 64-bit correctly depending on the target setting in the IDE.

Major Changes

One of the important updates to the web framework is causing major issues with HTMLViewer controls that depend on StatusChanged events.  The web standards group decided that the StatusChanged can no longer be fired via javascript any more and the updated WebKit engine in R1 breaks code that depended on the old functionality.  For developers using Tim Parnel’s HTML Edit you will have to wait for an update before upgrading to R1.

The web framework now allows developers to use HTML in many of the controls.  WebLabel, RadioGroup, Listbox, Toolbar items, and SegmentedControl can use HTML tags in their captions.  Example:  Label1.Text = “This is a line with <raw><b>bold</b></raw> text in it.”

The Listbox has been updated for all desktop targets and now allows you to customize the disclosure widget.  This seems like an odd change.  Could this be prep work for something in a future release?

SSLv3 on Xojo Cloud services is deprecated and will be disabled on all servers in summer of 2017.

One of the new options in the Preferences is to force Standardized Format after every line.  This mirrors the contextual menu command Standardize Format which looks at the current selection and changes the case of every Xojo keyword to match it’s default.  So if you typed ‘recordset’ it will change the case to ‘RecordSet’.  It does nothing for your own variables (which would be more useful, in my opinion, and it looks like a future release may allow for that).

Also new in the preferences is the ability to change the keyboard shortcuts of all of the menus in Xojo.  If you don’t like the Remote Debugging key combination you can change it to something else.  One that I think I will change is the Build (command/control B) to something (perhaps command-option-B) since I often accidentally build once or twice a week when simply trying to paste code.

Bug Fixes

A number of Windows framework bugs were fixed.  Probably one of the more important ones is with Xojo.Net.HTTPSocket.  The socket events are now called when it is created within a thread.

Another big Windows bug fix is in Direct2D printing (broken in 2016 R4).  Font sizes were incorrectly reported by the graphics object and thus caused all printing to be messed up.  BKS Shorts (our reporting tool for Xojo) works properly in 2017 R1 when printing in Windows.

Windows received a number of important HiDPI updates.  Note that the application icon for 64-bit builds is still not being set.  One workaround is to set the associated icon via your installer.  If you want an example of how to set this via an Innosetup script, let me know and I’ll share it with you.

The IDE received a really big batch of bug fixes in R1.  The amount of them makes it impossible to list them all here, but one that’s been around for a long time is that ellipses (…) are no longer saved when creating the method signature.  That bug hits me every now and then.  For the entire list of IDE bug fixes, please see the release notes.

Conclusions

The road to full 64-bit compatibility is happening incrementally.  R1 is another step in the journey and it’s nice to see progress.  It is my hope that 2017 R2 will have Windows and iOS 64-bit remote debugging (in the iOS Simulator – I doubt remote debugging on an actual iOS device will ever happen).

Xojo has said that the Windows IDE will require 64-bit at some point in the future (even though it will still be able to build 32-bit Windows apps) and that future might be sooner than we expect.  I’m curious on how many people think this is a good or bad?

This release has some nice goodies in it.  The remote debugging for the Raspberry Pi has been awesome.  I’m working on a project right now that advanced in a number of days what had taken me months of work to do before.  The work in Windows to correct the Direct2D printing issues is most welcome and the number of HiDPI fixes is nice too.

I’ve been using R1 in regular production work for a number of weeks for macOS, Windows, Raspberry Pi, and iOS development and I’ve been pretty happy with it.  It’s been stable and I have no complaints with it.  The only thing I didn’t spend any time on in this release cycle was web.

Anything new in 2017 R1 that you are happy about?  Anything that disappointed you?