Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 10, 2012, 11:26 PM   #1
sgthree
macrumors newbie
 
Join Date: Feb 2012
nstableview question

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.
sgthree is offline   0 Reply With Quote
Old Apr 11, 2012, 07:40 AM   #2
knightlie
macrumors 6502a
 
Join Date: Feb 2008
- 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.

Last edited by knightlie; Apr 11, 2012 at 07:41 AM. Reason: Spolling
knightlie is offline   0 Reply With Quote
Old Apr 11, 2012, 05:17 PM   #3
sgthree
Thread Starter
macrumors newbie
 
Join Date: Feb 2012
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!!
sgthree is offline   0 Reply With Quote
Old Apr 12, 2012, 12:42 AM   #4
knightlie
macrumors 6502a
 
Join Date: Feb 2008
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.
knightlie is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
NSTableView get selected row data cpuin Mac Programming 2 Oct 2, 2013 11:08 AM
Edit NSTableView - NSArrayController kikko088 Mac Programming 0 Jan 17, 2013 08:57 AM
Call reloadData for NSTableView from AppDelegate AdrianK Mac Programming 3 Aug 11, 2012 01:32 PM
Reordering rows in a view-based NSTableVIew monsieurpaul Mac Programming 2 Jul 19, 2012 08:21 AM
Asynchronous NSURLConnections + NSTableView Help jwei92 Mac Programming 0 Jul 10, 2012 08:42 PM

Forum Jump

All times are GMT -5. The time now is 01:50 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC