Hi Max,
This works much better but I still ran into a few issues. Perhaps it makes
sense to check in these changes and then create new issues in jira.
In my testing swf works great! In dhtml I found some issues using my test
program (see below)
FF1.5 dhtml: height of window stuck at 200 regardless of resizing.
FF2.0 dhtml: Works, except the minimum height is 200.
IE6 dhtml: width and height stuck at initial values
IE7 dhtml: width ok. Height moves but doesn't appear to be 50% of window
height. Also, there is a minimum height of 198.
<canvas width="75%" height="50%" bgcolor="0xe0e0e0">
<simplelayout axis="y"/>
<text name="msg" width="100%"/>
<view width="100%" height="100%" bgcolor="0xa0a0a0">
<text name="vmsg" width="100%"/>
<method name="vmessage">
vmsg.setText (parent.format(this.width, this.height));
</method>
<method event="oninit">vmessage();</method>
<method event="onwidth">vmessage();</method>
<method event="onheight">vmessage();</method>
</view>
<method name="format" args="w,h">
return "Width: " + w + ", Height: " + h;
</method>
<method name="message">
msg.setText (this.format (this.width, this.height));
</method>
<method event="oninit">message();</method>
<method event="onwidth">message();</method>
<method event="onheight">message();</method>
</canvas>
Change 20070122-maxcarlson-z by [EMAIL PROTECTED]
computer.local on 2007-01-22 12:51:28 PST
in /Users/maxcarlson/openlaszlo/legals
Summary: Make canvas resizing work in both SWF and DHTML.
New Features: Added callJS() to dhtml (just does an eval)
Technical Reviewer: promanik
QA Reviewer: hminsky
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details: Henry, this might help with the context menu bug in IE...
html.lzx - Use new canvas resizing code
LzScreenKernel.as - Capture and send canvas/window resize events
Library.lzs - Include LzScreenKernels
LzScreenKernel.js - Capture and send canvas/window resize events
LzKeyboardKernel.js - Capture events after callback is set up
LzSprite.js - Set flag to scale canvas to percentage values
LzMouseKernel.js - Capture events after callback is set up
LzBrowser.as - Clean up @flashspecific directives
LzBrowser.js - Add callJS(), clean up @flashspecific directives
LzPlatform.as - Remove canvas resize listening code
LaszloCanvas.lzs - Clean up swf-specific code, unused methods,
initialization. Added callback for LzScreenKernel window resize events.
app-console_jp.xslt - Added updated japanese app console from Togawa-san
app-console.xslt - Canvas size now accurate with percentage values
Tests: Canvas resizing (with percentage values) now works in DHTML
and SWF! Before, it only worked with lzt=html, and didn't account
for scrollbars when measuring the screen size. SWF and DHTML canvas
sizes are identical in almost all cases.
Files:
M test/extensions/html.lzx
A WEB-INF/lps/lfc/kernel/swf/LzScreenKernel.as
M WEB-INF/lps/lfc/kernel/swf/Library.lzs
A WEB-INF/lps/lfc/kernel/dhtml/LzScreenKernel.js
M WEB-INF/lps/lfc/kernel/dhtml/LzKeyboardKernel.js
M WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
M WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js
M WEB-INF/lps/lfc/kernel/dhtml/Library.lzs
M WEB-INF/lps/lfc/services/LzBrowser.as
M WEB-INF/lps/lfc/services/LzBrowser.js
M WEB-INF/lps/lfc/views/platform/swf/LzPlatform.as
M WEB-INF/lps/lfc/views/LaszloCanvas.lzs
M WEB-INF/lps/templates/app-console_jp.xslt
M WEB-INF/lps/templates/app-console.xslt
M lps/includes/source/embed-library.lzs
M lps/includes/source/flash.js
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070122-
maxcarlson-z.tar