View Full Version : nstableview question

Apr 10, 2012, 11:26 PM
I have a core data entity that keeps track of payments and receipts. It has (inter alia) two attributes, debitAmount and creditAmount. One of these contains a value, the other is always zero.

entities are displayed using an NSTableView through an array controller and bindings. The tableview has two columns, one debit, the other credit. Number formatters ensure that the numbers display as currency.

How to I get the tableview to leave a cell blank when the value is 0? It currently insists on showing $0.00 or just $0 when the value is 0.

Apr 11, 2012, 07:40 AM
- Drag a Number formatter onto the columns cell;
- Set the formatters Behaviour to Mac OS X 10.4+ Custom;
- Near the bottom of the Inspector is a scroll view of options, change Zero Symbol to "-" or whatever you need.

Apr 11, 2012, 05:17 PM
thank you very much.

I had seen that scroll view, but it only displayed the top 4 items, and as is the case with Lion, the absence of scroll bars gives you no clues that there are further items in the list to choose from. I think it is about time I turned them on permanently!!

Apr 12, 2012, 12:42 AM
I have yet to upgrade to Lion, but I had already figured that the new scroll bars were fatally flawed. Good idea to make them permanently visible as they should be.