Feature #1049
openpreventDefaultAction should be owned by SignalBase?
0%
Description
Hey wt group:
When I use mouseKeyWentUp().preventDefaultAction(), the compiler gave me a error, I found preventDefaultAction() is EventSignalBase's member, but my mouseKeyWentUp()'s sender is a WTableView, WTableView's mouseKeyWentUp() returns a Signal< WModelIndex, WMouseEvent >, which is derived from SignalBase and has no preventDefaultAction member:-(
Thanks
Zhimin
Updated by Koen Deforche about 13 years ago
- Status changed from New to Feedback
- Assignee set to Koen Deforche
Hey Zhimin,
Adding it to SignalBase is not the solution to this problem though (a default action is only defined for browser-initiated eventsignals).
What default action are you actually trying to prevent? There might be other ways to do that ?
Regards,
koen
Updated by Zhimin Song about 13 years ago
Hey Koen:
What default action are you actually trying to prevent? There might be other ways to do that ?
Thanks for your reply, and In the WTableView, I want to use mouseKeyWentUp(), then judge the WMouseEvent value whether equals to RightButton, if true it will pop up a menu for some operations, if false it just selects the row item.
Thanks again.
Regards
Zhimin
Updated by Koen Deforche about 13 years ago
Hey Zhimin,
I believe only the left button should be handled for selection. If we make this change in the library, then you can react to mouseWentUp() and implement the popup menu if it was the right button ?
Regards,
koen