Author: ben
Date: 2007-07-12 11:40:32 -0700 (Thu, 12 Jul 2007)
New Revision: 5651

Modified:
   openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
   openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
Log:
Change 20070711-ben-6 by [EMAIL PROTECTED] on 2007-07-11 15:40:04 PDT
    in /Users/ben/src/svn/openlaszlo/branches/legals
    for http://svn.openlaszlo.org/openlaszlo/branches/legals

Summary: Fix getContextMenu() again

New Features:

Bugs Fixed: : LPP-4155 (again)

Technical Reviewer: pbr
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:
This change re-applies changes from r5552, which were obliterated 
accidentally with r5568. 

Release Notes:

Details:
    

Tests:
ant lztest passes

This app runs in dhtml and swf:

<canvas debug="true">
 <button text="getContextMenu">
   <handler name="onclick">
     var cm = canvas.getContextMenu();
     var del = new LzDelegate (this, 'myHandler');
     cm.addItem(cm.makeMenuItem('My Function', del));
     Debug.write(cm);
   </handler>

   <method name="myHandler">
     Debug.write("myHandler");
   </method>
 </button>
</canvas>

Files:
M      WEB-INF/lps/lfc/kernel/swf/LzSprite.as
M      WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js


Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 
2007-07-12 06:43:31 UTC (rev 5650)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 
2007-07-12 18:40:32 UTC (rev 5651)
@@ -1456,7 +1456,15 @@
     this.__contextmenu = cmenu;
 }
 
+/**
+  * LzView.getContextMenu
+  * Return the current context menu
+  */
+LzSprite.prototype.getContextMenu = function() {
+    return this.__contextmenu;
+}
 
+
 if (LzSprite.prototype.quirks.ie_leak_prevention) {
     LzSprite.prototype.__sprites = {};
 

Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/swf/LzSprite.as   
2007-07-12 06:43:31 UTC (rev 5650)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/swf/LzSprite.as   
2007-07-12 18:40:32 UTC (rev 5651)
@@ -1535,6 +1535,7 @@
 LzSprite.prototype.setContextMenu = function ( cmenu ){
     // For back compatibility, we accept either LzContextMenu or (Flash 
primitive) ContextMenu
     if (! (cmenu instanceof ContextMenu)) {
+        this.__contextmenu = cmenu;
         cmenu = cmenu.__LZcontextMenu();
     } else {
         if ($debug) Debug.warn("Passing a Flash ContextMenu to 
LzView.setContextMenu is deprecated, use LzContextMenu instead");
@@ -1561,6 +1562,14 @@
 }
 
 /**
+  * LzView.getContextMenu
+  * Return the current context menu
+  */
+LzSprite.prototype.getContextMenu = function() {
+    return this.__contextmenu;
+}
+
+/**
   * Register for update when the button gets the focus.
   * Set the behavior of the enter key depending on whether the field is
   * multiline or not.


_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins

Reply via email to