I am trying to build my own version of NSKeyed(Un)Archiver.

But I do not know how to recognise mutability.

1. use isKindOfClass: [NSMutableString class]
        disadvantage: all strings turn out to be mutable

2. use respondsToSelector: @selector(appendString:)
        disadvantage: all strings turn out to be mutable

3. mutate the string (in a @try block) if exception, then immutable, else 
mutate the string back.
        disadvantage: very inelegant and probably quite slow

4. use some undocumented (which?) method
        disadvantage: might break with next OS release

5. anything else?

Gerriet.

P.S. 
I want my own archiver for 2 reasons:
1. NSKeyedArchiver can store only certain strings
2. It creates files, which are 10 times bigger than my version (and 5 times 
bigger than NSArchiver)

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to