Buttons have suddenly lost focus

Xojo 2016R3 and WIN7.

I have a group of 6 buttons that (normally) step through using the keyboard spacebar. The preceding button code initiates a button.SetFocus event for the next. This was working fine and has been for the last couple of months. Now, although the button “looks” like it has the focus, when I press the spacebar . . . nothing.

Fortunately I manually create incremental backups. When I go back to yesterdays version - all works as it should. I haven’t made any dramatic changes - a few labels, a global variable and some math.

I can easily enough go back to the previous saved version and make the new changes, but I’d rather know how or what caused this.

I’m sure it’s not Xojo, but perhaps a seemingly trivial change that I’ve made that I can’t remember. Weird and annoying! . . . No, not me, just the problem :stuck_out_tongue:

If you have Arbed then compare the two files. Or export them as XML and use DiffMerge for comparison.

You might also have a bit of file corruption in the new one.

Over the years I had several cases of file corruption and Arbed saved my bacon (even when Xojo itself couldn’t open the project without crashing).

Thanks Markus, I’ve only got a single desktop license and from what I remember I can’t export to XML. I also have no idea what you mean by “Arbed” nor do I particularly care, because I’m sure whatever is meant by “Arbed” It won’t be of any help anyway.

I’m hoping the file hasn’t become corrupt. Not because it’s corrupt, but because it can happen in a random way. Surely not.

[quote=306416:@Steve Kelepouris] I also have no idea what you mean by “Arbed” nor do I particularly care, because I’m sure whatever is meant by “Arbed” It won’t be of any help anyway.


You should look into Arbed anyway : http://www.tempel.org/Arbed/


if you do that, stop using other applications when running Xojo.

At last, clearing the Xojo cache before firing Xojo is always a good idea.

Whatch this forum, between 15 to 20 fields below top :wink:

Thanks Michel, you are forever the teacher and I’m the recalcitrant student :slight_smile: I did look at the link but I don’t want another level of complication.

If my file has become corrupt through no valid reason, then I’m very shocked, surprised, disappointment and scared. Tomorrow, I’ll carefully make the same changes to the backup and go from there.


I don’t run any other applications when coding in Xojo. I’ve read about clearing the cache sounds worthwhile - how is this done?

There is a Cache folder in the system. Xojo store stuff in files at IDE compile/ run time.

Check in the User’s /Library/Caches/Xojo/ folder on OS X / macOS.

Umm. . . Windows?

Considering how often ‘clear the cache’ is suggested as an option, isn’t it odd that Xojo doesnt have a menu item to do it for you?

In the third person:

Hanging from the rafters, his half lifeless body swung randomly across the room. His filthy and un-manicured big toe accidentally swiped across the keyboard and pressed the spacebar. . .

In his blood engorged, oxygen deprived brain, his final thoughts were: “That’s odd, it seemed not to work, but now it does” . . . oh dear . . .

Ok, I believe I know how this happened.

Hours before the problem occurred I renamed the file and quit Xojo. Later when I opened Xojo, I realised it was not in the recent files list, so I found the file and launched it.

Instead of it opening in 2016R3, it opened in 2016R4 (my last download) so I quit out, and opened it in 2016R3, did a bit of work and then noticed the problem.

Today I found the xojo scratch folder and deleted it but this didn’t fix it - there are likely other cache files I could remove but wasn’t sure which. In the end I’ve gone back to a previous saved version.

All is good now :).