• 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
NSTableColumn won't display int values; currently displaying as "Yes(/No)" (which I didn't think possible)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTableColumn won't display int values; currently displaying as "Yes(/No)" (which I didn't think possible)


  • Subject: NSTableColumn won't display int values; currently displaying as "Yes(/No)" (which I didn't think possible)
  • From: "Doug Knowles" <email@hidden>
  • Date: Mon, 12 Jan 2009 13:57:37 -0500

Hi,
I have a simple table bound to an array controller which manages a list of
custom objects. One of the table columns is bound to a "count" property of
the custom object; the "count" property is accessed via a getter that
returns a calculated primitive int.

For weeks, this table worked as expected and displayed the count value in
the appropriate column.

At some point, the column stopped displaying values.  I checked the
bindings, which are fine. As an experiment, I removed the NSNumberFormatter
I had associated with the column. When I did this, the column started
displaying "Yes" or "No" in every row. (No for zero, Yes for everything
else, as you'd expect.)

I tried adding a new column to the view and binding it to the same value, in
case a default somewhere had been changed, and I get the same result.

The funny thing, is, there are times I would like to render "Yes" and "No"
for BOOL's, but I thought a NSValueTransformer was required to do that.  At
the moment, I'm in a position where I'm considering using a value
transformer to get the "normal" behavior of displaying an "int" as an
number.

Did I accidentally enable some ability to display int's as Yes/No, and, if
so, how do I turn it off?  And on again, because I know I'll want it
somewhere else, later. :-)

TIA,
Doug K;
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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

  • Prev by Date: [SOLVED] Re: debugging hard-to-locate error in NSApplication delegate
  • Next by Date: Re: Disabled button looks like enabled
  • Previous by thread: NSRuleEditor bindings
  • Next by thread: didReceiveMemoryWarning doesn't release view...
  • Index(es):
    • Date
    • Thread