FROM : Gerriet M. Denkmann
DATE : Sun Nov 21 19:31:23 2004
On 21.11.2004, at 15:11, <email_removed> wrote:
> ------------------------------
>
> Message: 19
> Date: Sun, 21 Nov 2004 15:09:37 +0100
> From: Joakim Danielson <<email_removed>>
> Subject: Re: Keyed archiver
> To: Cocoa Users <<email_removed>>
> Message-ID: <<email_removed>>
> Content-Type: text/plain; charset="windows-1252"
>
>
>> I can archive and restore a string with the value "$noll" but I cannot
>> do the same with "$null".
>>
>>
>
> I tried this with a simple ToDo application I have written and I got
> the same result when I put "$null" in a text field. After examining the
> saved file I realized that it contained some value/variables that
> started with a $ sign, such as $version, $objects_ etc that was
> inserted by the coder when saving the document.
>
> I searched the documentation and found this explanation:
>
> "You should avoid using “$” as a prefix for your keys. The keyed
> archiver and unarchiver use keys prefixed with “$” for internal values.
> Although they test for and mangle user-defined keys that have a “$”
> prefix, this overhead slows down archiving performance."
>
> It seems that the second sentence don't apply to $null.
Well, it is true that if a KEY starts with '$', NSKeyedArchiver puts
another '$' in front. Which means: all keys are possible, but keys
starting with '$' take a bit more time.
But my problem is with VALUEs - nothing in the documentation prohibits
using certain string values.
I still beleive that it is my unalienable right to archive and
unarchive the string "$null".
Kind regards
Gerriet.
DATE : Sun Nov 21 19:31:23 2004
On 21.11.2004, at 15:11, <email_removed> wrote:
> ------------------------------
>
> Message: 19
> Date: Sun, 21 Nov 2004 15:09:37 +0100
> From: Joakim Danielson <<email_removed>>
> Subject: Re: Keyed archiver
> To: Cocoa Users <<email_removed>>
> Message-ID: <<email_removed>>
> Content-Type: text/plain; charset="windows-1252"
>
>
>> I can archive and restore a string with the value "$noll" but I cannot
>> do the same with "$null".
>>
>>
>
> I tried this with a simple ToDo application I have written and I got
> the same result when I put "$null" in a text field. After examining the
> saved file I realized that it contained some value/variables that
> started with a $ sign, such as $version, $objects_ etc that was
> inserted by the coder when saving the document.
>
> I searched the documentation and found this explanation:
>
> "You should avoid using “$” as a prefix for your keys. The keyed
> archiver and unarchiver use keys prefixed with “$” for internal values.
> Although they test for and mangle user-defined keys that have a “$”
> prefix, this overhead slows down archiving performance."
>
> It seems that the second sentence don't apply to $null.
Well, it is true that if a KEY starts with '$', NSKeyedArchiver puts
another '$' in front. Which means: all keys are possible, but keys
starting with '$' take a bit more time.
But my problem is with VALUEs - nothing in the documentation prohibits
using certain string values.
I still beleive that it is my unalienable right to archive and
unarchive the string "$null".
Kind regards
Gerriet.
| Related mails | Author | Date |
|---|---|---|
| Gerriet M. Denkman… | Nov 21, 10:47 | |
| Jonathan Jackel | Nov 21, 13:00 | |
| Gerriet M. Denkman… | Nov 21, 13:53 | |
| Joakim Danielson | Nov 21, 15:09 | |
| Gerriet M. Denkman… | Nov 21, 19:31 | |
| Joakim Danielson | Nov 21, 20:15 |






Cocoa mail archive

