Yes. I guess Max is preserving the previous loose behavior, which was to ignore bad values.

I think the answer depends on:

If the API is exposed to LZX, then we have to maintain the 'loose' behavior of LZX (which is to ignore bad inputs, try to do what the user intended, as far as possible). If the API is internal to the LFC, we can be more 'strict' about typing, to try to get more performance and fewer runtime errors. And, we have to be very careful when going from an LZX API to an LFC API.

On 2008-09-17, at 08:24EDT, André Bargull wrote:

This leads to the question:
What is the expected behaviour if the users sets x/y/width/height to "NaN" in LzView? Should we change it to 0 or signal an error?


On 9/17/2008 2:01 PM, P T Withington wrote:
Hm. So you think this is not a type error, but something tighter check the code is signaling? In either case, I think it would be better to figure out how set* is being called with the wrong argument.
On 2008-09-17, at 07:56EDT, André Bargull wrote:
I think the argument is of datatype "Number", but invalid for "flash.display::Graphics/drawRect()" because it's "NaN" (maybe 0/0 somewhere?). Reason: LzView#_width is declared as Number, so if you'd call the "width"-setter in LzView with a non-Number, Flash will throw an error at that stage.

On 9/17/2008 1:42 PM, P T Withington wrote:
Would it be better to declare the arg to be a Number and find out who the bogus caller is?
On 2008-09-17, at 01:14EDT, Max Carlson wrote:
Change 20080916-maxcarlson-N by [EMAIL PROTECTED] on 2008-09-16 22:10:56 PDT
 in /Users/maxcarlson/openlaszlo/trunk-clean
 for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Add value checking for swf9 sprite setWidth/Height()

Bugs Fixed: LPP-6992 - swf9: error in sprite when closing down the server while an RTMP stream is playing

Technical Reviewer: promanik
QA Reviewer: [EMAIL PROTECTED]

Details: Make sure the width and height args passed to setWidth() and setHeight() are numbers.

Tests: See LPP-6992

Files:
M      WEB-INF/lps/lfc/kernel/swf9/LzSprite.as

Changeset: 
http://svn.openlaszlo.org/openlaszlo/patches/20080916-maxcarlson-N.tar




Reply via email to