Change maxcarlson-20110109-O0R by maxcarl...@friendly on 2011-01-09 11:03:54 PST
in /Users/maxcarlson/openlaszlo/trunk-clean
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: UPDATED: Deprecate view.play/onplay/onstop in favor of view.playing
attribute
Bugs Fixed: LPP-7273 - <view> `play` attribute should be deprecated, replace
with `playing` (and make that read/write)
Technical Reviewer: ptw
QA Reviewer: [email protected]
Details: I'm going to check this in now. Updated to address Andre's comments:
LzSprite.as (swf8):
Extra calls to resourceevent('playing',...) not needed here:
> this.owner.resourceevent('play', null, true);
> + this.owner.resourceevent('playing', true);
and here:
> - if ( this.playing ) this.owner.resourceevent('stop', null, true);
> + if ( this.playing ) {
> + this.owner.resourceevent('stop', null, true);
> + this.owner.resourceevent('playing', false);
> + }
Fixed.
I'm not sure setting "playing" is required in the setter, maybe "playing"
should just be updated from the kernel through resourceevent():
> +function $lzc$set_playing (b:Boolean) :void {
> + var changed = b !== this.playing;
> + this.playing = b
> + if (changed) {
> + if ( b ) {
> + this.play();
> + } else {
> + this.stop();
> + }
> }
> + if (this.onplaying.ready) this.onplaying.sendEvent(b);
> }
Just like Tucker said in LPP-7273, the setter for "playing" merely describes an
intent:
> I can see that this could be a little complex since `playing` is supposed to
> represent the actual state of the clip, so the setter for `playing` can only
> express an intent
Right. Fixed.
And please update the following files:
- examples/music/music.lzx
- lps/components/lz/mr-ed.lzx
- test/lfc/legals/multiframeresource.lzx
- test/lfc/resourceplayfalse.lzx
- test/multiresource.lzx
- laszlo-explorer/scripting/audioplayer.lzx
Fixed.
Otherwise:
LzSprite - Use resourceevent() to set playing attribute.
LaszloView - Update docs on playing attribute to be read/write, add onplaying
event. Deprecate onplay/onstop. Add deprecated warning to view.play virtual
setter.
Tests: test/lfc/legals/multiframeresource.lzx runs like before across all
runtimes
Files:
M test/multiresource.lzx
M test/lfc/legals/multiframeresource.lzx
M test/lfc/resourceplayfalse.lzx
M WEB-INF/lps/lfc/kernel/swf/LzSprite.as
M WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
M WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
M WEB-INF/lps/lfc/views/LaszloView.lzs
M lps/components/lz/mr-ed.lzx
M laszlo-explorer/scripting/audioplayer.lzx
M examples/music/music.lzx
Changeset:
http://svn.openlaszlo.org/openlaszlo/patches/maxcarlson-20110109-O0R.tar