On 2011-01-20, at 19:37, André Bargull wrote:

>> +  /** @access private */
>> +  function _hasStyleClass(name:String) {
>> +    return ((this.__LZCSSStyleclass == null)
>> +            ? (this.styleclass == name)
>> +            : (this.__LZCSSStyleclass.indexOf(' ' + name + ' ') >= 0));
>> +  }
>> +
> 
> Is this function part of another change?

Really just documenting how styleclass and __LZCSSStyleclass relate, for 
myself, since I had to re-read my code to remember, when trying to fix 
nodePath.  In the end, I decided it is best to not consider the style part of 
the selector.  But I'd like to leave that code as documentation.

>> +   * Return an array of <cntextmenuitem>'s to add to any context
>> +   * menu
> 
> Typo: <contextmenuitem>

Fixed.

> debugger.lzx:
> Maybe it's easier to move the <debugmenuitem>s out of the debugger's 
> <contextmenu> into a separate <node>. So you've got something like:
> ---
> 
> <contextmenu name="menu">
>  <contextmenuitem name="Preferences" ... />
>  <contextmenuitem name="Clear" ... />
> </contextmenu>
> 
> <node name="debuggeritems">
>  <!-- extra separatorbefore for nicer ui -->
>  <debugmenuitem separatorbefore="true" ... />
>  <debugmenuitem ... />
>  ...
> </node>
> 
> <!-- The debugger context menu items that should be added to any context menu 
> -->
> <method name="contextMenuItems" args="menu, target"><![CDATA[
>  this.updateMenu(this.debuggeritems, target);
>  // maybe a fresh copy of 'subnodes' useful/necessary, maybe not...
>  return this.debuggeritems.subnodes.slice(0);
> ]]></method>

I considered something like that, but I really want the Preferences and Clear 
items to be at the bottom of the debugger menu.  So I'd have to invent a richer 
protocol to let contextMenuItems indicate where to insert items.  I think I 
will leave that as a future improvement.

Eventually, there probably should be something like an event, that would run 
_all_ methods, and gather up all the menu items from various subsystems that 
might want to contribute, and the menu items would have group & precedence that 
would allow the menu to group and sort them to build the menu.

I suppose eventually we want to be able to have submenus of context menus, so 
they don't grow unwieldy.

> ---
> 
> Otherwise approved
> 
> 
> On 1/21/2011 12:23 AM, P T Withington wrote:
>> Change ptw-20110120-iqT by [email protected] on 2011-01-20 18:07:07 EST
>>     in /Users/ptw/OpenLaszlo/trunk-3
>>     for http://svn.openlaszlo.org/openlaszlo/trunk
>> 
>> Summary: Address review comments on r18290
>> 
>> Bugs Fixed:  LPP-9674 Make Debug.bugReport() easier to use
>> 
>> Technical Reviewer: [email protected] (pending)
>> QA Reviewer: [email protected] (pending)
>> 
>> Overview:
>> 
>>     Retooled how the debugger finds out there was a context menu
>>     request and gets a chance to insert its own amendments into the
>>     context menu so the debugger items will show up in _any_ context
>>     menu.
>> 
>> Details:
>> 
>>     LzContextMenuKernel.*, LzContextMenu: Eliminate addItem/clearItems
>>     from the kernal API.  The kernel now calls back to the LFC to get
>>     the list of items to display.  Revert onmenuopen to sending the
>>     menu being opened as the delegate argument.
>> 
>>     LzDebug: Factor out common pattern for writing.
>> 
>>     LzBootstrapDebugService, LzDebuggerConsoleWindowBridge.*: Pass
>>     contextMenuItems call.  Make swf9 also use DebugWindow, so I stop
>>     fooling myself.
>> 
>>     LzNode: fix nodePath to not be confusing.
>> 
>>     debugger: Implement contextMenuItems.
>> 
>>     library:  Add documentation
>> 
>> Tests:
>>     IWFM.
>> 
>> Files:
>> M       WEB-INF/lps/lfc/kernel/dhtml/LzContextMenuKernel.lzs
>> M       WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js
>> M       WEB-INF/lps/lfc/kernel/swf9/LzContextMenuKernel.lzs
>> M       WEB-INF/lps/lfc/debugger/LzMessage.lzs
>> M       WEB-INF/lps/lfc/debugger/LzDebug.lzs
>> M       
>> WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebuggerWindowConsoleBridge.js
>> M       
>> WEB-INF/lps/lfc/debugger/platform/swf9/LzDebuggerWindowConsoleBridge.as
>> M       WEB-INF/lps/lfc/core/LzNode.lzs
>> M       WEB-INF/lps/lfc/helpers/LzContextMenu.lzs
>> M       WEB-INF/lps/lfc/compiler/LzBootstrapDebugService.lzs
>> M       lps/components/debugger/debugger.lzx
>> M       lps/components/debugger/library.lzx
>> 
>> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/ptw-20110120-iqT.tar
>> 


Reply via email to