Hi all

I'm a newbie with the Mac programming and been trying for a couple of hours to 
do something that should be straightforward, no success so I'm asking the Pros 
for some help :).

I'm have a small application, using Core Data, that shows in the Main Window a 
list of entities. I'm trying to trap mouse events to have another window opened 
when double clicking on an item. 
I created a controller for my window and have it override the mouseDown: , 
works but only for mouse event it the window itself, not its controls.
I did the same thing for the TableView, created a controller for it. But on 
this one, no mouseDown events ever get sent.

- (void)mouseDown:(NSEvent *)theEvent {
        NSLog(@"Mouse Event received in the list view!!!");
        //      [theEvent: 
}

I tried then on this same TableView controller to have the delegate method:
- (void)textView:(NSTextView *)aTextView clickedOnCell:(id < 
NSTextAttachmentCell >)cell inRect:(NSRect)cellFrame 
atIndex:(NSUInteger)charIndex {
        NSLog(@"Mouse click event in the text view...");        
        
}

Failed again, this doen't do anything.
But, if in this class I declare a delegate for a method directly on the 
TableView

- (void) tableView:(NSTableView*)tableView 
mouseDownInHeaderOfTableColumn:(NSTableColumn *)tableColumn {
        NSLog(@"Mouse event in the table view...");
}


Now this method gets called!

So guys, what am I getting wrong here? How can I catch the mouse click in a 
TableList? I guess when doing it correctly for this one, it will be the same 
for all other controls.

Any help will be greatly appreciated, Thank you very much!

Eric



Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to