Re: Comparing NSDecimalNumber to NaN?
Re: Comparing NSDecimalNumber to NaN?
- Subject: Re: Comparing NSDecimalNumber to NaN?
- From: "Brian Barth" <email@hidden>
- Date: Fri, 29 Aug 2003 10:46:07 +0200
Hi!
Well things settled.
After fumbling with the code another two hrs I realized that the error
lies like always between both ears.
Jonathan wrote:
>
if ([entry isEqualTo:[NSDecimalNumber notANumber]])
>
>
Note that it's "isEqualTo" not "isEqual".
>
>
But "statement with no effect" makes me suspect there's something more
>
subtle wrong with your code. Your first two tries ought to work. The
>
third one probably needs a capital N at the end, but in principle it
>
should work, too. Perhaps a more complete extract would help.
For checking I used:
if ( [entry isEqual: [NSDecimalNumber notANumber]] ) NSBeep;
I thought I should hear a beep which I sure didn't because it should be
NSBeep(), shouldn't it? So sorry for the confusion I might have caused....
Code works now.
As for subclassing NSFormater...
... sounds like a good idea...
thnxxALot
Brian.
--
Life's Tragedy is that we get old to soon and wise too late.
-Benjamin Franklin-
. . . b o b . . . (osXdriven) . . . www.bobthevisitor.de . . .
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.