• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
bug: unsigned short, NSArrayController, NSTableView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug: unsigned short, NSArrayController, NSTableView?


  • Subject: bug: unsigned short, NSArrayController, NSTableView?
  • From: Todd Heberlein <email@hidden>
  • Date: Sun, 27 May 2007 13:11:15 -0700

I don't know if this is a defined behavior or a bug, so I thought I would toss it out here before submitting it as a bug. The punch-line is that an NSTableView column that is fed data via an NSArrayController does not display large values for unsigned shorts correctly.


I have an NSObject subclass that has an unsigned short to represent a 16-bit TCP port. The accessors also use an unsigned short for setting/retrieving the value.


The objects are placed in an NSMutableArray which is tracked by an NSArrayController. An NSTableView's columns bind to the NSArrayController for their data.

THE PROBLEM: When the port value is a large number (e.g., when the highest order bit is set), the table view shows a negative number instead of a large positive number.

The work around was easy enough: just make the port a 32-bit number.

Is this the defined behavior (i.e., not supporting unsigned shorts), and is therefore my mistake?

Or is this a bug that should be reported?


Thanks,

Todd

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: bug: unsigned short, NSArrayController, NSTableView?
      • From: Steve Christensen <email@hidden>
  • Prev by Date: Re: Bindings
  • Next by Date: Re: Bindings
  • Previous by thread: Re: [MODERATOR] Re: getting nth root of an integer
  • Next by thread: Re: bug: unsigned short, NSArrayController, NSTableView?
  • Index(es):
    • Date
    • Thread