On 23/07/2009, at 1:03 PM, Bright wrote:
Hi everyone:
In the "Controller" class, I used the code as follows to
finished the contextual menu
on the table view. And I succeeded.
[]
Now I hope the contextual menu disappears in the empty rows. And it
is only valid in the
rows which hold data. But I don't know how to implement the purpose...
Any help greatly appreciated.
The menu is attached to the table view, so will appear no matter where
you click.
You could override -menuForEvent: and check the mouse location against
the rows and return nil for empty rows, or invoke super for populated
rows. But that means subclassing the table.
--Graham
_______________________________________________
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]