• 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: NSTableView - strange behaviour after cell text color assignment
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView - strange behaviour after cell text color assignment


  • Subject: Re: NSTableView - strange behaviour after cell text color assignment
  • From: Alexander Bokovikov <email@hidden>
  • Date: Tue, 28 Jul 2009 01:51:51 +0600

Replying to myself:

- (void)tableView:(NSTableView *)aTableView
  willDisplayCell:(id)aCell
   forTableColumn:(NSTableColumn *)aTableColumn
			  row:(int)rowIndex;

The function above works perfectly, but the problem reason was in the incorrect receiving of the selected row index. I wrongly assigned it, as a global variable, within a function, which updated my table data on timer. therefore the selected row index value was changed on timer, but not on real selection change. why didn't 5 set the assignment in the tableViewSelected: action, going from tableView? Really, I did it. But unfortunately this action raises on the mouse clicks only. Keyboard clicks are passing by this action.


Fortunately I've found a solution, that really works. I've registered an observer for NSTableViewSelectionDidChangeNotification notification, and now every change of selection is processed.

I believe, the question is closed.

Thanks.
_______________________________________________

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


  • Follow-Ups:
    • Re: NSTableView - strange behaviour after cell text color assignment
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: Search Item in the Application menu missing in Other languages
  • Next by Date: Re: Creating an installer for KEXT
  • Previous by thread: NSTableView - strange behaviour after cell text color assignment
  • Next by thread: Re: NSTableView - strange behaviour after cell text color assignment
  • Index(es):
    • Date
    • Thread