gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Working NSSearchFieldCell archiving support


From: Quentin Mathé
Subject: [PATCH] Working NSSearchFieldCell archiving support
Date: Mon, 7 Sep 2009 13:44:21 +0200

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.

Attachment: NSSearchFieldCell-encoding.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]