discuss-gnustep
[Top][All Lists]
Advanced

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

little bug in property list


From: Frederic De Jaeger
Subject: little bug in property list
Date: 07 Aug 2002 12:21:53 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Hi,
There is a little bug.

In NSConcreteNumber.m, bool values are encoded this way by
descriptionWithLocale:

line 379
[...]
  return (data) ? @"true" : @"false";
[...]

but when I decode a property list containing a bool value:
NSString.m, Line 2185
- (BOOL) boolValue
{
  if ([self caseInsensitiveCompare: @"YES"] == NSOrderedSame)
    return YES;
  return [self intValue] != 0 ? YES : NO;
}
[...]

Conventions suggest that the encoding is wrong because it looks like
we are using YES/NO.
Anyway, it may be wise to be tolerant in what we accept ("true" and
"YES" should be decoded to the boolean true value)

bye



reply via email to

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