xojo_uistate

I am using the much talked about ‘vcp’ format with SmartGit. I just had a strange ‘occurrence’ and I wondered if I am doing the right thing. I have been including all files except things like .DS_Store (Mac) and Thumbs.db (Windows) and so I included .xojo_uistate. Having just done some work on my MBP I updated my remote version on GitHub and then synchronised it back to the Windows PC. When the project loads it would crash, I would get a very small Xojo window and a ‘Xojo encountered an error’ message. Attempting to log an error report showed me that there was something wrong with a Picture constructor and so I edited one source code file to comment out where this had changed recently but no success. Went back to the MBP and it all loaded properly (without synchronising the newly commented code), scratched my head…

Then I thought - small Xojo window? xojo_uistate? so I deleted the xojo_uistate file on the Windows PC and the project loaded but initially with no left hand project explorer, hit Ctrl-K and it all came back to life. So should I be versioning the xojo_uistate file? If I do then it looks like it can go wrong from Mac -> Windows but if I don’t then presumably it could go wrong if I delete something that was last being viewed on say the Windows PC when I edit on the Mac. Is there a rule that xojo_uistate should not be versioned or a bug moving between both platforms?

Yes, do not include the xojo_uistate. There’s a reason why it starts with a period: It’s meant to be invisible and copy to be copied around (which, of course, never works :slight_smile: )

The file is meant to store your current open tabs and window sizes. If you’re moving to computers with different screens, this could cause problems. And especially if you share the project with other people, you do not want your own viewing preferences push on others.

So, tell git to ignore this file pattern and also delete it from the repository so that it never gets updated again accidentally.

Don’t include that one either
Basically thats the personal state that you have in the IDE
If you’re a lone developer it won’t matter but on a team it will

In this case I am a ‘lone’ :slight_smile: I have excluded it now thanks.

I am hoping that the xojo_uistate handling is smart enough to ignore anything that it cannot find so it can deal with the scenario that I delete something on one machine that I was previously last looking at on another. At least it wasn’t difficult to recover from the problem.

Since you’re using Git, you can exclude files from being tracked by adding them to the project’s .gitignore file. The .gitignore file lists file name patterns that git should ignore. e.g.:

#Windows
Thumbs.db
Desktop.ini

#Mac
.DS_Store


#RB
Builds*
*.debug
*.debug.app
Debug*.exe
Debug*/Debug*.exe
Debug*/Debug*\\ Libs
*.rbuistate
*.obsolete
*.xojo_uistate

[quote=30825:@Carl Clarke]In this case I am a ‘lone’ :slight_smile: I have excluded it now thanks.

I am hoping that the xojo_uistate handling is smart enough to ignore anything that it cannot find so it can deal with the scenario that I delete something on one machine that I was previously last looking at on another. At least it wasn’t difficult to recover from the problem.[/quote]
Reading the uistate restore the views where it can.
If it can’t it doesn’t.