Re: unsigned short, NSNumber and NSTableView
Re: unsigned short, NSNumber and NSTableView
- Subject: Re: unsigned short, NSNumber and NSTableView
- From: "Clark S. Cox III" <email@hidden>
- Date: Wed, 16 Oct 2002 09:37:12 -0400
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wednesday, Oct 16, 2002, at 09:25 US/Eastern, Stiphane Sudre wrote:
Is it mandatory to add a NSNumberFormatter to a NSTableColumn in order
to have unsigned short to be displayed as unsigned short?
I have a NSTableView with a NSTableColumn which sole purpose is to
display NSNumber or NSString (the default type of column in fact).
when I return [NSNumber numberWithUnsignedShort:myUnsignedShort]; in
- (id) tableView:(NSTableView *) inTableView
objectValueForTableColumn:(NSTableColumn *) inColumn row: (int) inRow
the value is displayed as signed when it's over 32765.
I'm sure I can get the unsigned display using a NSFormatter but is it
the standard way of doing things?
I would have thought NSNumber would not give a negative string.
I would have thought the same thing, you should probably file a bug.
As a workaround in the meantime, why not use: [NSNumber numberWithInt:
myUnsignedShort] or [NSNumber numberWithUnsignedInt: myUnsignedShort]
- --
http://homepage.mac.com/clarkcox3/
email@hidden
Clark S. Cox, III
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (Darwin)
iEYEARECAAYFAj2ta44ACgkQd6STocYT1xVhwQCfVjOkZceYXnZIBHcrHaCuCTqp
wfMAn1YG2vXSLbjHDFkW6LtK7anZaLrn
=oUEH
-----END PGP SIGNATURE-----
_______________________________________________
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.