Hello,

I need to show the context menu programatically for a table. There are
two reasons for this (the second is actually the showstopper):
1) The native context menu can't be disabled on Opera, therefore the
web application context menu cannot be the only way to access
functionality.
2) Usability testing revealed that our users don't expect context
menus (other than the browser's) in web applications, so they don't
try 'right clicking' on things.

The solution was to add a column with an 'actions' link to each row
(clicking the link should display the context menu). Side question: is
it possible to embed widgets such as buttons in the table? Couldn't
find a cell renderer to do that, so I assume no.

To show the context menu programatically I used the code from
Widget._onContextMenuOpen:

var menu = this.getContextMenu();
menu.placeToMouse(e);
menu.show();

from a cellclick event. It didn't work (menu not showing at all, menu
showing only on the first click) until I moved this code into a
Timer.once call.

Is there a better way to do this?

Now for my main question: it's not obvious to me why I need a
Timer.once call here. I tend to use Timer.once as a kind of 'yield'
operation in cooperative multitasking, and I assume Qooxdoo needed to
do some processing in the background before running the code that
displays the menu (I also create the context menu in the cellclick
handler, as it depends on the row).

Is there a heuristic that I can use to determine when to use
Timer.once? (this time it was a gut feeling, I'd like something more
reliable).

Thanks for any advice,
-- 
Miron Brezuleanu

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to