bug-gnustep
[Top][All Lists]
Advanced

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

encodePoint:forKey:


From: Stefan Urbanek
Subject: encodePoint:forKey:
Date: Sun, 21 Mar 2004 19:23:34 +0100

Hi,

NSKeyedArchiver/Unarchiver has no point, size, rect and range encoding 
implemented. I tried to quickly create methods by myself, but they do not work 
as expected. For example:

- (void) encodePoint: (NSPoint)aPoint forKey: (NSString*)aKey
{
  id anObject = [NSValue valueWithPoint: aPoint];
  CHECKKEY
  anObject = [self _encodeObject: anObject conditional: NO];
  [_enc setObject: anObject forKey: aKey];
}

or like encodeFloat:forKey:

- (void) encodeSize: (NSSize)aSize forKey: (NSString*)aKey
{
  CHECKKEY

  [_enc setObject: [NSValue  valueWithSize: aSize] forKey: aKey];
}

On decoding I was getting dictionary object for the first method type and 
string object for the second method type.Can anyone with deeper knowledge of 
keyed archiving/unarchiving help?

Thanks,

Stefan






reply via email to

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