Mac OS X: experiencing oddities with Save As... in X-1.0rc3

Asked by Bob Breeding

Just lost an afternoon's work of writing and debugging. Having gotten everything the way I wanted it, I did two Save As... saves of the script. When I reopened them a minute later to do a demo, the scripts were not there in their entirety. Instead I found versions from before I started today and all the additional code gone - from both files. I had the full scripts in the foreground pane, having just run them, and used the FILE > SAVE AS... command to create a new file and replace an existing one.

Anyone else run into this? Particular to Mac OS? Is there a new version past 1.0rc3? (I would like to use the default park in the INPUT command as well.

Well, back to work. At least I know what to put back in.

Cheers

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

Have a look at: faq 1766

update to newest build

There is still an irritating effect:
When opening a script by double clicking in the finder, the scripts open at last IDE shutdown are opened as well again. So the double clicked script might be opened twice.

On my Mac, I always open the IDE separately and use the File->Open menu, after having checked, which tabs have been reopened.
On the other hand I usually close all tabs, before closing the IDE, so nothing is reopened at restart.

--- One more thing: NEVER rename Sikuli scripts in the Finder outside the IDE, without changing the contained .py's name (must be identical) as well.

--- One last thing: When using SaveAS with a script, that has already been saved before, the old .py is not purged from the script bundle currently:
you have script1.sikuli (contains script1.py)
you save as script2.sikuli - the tab's name changes to script2.sikuli
you have in script2.sikuli: script1.py AND script2.py

If you now rename script2.sikuli back to script1.sikuli in the Finder, it suddenly shows the old version of script1.py, since this still exists.

On Windows/Linux, this is much more obvious, since the .sikuli are normal folders. On Mac users usually do not look into bundles like .sikuli.

Revision history for this message
Bob Breeding (bob-breeding) said :
#2

Thanks RaiMan, that solved my question.

Revision history for this message
Bob Breeding (bob-breeding) said :
#3

RaiMan - what great tips.

What I get from this if I want to create a backup copy is to open from within the IDE and do a save as, then go in and clean up the pkg by removeing the old <name>.py file.

Makes sense that you can't make backups on the iOS level if they rely on pkg name as they appear to.

Again, thanks.