[Laszlo-checkins] r14070 - openlaszlo/trunk/lps/components/extensions/av
sallen@openlaszlo.org
sallen at openlaszlo.org
Fri Jun 5 13:43:25 PDT 2009
Author: sallen
Date: 2009-06-05 13:43:23 -0700 (Fri, 05 Jun 2009)
New Revision: 14070
Modified:
openlaszlo/trunk/lps/components/extensions/av/rtmpconnection.lzx
Log:
Change 20090605-sallen-4 by sallen at sallen-mac.local on 2009-06-05 13:40:38 PDT
in /Users/sarah/src/svn/openlaszlo/trunk-bugfix
for http://svn.openlaszlo.org/openlaszlo/trunk
New Features: n/a
Bugs Fixed:
LPP-8237 When an rtmpconnection is named, it is never used as the default connection
Technical Reviewer: Raju Bitter <rajubitter at me.com>
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation: now the behavior matches the docs
Release Notes:
Details:
As documented, the a/v extensions and components use the first rtmpconnection that is created if there is none specified for the component; however, if a rtmpconnection has a name, it is never used as the default Test file checked in: trunk/test/video/test-rtmp-default.lzx Expected: click the button, status light should turn green Results: the following warnings are reported in the debugger on app startup WARNING @av/rtmpstatus.lzx#33: reference to undefined property '_default' WARNING @test-rtmp-default.lzx#18: rtmpconnection not found for /view[2]/rtmpstatus When you click the button, it stays red, even though the status text says "connected"
Tests:
Test file checked in: trunk/test/video/test-rtmp-default.lzx
Expected: click the button, status light should turn green
Before the fix: the following warnings are reported in the debugger on app startup
WARNING @av/rtmpstatus.lzx#33: reference to undefined property '_default'
WARNING @test-rtmp-default.lzx#18: rtmpconnection not found for /view[2]/rtmpstatus
When you click the button, it stays red, even though the status text says "connected"
Modified: openlaszlo/trunk/lps/components/extensions/av/rtmpconnection.lzx
===================================================================
--- openlaszlo/trunk/lps/components/extensions/av/rtmpconnection.lzx 2009-06-05 19:16:38 UTC (rev 14069)
+++ openlaszlo/trunk/lps/components/extensions/av/rtmpconnection.lzx 2009-06-05 20:43:23 UTC (rev 14070)
@@ -99,7 +99,7 @@
@type Object
@access private
-->
- <attribute name="connections" value="{}" type="expression" allocation="class"/>
+ <attribute name="connections" value="null" type="expression" allocation="class"/>
<!--- Event sent when connection established. -->
<event name="onconnect"/>
@@ -107,7 +107,7 @@
@access private -->
<event name="onerror"/>
- <method name="init">
+ <method name="init"> <![CDATA[
super.init();
// Store new RTMP connections in lz.rtmpconnection.connections. If no
@@ -117,7 +117,7 @@
this.name = "_default";
}
- if (lz.rtmpconnection.connections[this.name] != null) {
+ if (lz.rtmpconnection.connections != null && lz.rtmpconnection.connections[this.name] != null) {
if ($debug) {
if (this.name == "_default") {
Debug.warn("A default RTMP connection already exists, please name connections if you use more than one");
@@ -126,7 +126,13 @@
}
}
}
+
+ if (lz.rtmpconnection.connections == null) {
+ lz.rtmpconnection.connections = {};
+ if (this.name != "_default")
+ lz.rtmpconnection.connections._default = this;
+ }
lz.rtmpconnection.connections[this.name] = this;
if (this.debug) {
@@ -155,6 +161,7 @@
if (this.autoconnect) {
this.connect();
}
+ ]]>
</method>
<method name="_onSecurityError" args="error">
More information about the Laszlo-checkins
mailing list