Has anyone experienced a loading problem with main.nib?
For some reason I cannot fathom, I suddenly could not save my edited main nib file in the IB. The IB just quits and asks to make a bug report to Apple.
When I reopen my application in Xcode and rebuild it, I get an error and the application wont compile. When I go to the nib file and double click the main.nib to open it in IB, I get this error message: "The document “main.nib could not be opened”.
The only way I could recover from the problem (well, not lose my main nib but could not edit in the process) is to rename the main~.nib into main.nib and throw away the original main.nib. Then, I rebuild the application. But that means I cannot successfully edit my nib.
Anybody had experienced this and has a better workaround? Or is this a bug awaiting an Apple fix?
I am using Xcode 2.2 and Mac OX 10.4.7.
Thanks for any lead.
Hey archseed. Back in the earliler days of ASS, it was quite common for nibs to get corrupted. Oftentimes, the nib would spontaneously go bad, and the project would become lost entirely. I’ve not heard much lately about people having these problems regularly, but I can imagine that the problem might be the same. If working with your backup is not successful, then I’m afraid that the nib may be beyond repair.
One thing that I do on important projects, is to manually make backups of them by copying the entire project folder to a safe location, so I always have a good version I can revert to without having to re-create the entire thing from scratch.
Thanks for the advise jobu.
I have now resorted to what you had just advised…copying the entire project in a safe location just in case something goes awry.
Interestingly, when I restore the main.nib from the backup nib (main~.nib) and recompile, it would recompile successfully but the same problem recurs so it’s not a reliable workaround. Now, by removing some text fields that seem to be too close to the edges of my boxes somehow cured the problem…till now (I hope).
Hi archseed & jobu
For my personal use, I write a script which work in background (stay-open applet) and which make the backups automatically, by regular intervals (idle handler), of the AS-S project under development.
It is very easy to use. It is enough to make the script in the Dock, for exmeple, or to drop it on the title of a Finder window, then by the simple drag&dropt to the AS-S project folder in progress, the script made automatically the backups every 15 minutes (or 30 or 60 minutes, as you want).
The script also enables you to create Ã “zip” archives files of the backup folders, to save place on the disk for exemple.
Of course, you can publish the code of script, to be able to change certain parameters according to your needs.
Here: BackupAss (30 Ko)
PS. The original script was in French, I has just made, quickly, a translation in English, forgive me if you find sentences badly translated.
Thanks a lot.
Seems like you have an interesting script there. I will take a look at your auto-script backup and see if I could add it to the set of utilities for studio project development.
BTW, my nib-loading problem hasn’t recurred so far so I hope I found the culprit in my own main.nib. I also now regularly clean up before I build back the application though I am not sure if this is the exact solution.
Many thanks for your autobackup script. It’s very useful. I have modified it a little bit to conform with my needs viz., automatically deleting the previous zipped file so that the compressed file does not build up (great if you have periodic, unattended backups) and allowing changing the target folder if need be. The utility is now doing the backup job for me…not just to back up my studio project but also other dynamically changing folders.
Incidentally, my nib-loading problem has mysteriously disappeared. As I posted, all I did were: remove text fields and other objects close to the borders of windows and boxes, and since then, I have not been troubled by the same problem (it’s holding up so I hope that’s the end of it); also, I am now periodicaly doing a clean build so it might also be helping avoid the corruption of my nibs.
Thanks a lot, jobu and fredo, for your kind assistance.