As I see your code, it's doing
        NSHomeDirectory() stringByAppendingPathComponent:RFB_PREFS_LOCATION
Obviously, this will only work for the user's home directory, not for machine-wide prefs (/Library/Preferences) or network-wide prefs (/Network/Library/Preferences).

It's also just aesthetically nasty to use two different files for one function - saving prefs.  It's also brittle.

The easy solution is to use archivedDataWithRootObject to get an NSData instance and then use the standard NSUserDefaults calls to save that to some key in our standard prefs file.

NSData *data = [NSKeyedArchiver archivedDataWithRootObject: instance];
[[NSUserDefaults standardUserDefaults] setObject: data forKey: @"SavedServers"];

Also, when I do a clean checkout of GEN_2_GUI, I'm missing some of the new GUI files.  I'm using the following to do a clean checkout - I'm not a CVS guru by any means, so if I'm doing something dumb, don't hesitate to tell me. :)
cvs -z3 co -j GEN_2_GUI cotvnc

I get ServerDisplay.nib now, but not ServerDataManager, and a few of the other newer files.


Checked in the save change.  The load code will still load from the original preferences, my version, and this new version.  So, no one should loose anything.

Also, I managed to break the add button in my last checking.  That is now fixed.  This reminds me, we need to place "Remove all warnings" on the list of things to do before release.  Most of them are my fault, but with Obj-C, it is really easy to have have an ignored warning come back to haunt you.