|
|
|
Comments from Andre:
In the following testcase, not all images receive properly the view's contextmenu. @Max: Why do I need to make that view visible again, mysteriously it's visible-property is set to "false"!? <view width="250" height="60" resource="http://www.openlaszlo.org/themes/manji/images/ol_logo_small.gif" oninit="canvas.makeContextMenu(this); this.setBGColor(red);" onload="this.setResource('http: --- <canvas debug="true" oninit="canvas.makeContextMenu(this)" > <resource name="rsc" src=" <attribute name="httprsc" value="http://www.openlaszlo.org/themes/manji/images/ol_logo_small.gif" type="string" /> <attribute name="ctxmenu_uid" value="0" type="number" /> <simplelayout axis="x" spacing="10" /> <method name="makeContextMenu" args="who" > var cm = new LzContextMenu(); cm.addItem(cm.makeMenuItem(who.constructor.tagname + ' ' + (canvas.ctxmenu_uid++))); who.setContextMenu(cm); </method> <view> <simplelayout axis="y" spacing="10" /> <text>normal views</text> <view width="250" height="60" oninit="canvas.makeContextMenu(this)" /> <view width="250" height="60" oninit="canvas.makeContextMenu(this); this.setBGColor(red);" /> <view width="250" height="60" bgcolor="yellow" oninit="canvas.makeContextMenu(this);" /> <view width="250" height="60" bgcolor="yellow" oninit="canvas.makeContextMenu(this); this.setBGColor(red);" /> </view> <view> <simplelayout axis="y" spacing="10" /> <text>views with resources</text> <view width="250" height="60" resource="http://www.openlaszlo.org/themes/manji/images/ol_logo_small.gif" oninit="canvas.makeContextMenu(this)" /> <view width="250" height="60" bgcolor="blue" resource="http://www.openlaszlo.org/themes/manji/images/ol_logo_small.gif" oninit="canvas.makeContextMenu(this)" /> <view width="250" height="60" resource="rsc" oninit="canvas.makeContextMenu(this)" /> <view width="250" height="60" bgcolor="blue" resource="rsc" oninit="canvas.makeContextMenu(this)" /> <view width="250" height="60" resource="rsc" oninit="canvas.makeContextMenu(this); this.setBGColor(red);" /> <view width="250" height="60" bgcolor="blue" resource="rsc" oninit="canvas.makeContextMenu(this); this.setBGColor(red);" /> <!-- these do not work --> <!-- <view width="250" height="60" bgcolor="blue" resource="rsc" oninit="canvas.makeContextMenu(this); this.setBGColor(red); /*this.setResource(canvas.httprsc);*/" /> <view width="250" height="60" resource="http://www.openlaszlo.org/themes/manji/images/ol_logo_small.gif" oninit="canvas.makeContextMenu(this); this.setBGColor(yellow); this.setResource('rsc'); Debug.write('%w - %d x %d', this, this.x, this.y);" /> <view width="250" height="60" bgcolor="blue" resource="http://www.openlaszlo.org/themes/manji/images/ol_logo_small.gif" oninit="canvas.makeContextMenu(this); this.setBGColor(yellow); this.setResource('rsc'); Debug.write('%w - %d x %d', this, this.x, this.y);" /> --> *<!-- no context menu on the image for the following four views --> <view width="250" height="60" resource="http://www.openlaszlo.org/themes/manji/images/ol_logo_small.gif" oninit="canvas.makeContextMenu(this); this.setBGColor(yellow);" onload="this.setResource('rsc');" /> <view width="250" height="60" bgcolor="blue" resource="http://www.openlaszlo.org/themes/manji/images/ol_logo_small.gif" oninit="canvas.makeContextMenu(this); this.setBGColor(yellow);" onload="this.setResource('rsc');" /> <!-- mysteriously these get invisible --> <view width="250" height="60" resource="http://www.openlaszlo.org/themes/manji/images/ol_logo_small.gif" oninit="canvas.makeContextMenu(this); this.setBGColor(red);" onload="this.setResource('http: <view width="250" height="60" bgcolor="blue" resource="http://www.openlaszlo.org/themes/manji/images/ol_logo_small.gif" oninit="canvas.makeContextMenu(this); this.setBGColor(red);" onload="this.setResource('http: </view> <view> <simplelayout axis="y" spacing="10" /> <text>texts</text> <text text="contextmenu" oninit="canvas.makeContextMenu(this)" /> <text bgcolor="0xeaeaea" text="contextmenu" oninit="canvas.makeContextMenu(this)" /> <inputtext text="contextmenu" oninit="canvas.makeContextMenu(this)" /> <inputtext bgcolor="0xeaeaea" text="contextmenu" oninit="canvas.makeContextMenu(this)" /> </view> </canvas> (pagan-deities branch r8434 - mars rc/4.0.11)
This and LPP5636 appear to be missing in the branch. test case from andre, packaged as a tar file
(pagan-deities branch build r8434 - mars/4.0.11)
I'm getting different results in swf and dhtml. Henry can you look at the attachments? 2 of the views do not work in swf, no error (3rd and 4th to last in second column) Also in swf, views in center column after view 10 get the standard menu when the user right clicks on the png. I'm going to split this into a separate bug; the issue of the view not showing up at all when a view has a bgcolor and an image resource.
Image loading failures in swf are caused by this changeset for
------------------------------------------------------------------------ r4714 | max | 2007-04-13 20:27:27 +0200 (Fri, 13 Apr 2007) | 29 lines Ge?\195?\164nderte Pfade: M /openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/swf/LzMakeLoadSprite.as M /openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/swf/LzMediaLoader.lzs Change 20070412-maxcarlson-G by maxcarlson@plastik on 2007-04-12 20:17:13 PDT in /Users/maxcarlson/openlaszlo/legals-clean for http://svn.openlaszlo.org/openlaszlo/branches/legals Summary: Fix resourcewidth and height for proxied swf and image loading New Features: Bugs Fixed: Technical Reviewer: promanik QA Reviewer: jcrowley Doc Reviewer: (pending) Documentation: Release Notes: Details: Tests: See http://jira.openlaszlo.org/jira/browse/LPP-3877. Load http://localhost:8080/legals/my-apps/grigloadswf.lzx and http://localhost: 8080/legals/my-apps/grigloadswf.lzx?lzproxied=false after clearing caches. You should see exactly one onload event for each button, with val id/nonzero resource width and height. Also reload after or during existing load. Files: M WEB-INF/lps/lfc/kernel/swf/LzMediaLoader.lzs M WEB-INF/lps/lfc/kernel/swf/LzMakeLoadSprite.as Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070412-maxcarlson-G.tar ------------------------------------------------------------------------ Attached updated testcase "lpp-5670__UPDATE.lzx"
------------------------------------------------------------------------
r11441 | bargull | 2008-10-14 10:59:36 +0200 (Tue, 14 Oct 2008) | 35 lines Ge?\195?\164nderte Pfade: M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzMakeLoadSprite.as M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzMediaLoader.lzs M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as Change 20081013-bargull-hYz by bargull@dell--p4--2-53 on 2008-10-13 22:23:17 in /home/Admin/src/svn/openlaszlo/trunk for http://svn.openlaszlo.org/openlaszlo/trunk Summary: flash context menu fixes New Features: Bugs Fixed: Technical Reviewer: hminsky QA Reviewer: max Doc Reviewer: (pending) Documentation: Release Notes: Details: LzMediaLoader: Changed execution order so that requests are removed from the loading queue before dispatching the "onloaddone"-event This fixes an issue from the original testcase where the last two views needed to be set to visible manually. LzMakeLoadSprite: Call "updateAfterLoad()" in "setResource()", but make sure you don't send the "onload"-event on the view. But this requires you to call "doQ euedPlayAction()" manually! With that change all four yellows in the middle column are visible. And the context-menu will work, too. And "onframe"-events are working ag ain. LzSprite: Moved all 're-apply context-menu' code into "attachResourceToChildView()" and "attachBackgroundToChild()". Tests: see testcases at bugreports ------------------------------------------------------------------------ |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
r8424 | hqm | 2008-03-26 11:01:54 -0400 (Wed, 26 Mar 2008) | 63 lines
Changed paths:
M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzMakeLoadSprite.as
M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
Change 20080326-hqm-F by hqm@badtzmaru.local on 2008-03-26 10:42:53 EDT
in /Users/hqm/openlaszlo/trunk4/WEB-INF/lps/lfc
for http://svn.openlaszlo.org/openlaszlo/trunk/WEB-INF/lps/lfc
Summary: fix for context-menu bug on views with image resource
New Features:
Bugs Fixed:
LPP-5636,LPP-5670Technical Reviewer: max
QA Reviewer: andre
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
+ Made setContextMenu set the menu on the foreground movieclip if
there is one
+ Made setResource copy the previous resource movieclip's menu to the
new resource movieclip.
If there was not a menu property on the foreground movieclip, try
copying the menu property from the
background-color movieclip.
Tests:
test case from bug report, right click over image area shows same menu
as over background area.
I used this test case, placed in the test/ directory, so as to access
the resource in
test/resources/gif/logo.gif
<canvas>
<view width="300" height="100" bgcolor="blue" resource="resources/gif/logo.gif">
<handler name="oninit">
var cm = new LzContextMenu();
cm.addItem(cm.makeMenuItem('new item 1'));
cm.addItem(cm.makeMenuItem('new item 2'));
setContextMenu(cm);
</handler>
<handler name="onclick">
this.setSource("resources/png/face.png");
</handler>
</view>
</canvas>
Click right on image and background areas to verify that image and background have custom context menu
Click left on view to load new resource
Click right on image and background areas to verify that image and background have the custom context menu