Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > NSTableView text is white?!

NSTableView text is white?!
Thread Tools
Professional Poster
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
May 29, 2003, 12:54 AM
 
I don't think I changed anything in my NSTableView code, but all the sudden it is white on white. If I click on a row it turns black and will stay that way, but it initially loads at white. It used to load as black, but all the sudden is loading as white. There is nothing particularly special about the tableView:

Code:
-(id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex { NSString *identifier=[aTableColumn identifier]; return [[machineListArray objectAtIndex:rowIndex] objectAtIndex:[identifier intValue]]; }
And that machineArray is just being generated like this:

Code:
- (void)readAllTheData:(NSNotification *)aNotification { NSData *remoteClientInfoData = [[aNotification userInfo] objectForKey:NSFileHandleNotificationDataItem]; NSString *remoteClientInfo = [NSString stringWithUTF8String:[remoteClientInfoData bytes]]; NSArray *remoteClientInfoArray = [remoteClientInfo componentsSeparatedByString:@","]; [machineListArray addObject:remoteClientInfoArray]; }
There isn't any funny string formatting so I don't know what's wrong.

kman
     
Senior User
Join Date: Feb 2003
Location: USA
Status: Offline
Reply With Quote
May 29, 2003, 08:09 AM
 
You haven't changed anything in IB? Hmm..try a [tableView reloadData] in awakeFromNib and/or showWindow...

Steve W
(Last edited by techtrucker; May 29, 2003 at 08:29 AM. )
MacBook 2.0 160/2GB/SuperDrive
Lots of older Macs
     
kman42  (op)
Professional Poster
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
May 29, 2003, 08:46 AM
 
I did add a couple of columns, but I don't see anything in IB that determines the text color. And it seems odd that it would suddenly appear if I click on the field.

kman
     
kman42  (op)
Professional Poster
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
May 29, 2003, 09:29 AM
 
I was reloading the data in two separate places and one of them would override the other with empty data, but then when I clicked on the table it would load it again from a method after the variables were full.

BTW, I know I have been asking lots of questions the last few days, but things have finally started to pay off. You can see my app here. It is a monitor for Folding@home. I was able to incorporate Rendezvous and a couple of custom views to make some history graphs for the various statistics. There are still some issues (mainly with the UI), but the app is functional and relatively stable. It won't do much unless you fold, but I just wanted to let you all know that it wouldn't have been possible without lots of help from this forum!

I have learned a ton during this project and most of it has been from you guys. Thanks!

kman
     
Senior User
Join Date: Feb 2003
Location: USA
Status: Offline
Reply With Quote
May 29, 2003, 11:10 AM
 
Hey, that's great! It's a good feeling when you get past hurdles like that. Gotta love Cocoa...

Steve W
MacBook 2.0 160/2GB/SuperDrive
Lots of older Macs
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:37 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2