selectionShouldChangeInTableView: called twice
selectionShouldChangeInTableView: called twice
- Subject: selectionShouldChangeInTableView: called twice
- From: Sean Todd <email@hidden>
- Date: Wed, 7 Mar 2007 21:34:09 -0600
I have implemented -selectionShouldChangeInTableView: in the delegate
for a table. It checks the enabled state of a button and if it is
enabled then it returns NO. When I test this by setting a breakpoint
and then trying to select another row in the table while the button
is enabled, I find that the method is called twice.
The first time the breakpoint is hit:
#0 0x0601486c in -[CGroupController
selectionShouldChangeInTableView:] at CGroupController.m:1921
#1 0x937c4830 in -[NSTableView _userCanChangeSelection]
#2 0x937c47b8 in -[NSTableView _userCanSelectRow:byExtendingSelection:]
#3 0x937c4700 in -[NSTableView _userSelectRow:byExtendingSelection:]
#4 0x937c3a44 in -[NSTableView mouseDown:]
#5 0x93763890 in -[NSWindow sendEvent:]
#6 0x9370c8d4 in -[NSApplication sendEvent:]
#7 0x93703d10 in -[NSApplication run]
#8 0x937f487c in NSApplicationMain
#9 0x000311c0 in main at main.m:39
and the second time:
#0 0x0601486c in -[CGroupController
selectionShouldChangeInTableView:] at CGroupController.m:1921
#1 0x937c4830 in -[NSTableView _userCanChangeSelection]
#2 0x937c47b8 in -[NSTableView _userCanSelectRow:byExtendingSelection:]
#3 0x937c3ba8 in -[NSTableView mouseDown:]
#4 0x93763890 in -[NSWindow sendEvent:]
#5 0x9370c8d4 in -[NSApplication sendEvent:]
#6 0x93703d10 in -[NSApplication run]
#7 0x937f487c in NSApplicationMain
#8 0x000311c0 in main at main.m:39
Is this a known issue? I use Cocoa Bindings to set the values in the
table. Does that have anything to do with this?
Xcode 2.4.1
Thanks,
Sean
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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