Peter, these look like real bugs that should be fixed. Please create a bug
report with all of this detail, and assign it to me. I don't, however, know
when I'll get to it due to my heavy schoolwork schedule. If you happened to
also provide (separate) patch files for each of these issues, the chance of
a fast commit would be greatly increased. :-)

Derrell

On Thu, Sep 9, 2010 at 05:08, Peter Schneider <[email protected]>wrote:

> Hi,
>
> I have some issues and an enhancement report here.
> I did not find any related issues in qooxdoo's bugzilla, so I will most
> probably add them later on.
>
> 1. The MTableContextMenu mixin has a problem, when the Handler method is
> called
>   and that returns <false>.
>   The API doesn't exactly tell about the return values of the context menu
>   handler, but it has to be boolean. The problem arises, when this method
> does
>   not return <true>. I that case the context menu will never be displayed
>   again.
>   The playground example[1] shows this: The handler method provided as 2nd
>   parameter to MTableContextMenu::setContextMenuHandler does return <true>
> or
>   <false> depending on the 'oddity' of the row number.
>   To reproduce the issue:
>   As long as you only right-click on _even_ rows of column 1 (indicated by
> the
>   boolean column), the context menu works correct.
>   As soon as you right-click on one _odd_ row in column 1, the handler is
>   called and returns <false> so the menu is not shown (O.K. so far).
>   After this the menu will never show up again.
>
>   Too bad that the playground does not show runtime errors here, because
> the
>   cause of this issue is the line that tries to dispose an already disposed
>   contextMenu (Ultimately an error like 'container is null' will show up in
>   Widget)
>   See the attached Patch-File for (my) fix of this issue.
>
>   I think this is a bug, that I will add to bugzilla.
>
>
> 2. The context menu does pop up on header-cells as well. It pops up on
> _every_
>   column header and in those cases the handler method is not called at all.
>   My current workaround:
>   <code>
>     // ...somewhere in the contexMenuHandler method...
>     contextMenu.addListenerOnce("disappear", function () {
>       table.setContextMenu(null);
>     });
>   </code>
>   This could (should?) be included in the mixin as well.
>
>   I think this is a bug as well, that I will add to bugzilla.
>
>
> 3. The enhancement of qx.ui.table.MTableContextMenu:
>   Wouldn't it be nice, if we could also provide a context-object (aka
> 'this')
>   to the MTableContextMenu::setContextMenuHandler(col, handler) method?
>   The provided handler is currently always called in the context of 'Table'
> I
>   think.
>
>
> 4. And by the way...These lines (34-39) in qx.ui.table.MTableContextMenu
> seems
>   to be a relict of the past, don't they?:
>   <code>
>     // Stop any previously running timer
>     if (this._contextMenuTimer)
>     {
>       this._contextMenuTimer.dispose();
>       this._contextMenuTimer = null;
>     }
>   </code>
>   I can nowhere find this protected "contextMenuTimer" in the framework
> code.
>   But this is really a _very_ small (cosmetic) issue.
>
>
> I will submit this bugs/enhancements[2] in a couple of hours to give the
> forum
> a chance to tell me that I've missed something or that there is already a
> bug
> about some of these.
>
> Cheers, and [3],
>  Peter
>
>
> [1] http://tinyurl.com/375obws
> [2] ...maybe except the 4th point of my list ;)
> [3] sorry for this loooong post ;) Next time I should maybe post several
>    smaller ones...
>
>
> Index: MTableContextMenu.js
> ===================================================================
> --- MTableContextMenu.js        (Revision 96)
> +++ MTableContextMenu.js        (Arbeitskopie)
> @@ -39,7 +39,7 @@
>         }
>
>         // Dispose of any previously existing context menu
> -        if (this._contextMenu)
> +        if (this._contextMenu && !this._contextMenu.isDisposed())
>         {
>           // Dispose of the context menu.
>           this._contextMenu.hide();
>
>
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
>
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to