[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Working NSSearchFieldCell archiving support
From: |
Fred Kiefer |
Subject: |
Re: [PATCH] Working NSSearchFieldCell archiving support |
Date: |
Mon, 07 Sep 2009 16:10:46 +0200 |
User-agent: |
Thunderbird 2.0.0.22 (X11/20090605) |
I committed a slightly different patch, to keep the size of the class
the same. Please check that I didn't break anything.
Fred
Quentin Mathé schrieb:
> Hi,
>
> Here is a patch to fix NSSearchFieldCell archiving and keyed archiving.
> Non-keyed archiving was crashing because _max_recents ivar was declared as
> an unsigned char and encoded/decoded as an unsigned int. Keyed archiving was
> not crashing because keyed decoding was not implemented. The patch adds
> keyed encoding to -encodeWithCoder:.
>
> In a nib (a xib precisely), NSMaximumRecents is encoded as an int, so I
> switched to int as the encoded type (rather than unsigned int).
> I also changed the ivar from unsigned char to int to keep the
> encoding/decoding as simple as possible. I doubt any application has more
> than 4 or 5 search fields in use at the same time so it doesn't seem worth
> to save some memory.
>
> Cheers,
> Quentin.