Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Is NSArchiver/NSUnarchiver broken (for Java)?

Is NSArchiver/NSUnarchiver broken (for Java)?
Thread Tools
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status: Offline
Reply With Quote
Jul 6, 2001, 11:19 AM
 
I haven't seen anything about this in this forum, but the problem was mentioned over and over again on macosx-dev without any concrete answers. I'm trying to archive a Java Object to file and then unarchive it for later use. The problem is, it never works. I mean, it does SOMETHING, but nothing useful. I use NSArchiver.archiveRootObjectToFile(Object, String) to save the Object to file and then read it with NSUnarchiver.unarchiveObjectWithFile(String). Uhmmm... I don't rember exactly what happened next (it happened at home, and I tried 18 billion different ways to get it to wirk), but I remember being able to pico the output file and seing the Class name of the Object in the file, but when I tried to read the file (yes, I close my pico process first), I believe nothing happened. It wouldn't even get error messages. Well, I only have OS 9 machines at work, so I can't replicate this to give more specific details... but when I get home, I'll add more specific information.

I hope someone knows wht's up (or a work around) because this is really annoying me.

Thanks,
F-bacher

Oh, in case you need to know what kind of Object I'm encoding, it's a generic object link list; you know, value = anObject, tail = a pointer to a new ObjectList. I decided to make a general link list class so I wouldn't have to define it for each class and keep rewritting all the usefull methods I came up with. My ObjectList contains both pure Java Objects (like Strings) and also NextStep Objects (like NSColor).
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:45 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2