customizing NSCoding of NSDecimalNumber
customizing NSCoding of NSDecimalNumber
- Subject: customizing NSCoding of NSDecimalNumber
- From: Tore Halset <email@hidden>
- Date: Sun, 15 Oct 2006 22:21:47 +0200
Hello.
I want to customize the serialization/coding of NSDecimalNumber so
that it matches java.mat.BigDecimal in java. I am using HessianObjC.
The key should be "value" and the value should be the string
representation of the value.
I started by overriding "-(id)initWithCoder:" and "-(void)
encodeWithCoder:", but it looks like my implementation of those
methods are ignored. Here are the stack-trace.
#0 0x90a53387 in objc_msgSend ()
#1 0x0180331c in ?? ()
#2 0x908103a2 in _CFStringAppendFormatAndArgumentsAux ()
#3 0x9080ec8c in _CFStringCreateWithFormatAndArgumentsAux ()
#4 0x925e2a5d in -[NSPlaceholderString
initWithFormat:locale:arguments:] ()
#5 0x92604670 in -[NSString initWithFormat:arguments:] ()
#6 0x9264f337 in +[NSException raise:format:arguments:] ()
#7 0x9264f2cb in +[NSException raise:format:] ()
#8 0x92685496 in -[NSDecimalNumberPlaceholder initWithCoder:] ()
So NSDecimalNumberPlaceholder's "-(id)initWithCoder:" are used
instead of my. Are the class clustering stuff the reason for this?
How can I customize the encoding and decoding of a NSDecimalNumber?
- Tore.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden