• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to recognize mutability?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to recognize mutability?


  • Subject: Re: How to recognize mutability?
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Thu, 21 Feb 2013 12:15:36 +0700

On 21 Feb 2013, at 11:15, Jens Alfke <email@hidden> wrote:

>
> On Feb 20, 2013, at 12:10 AM, Gerriet M. Denkmann <email@hidden> wrote:
>
>> But I do not know how to recognise mutability.
>>
>> 1. use isKindOfClass: [NSMutableString class]
>> 	disadvantage: all strings turn out to be mutable
>
> This is somewhat of an FAQ. There is no way to do this (without groping inside private data structures.)

Well, turns out there is a way. As Ronald Oussoren kindly pointed out yesterday:

	BOOL isMutable = [ someString classForKeyedArchiver ] == [ NSMutableString class ];

does exactly what I needed.

> I think you’ve posted about this stuff before?
Probably. But never got this really clever answer of classForKeyedArchiver.

> It really sounds like you’re on a wild goose chase down a rathole, with this archiving project.
Well, it is not going too badly. My Archiver has keyed archiving and produces output comparable to NSArchiver (much smaller than NSKeyedArchiver) and can be used on iOS (unlike NSArchiver).
It is not yet optimised (polite way to say: it is quite slow).

> I suggest you back up a ways and look at the problem from a high level and find a different way to solve it.
I will have a look at JSON.

Kind regards,

Gerriet.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


References: 
 >How to recognize mutability? (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: How to recognize mutability? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: NSTask arguments
  • Next by Date: Re: How to recognize mutability?
  • Previous by thread: Re: How to recognize mutability?
  • Next by thread: Re: How to recognize mutability?
  • Index(es):
    • Date
    • Thread