• 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
Re:Bindings help: Row-specific Null Placeholder in an NSTableColumn
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re:Bindings help: Row-specific Null Placeholder in an NSTableColumn


  • Subject: Re:Bindings help: Row-specific Null Placeholder in an NSTableColumn
  • From: Warren Burton <email@hidden>
  • Date: Sat, 22 Jan 2005 13:41:05 +0000

Id be looking at implementing the TV delegate method in the controller itself sort of


- (void)tableView:(NSTableView *)aTableView willDisplayCell:(id)aCell forTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex
{
if([[[self arrangedObjects] objectAtIndex:rowIndex] fileIsParsed]) [cell setTextColor:[NSColor aubergineColor]];
else [cell setTextColor:[NSColor puceColor]];
}


Its trivial to implement and i'd guess you are going to be accessing some array of proxy objects that represents the file system rather than the file itself to present the info in the TV if you want to use binding to display the data in the first place

On a paradigm note - the row value reflects the thing that you are looking at so using a placeholder might imply that the file isnt even there yet which it is, you just havnt parsed it yet so you can reflect that status in willDisplayCell method and reload table data each time a file changes status (or every few if performance is an issue)




On 22 Jan 2005, at 05:49, email@hidden wrote:

Message: 4
Date: Sat, 22 Jan 2005 15:05:00 +1000
From: Abhi Beckert <email@hidden>
Subject: Bindings help: Row-specific Null Placeholder in an
	NSTableColumn
To: Cocoa-dev <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII

Hi
In an app I'm thinking of writing I have a table view where each row
represents a file, and I'm going to have to open up the file and stuff
in order to work out what goes in the row (probably take about 2
seconds for each file). Obviously this is way too slow, so for the
rows that haven't been loaded yet I'm just going to display the name
of the file.

Idealy, when the file for a row hasn't been loaded yet, I'd like that
row to be displayed in grey rather than black.

I'd really like to use bindings to do this, and I'm hoping I can tie
it into the placeholder stuff. Or is it going to be simpler to use a
delegate? Is it even possible without huge effort? If it's too hard
I'll just leave it black.
Thanks in advance
- Abhi

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Bindings help: Row-specific Null Placeholder in an NSTableColumn
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: [OT] Software Delivery (was Re: Why do "loose" nibs take precedence over nibs in .lproj?)
  • Next by Date: Re: [OT] Software Delivery (was Re: Why do "loose" nibs take precedence over nibs in .lproj?)
  • Previous by thread: Re: Bindings help: Row-specific Null Placeholder in an NSTableColumn
  • Next by thread: Re: Bindings help: Row-specific Null Placeholder in an NSTableColumn
  • Index(es):
    • Date
    • Thread