• 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: NSTextfield in tableColumn changing color slow
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextfield in tableColumn changing color slow


  • Subject: Re: NSTextfield in tableColumn changing color slow
  • From: Steven Hamilton <email@hidden>
  • Date: Sat, 18 Oct 2008 21:39:03 +1000


On 16/10/2008, at 11:59 PM, Corbin Dunn wrote:

Hi Steven,

On Oct 16, 2008, at 2:03 AM, Steven Hamilton wrote:

Hi Folks,
I have a core data bound tableColumn that displays a currency balance. My NSManagedObject is a custom class that calculates the balance from a @sum of related transactions and returns the balance. The binding then displays this balance in the tableColumn. So far so good. This works fast.


I've implemented the delegate method below to query the NSTextfield value and change the color to red if it's less than 0. However, when I implement this and scroll the table its slow and jerky. Clearly I'm going about this the wrong way. How is it best to change the color based on the value of the cell?

- (void)tableView:(NSTableView *)tableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row;

This is a good way to do it. Do you have a sample to show the slow down?


And/or what does your code do in this method?

Hmm, it appears its not this method slowing things down. It's my balance method I've added to my account NSManagedobject subclass. The balance method fetches all related transactions and tallies them up. I think I need to work on some optimisation here or keep a static balance that is updated when transactions change.


_______________________________________________

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


References: 
 >NSTextfield in tableColumn changing color slow (From: Steven Hamilton <email@hidden>)
 >Re: NSTextfield in tableColumn changing color slow (From: Corbin Dunn <email@hidden>)

  • Prev by Date: Re: What is "A class which must be subclassed" ?
  • Next by Date: Re: Views, frames, and bounds
  • Previous by thread: Re: NSTextfield in tableColumn changing color slow
  • Next by thread: Project path
  • Index(es):
    • Date
    • Thread