It looks like the netremotecall class was not ported to 4.2. I made the following modifications to get it to compile in swf9. Note that I had to change the name of the "call" method to "callmethod" because the name 'call' conflicts with the builtin 'call' javascript method.
Try the attached file in place of the
lps/components/extensions/av/rtmpconnection.lzx, and see
if it works for you.
<class name="netremotecall" extends="node">
<!--- Name of the remote function. -->
<attribute name="funcname" value="$once{null}" type="string" />
<attribute name="remotecontext" value="null" />
<attribute name="dataobject" value="null" />
<!--- Call the remote method, passing the array of params. -->
<method name="callmethod" args="params"><![CDATA[
if (this.funcname == null) {
Debug.write("No funcname given");
if (this.onerror) {
this.onerror.sendEvent("No funcname given");
}
return;
}
if (params == null) {
params = [];
var subnodes = this.subnodes;
if (subnodes != null) {
var i;
var n = subnodes.length;
for (i = 0; i < n; i++) {
// If getValue method is declared in param, call that
// instead to get value.
var tsi = subnodes[i];
if ((tsi["getValue"] != null) &&
(tsi.getValue["prototype"] != null)) {
params[i] = tsi.getValue();
} else {
params[i] = tsi.value;
}
}
}
} else if (params instanceof Array) {
Debug.write(this.name, "error: first argument (params)
is not an array");
return -1;
}
var rtmpObject = null;
if (this.parent instanceof lz.rtmpconnection){
rtmpObject = this.parent;
} else if(this.remotecontext instanceof lz.rtmpconnection){
rtmpObject = this.remotecontext;
} else {
Debug.write("ERROR: no remotecontext availible abort call");
}
//Debug.write("call", this, this.parent, this.parent.status);
if (parent.status == "connected"){
parent.call(this.funcname, this, params);
}
]]>
</method>
<!--- Handle the result returned from the remote method. -->
<method name="onResult" args="value"><![CDATA[
// Can be overriden.
// Would be great if it can be used with dataobject,
// but I don't know how to convert Array/primitive to
LzDataset/LzDataPointer.
//Debug.write("onResult: ",this,value,dataobject);
if (this.dataobject!=null) this.dataobject.valueToElement(value);
this.ondata.sendEvent(value);
]]>
</method>
</class>
<!---
Net parameter.
Element to use inside netremotecall.
@todo Document netparam class.
-->
<class name="netparam" extends="node">
<!--- The value of the netparam. -->
<attribute name="value" value="null"/>
</class>
On Thu, Feb 5, 2009 at 4:00 AM, Tim Dauer <[email protected]> wrote:
> Hi List!
>
> Until last friday I used to proxy my applications in OpenLaszlo 4.0.11 -
> most things worked fine, but I missed some fearures. This monday the idea
> came up to update the programcode to OL 4.2 and I followed the migration
> guide on the OL website. As I killed the main issues referred on that site,
> I had a look at about 16 compilation warnings that said:
>
> "The tag 'netremotecall' cannot be used as a child of rtmpconnection"
>
> So I looked into the rtmpconnection class (where the netremotecall was
> located in 4.0.xx) but there was no class declaration of the netremotecall.
>
> Hard to believe, but: Is the feature of netremotecalls abandoned or am I
> looking at the wrong place?
>
> Greets
> Tim
>
--
Henry Minsky
Software Architect
[email protected]
rtmpconnection.lzx
Description: Binary data
