• 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: Problem with tableViewSelectionDidChange
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with tableViewSelectionDidChange


  • Subject: Re: Problem with tableViewSelectionDidChange
  • From: Andy Lee <email@hidden>
  • Date: Sat, 1 Oct 2005 19:36:54 -0400

On Oct 1, 2005, at 7:14 PM, Jerry Brace wrote:
The problem being that the event doesn't fire. I have the below event in a subclass of NSTableView. I've added another event (keyUp) to test to be sure the subclass was working and it worked.

- (void)tableViewSelectionDidChange:(NSNotification *)aNotification
{
    NSLog(@"FIRED!!");

    NSTableView *tv = [aNotification object];
    [tv editColumn: 0
        row:[tv selectedRow]
        withEvent: nil
        select: YES];
}

-tableViewSelectionDidChange: is a delegate method, so you need to connect the table's delegate outlet to an object that implements this method. Try making the table view its own delegate (might be tricky in IB -- I haven't connected an object to itself recently, so I don't remember offhand). Typically, though, one implements a delegate method in a separate controller class, not a subclass of the view class.


--Andy

_______________________________________________
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


References: 
 >Problem with tableViewSelectionDidChange (From: Jerry Brace <email@hidden>)

  • Prev by Date: Selector 'release' sent to dealloced instance of class NSDeviceRGBColor ??
  • Next by Date: Reading all data before the NSTask terminates, synchronizing notifications
  • Previous by thread: Problem with tableViewSelectionDidChange
  • Next by thread: Selector 'release' sent to dealloced instance of class NSDeviceRGBColor ??
  • Index(es):
    • Date
    • Thread