Revision: 2284
          http://vexi.svn.sourceforge.net/vexi/?rev=2284&view=rev
Author:   clrg
Date:     2007-09-20 10:58:32 -0700 (Thu, 20 Sep 2007)

Log Message:
-----------
Nested submenus were broken if dynamically created

Modified Paths:
--------------
    trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/submenu.t

Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/submenu.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/submenu.t    
2007-09-20 17:21:49 UTC (rev 2283)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/submenu.t    
2007-09-20 17:58:32 UTC (rev 2284)
@@ -51,17 +51,21 @@
         {
             v.Children ++= function(c)
             {
+                if (c == null) {
+                    // FIXME: deal with removal of children
+                } else {
+                    if (itemgroup) c.group = itemgroup;
+                    else itemgroup = c.group;
+                    c.level = level+1;
+                    c.action ++= childActionFunc;
+                    // if locked, put has been redirected here from th_content
+                    if (lockChildren) { cascade = c; return; }
+                    // otherwise spoof the put back to th_content
+                    lockChildren = true;
+                    th_content[arguments.trapname] = c;
+                    lockChildren = false;
+                }
                 cascade = c;
-                if (itemgroup) c.group = itemgroup;
-                else itemgroup = c.group;
-                c.level = level+1;
-                c.action ++= childActionFunc;
-                // if locked, put has been redirected here from th_content
-                if (lockChildren) return;
-                // otherwise spoof the put back to th_content
-                lockChildren = true;
-                th_content[arguments.trapname] = c;
-                lockChildren = false;
             }
             
             cascade = v;


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to