Dave Miller | 1 May 01:00 2008
Picon

Re: setFocus() in swf

On Apr 30, 2008, at 12:45 PM, Jesse Norell wrote:

> Could that be worked around in the
> html that embeds the swf application (ie. via javascript that sets
> focus)?

Here's my standard HTML. Note the "onLoad()" in the body tag and the  
'id' param of the swfEmbed().
Not sure if this works in all browsers.

Dave

<html>
	<head>
	<title>My App</title>
	<script src="embed-compressed.js" type="text/javascript"></script>
	</head>
	<body style="margin: 0;" onLoad="window.document.lzapp.focus();">
		<script type="text/javascript">
			Lz.swfEmbed({url: 'main.lzx.lzr=swf8.swf?&lzproxied=false',  
bgcolor: '#ffffff', width: '100%', height: '100%', id: 'lzapp',  
accessible: 'false'});
		</script>
		<noscript>
			Please enable JavaScript in order to use this application.
		</noscript>
	</body>
</html>

(Continue reading)

Anthony Bargnesi | 2 May 14:26 2008
Picon

Problem with rtmpconnection (to red5) and 4.0.12

Hello,

I recently ran a lzx test app in 4.0.12 that makes a call to Red5.  What worked fine in an previous laszlo versions
has since stopped working.  This time, however, I am seeing the following compiler warnings:

extensions/av/rtmpconnection.lzx:14:49: Method rtmpconnection.call is overriding a superclass method of the same name which has been declared non-overridable
extensions/av/rtmpconnection.lzx:250:48: Method netremotecall.call is overriding a superclass method of the same name which has been declared non-overridable

Here is the example LZX:

<canvas debug="true">
    <button name="callButton" onclick="onCardEventCall();">
        Call sendEvent
        <method name="onCardEventCall">
            canvas.rtmp.onCardEvent.event = "button was clicked!";
            canvas.rtmp.onCardEvent.call();
        </method>
    </button>
    <rtmpconnection name="rtmp" debug="true" autoconnect="true" src="rtmpt://localhost:8888/srvr/myhome">
        <handler name="onconnect">
            Debug.write("connected");
        </handler>
        <handler name="onerror">
            Debug.write("error ",this.status);
        </handler>

       <netremotecall name="onCardEvent" funcname="onCardEvent">
            <attribute name="event" value="" type="string" />
            <netparam name="vars1"><method name="getValue">return parent.event;</method></netparam>
        </netremotecall>

       <netremotecall name="newEvent" funcname="newEvent">
            <method name="onResult" args="value">
                Debug.write('event received: ' + value);
            </method>
        </netremotecall>
    </rtmpconnection>
</canvas>

I see the rtmpconnection being made on the Red5 server, but when I try to send an event by clicking the "callButton"
it never comes through in Red5.  I'm thinking this has something to do with the compiler warnings.

Any thoughts?

Tony

Jesse Norell | 2 May 17:13 2008
Picon

<gridtext> to create an element?

Hello,

  In a databound grid, I want to use a <gridtext> for an "optional" node
in the dataset; ie. the gridtext datapath ("Description/text()") may not
match anything, and that's ok.  It works fine if there is a match, but
if there isn't for that row, I'd like to be able to create a node (the
Description) when text is entered.  Any clues how that can be done?

  Further info: in that case, when there's no matching node, trying to
enter text prints the error "setNodeText: p is null in Datapath ...".
I've tried doEnterDown() and various events to try to catch that and
create a node, but they don't "fire," I think due to that error.  I'm
using 4.0.11.

--

-- 
Jesse Norell
Kentec Communications, Inc.
jesse@...

Anthony Bargnesi | 2 May 19:11 2008
Picon

Re: Problem with rtmpconnection (to red5) and 4.0.12

I found out some further information.  I modified components/extensions/av/rtmpconnection.lzx to make the netconnection always through the line:

this._nc.call(func, obj);

instead of:

this._nc.call.apply(arguments);

This condition takes place at line 233 of rtmpconnect.lzx.  It seems like the compiler warnings say that the "call" method cannot be overriden in a base class.  So by reverting back to "this._nc.call(func, obj);" does the trick, but obviously this refactor was done for a reason.  Plus I still get the compiler warnings.

Hope this helps uncover some issues,
Tony

On Fri, May 2, 2008 at 8:26 AM, Anthony Bargnesi <abargnesi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hello,

I recently ran a lzx test app in 4.0.12 that makes a call to Red5.  What worked fine in an previous laszlo versions
has since stopped working.  This time, however, I am seeing the following compiler warnings:

extensions/av/rtmpconnection.lzx:14:49: Method rtmpconnection.call is overriding a superclass method of the same name which has been declared non-overridable
extensions/av/rtmpconnection.lzx:250:48: Method netremotecall.call is overriding a superclass method of the same name which has been declared non-overridable

Here is the example LZX:

<canvas debug="true">
    <button name="callButton" onclick="onCardEventCall();">
        Call sendEvent
        <method name="onCardEventCall">
            canvas.rtmp.onCardEvent.event = "button was clicked!";
            canvas.rtmp.onCardEvent.call();
        </method>
    </button>
    <rtmpconnection name="rtmp" debug="true" autoconnect="true" src="rtmpt://localhost:8888/srvr/myhome">
        <handler name="onconnect">
            Debug.write("connected");
        </handler>
        <handler name="onerror">
            Debug.write("error ",this.status);
        </handler>

       <netremotecall name="onCardEvent" funcname="onCardEvent">
            <attribute name="event" value="" type="string" />
            <netparam name="vars1"><method name="getValue">return parent.event;</method></netparam>
        </netremotecall>

       <netremotecall name="newEvent" funcname="newEvent">
            <method name="onResult" args="value">
                Debug.write('event received: ' + value);
            </method>
        </netremotecall>
    </rtmpconnection>
</canvas>

I see the rtmpconnection being made on the Red5 server, but when I try to send an event by clicking the "callButton"
it never comes through in Red5.  I'm thinking this has something to do with the compiler warnings.

Any thoughts?

Tony

Henry Minsky | 3 May 02:26 2008
Picon

Re: Problem with rtmpconnection (to red5) and 4.0.12

Hmm, we rewrote how the base "schema" is declared to the compiler,and that does indeed declare "call" as a final method:

<interface name="Instance" extends="Object">
  <method name="validateClassStructure" final="true"/>
  <method name="initialize" />
  <method name="nextMethod" final="true"/>
  <method name="addProperty" final="true"/>
  <method name="constructor" final="true"/>
  <method name="hasOwnProperty" final="true"/>
  <method name="isPropertyEnumerable" final="true"/>
  <method name="isPrototypeOf" final="true"/>
  <method name="toLocaleString" final="true"/>
  <method name="prototype" final="true"/>
  <method name="apply" final="true"/>
  <method name="call" final="true"/>
</interface>

Since 'call' is a javascript built-in, it would really be best to rename this method in the library.




On Fri, May 2, 2008 at 1:11 PM, Anthony Bargnesi <abargnesi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
I found out some further information.  I modified components/extensions/av/rtmpconnection.lzx to make the netconnection always through the line:

this._nc.call(func, obj);

instead of:

this._nc.call.apply(arguments);

This condition takes place at line 233 of rtmpconnect.lzx.  It seems like the compiler warnings say that the "call" method cannot be overriden in a base class.  So by reverting back to "this._nc.call(func, obj);" does the trick, but obviously this refactor was done for a reason.  Plus I still get the compiler warnings.

Hope this helps uncover some issues,
Tony


On Fri, May 2, 2008 at 8:26 AM, Anthony Bargnesi <abargnesi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hello,

I recently ran a lzx test app in 4.0.12 that makes a call to Red5.  What worked fine in an previous laszlo versions
has since stopped working.  This time, however, I am seeing the following compiler warnings:

extensions/av/rtmpconnection.lzx:14:49: Method rtmpconnection.call is overriding a superclass method of the same name which has been declared non-overridable
extensions/av/rtmpconnection.lzx:250:48: Method netremotecall.call is overriding a superclass method of the same name which has been declared non-overridable

Here is the example LZX:

<canvas debug="true">
    <button name="callButton" onclick="onCardEventCall();">
        Call sendEvent
        <method name="onCardEventCall">
            canvas.rtmp.onCardEvent.event = "button was clicked!";
            canvas.rtmp.onCardEvent.call();
        </method>
    </button>
    <rtmpconnection name="rtmp" debug="true" autoconnect="true" src="rtmpt://localhost:8888/srvr/myhome">
        <handler name="onconnect">
            Debug.write("connected");
        </handler>
        <handler name="onerror">
            Debug.write("error ",this.status);
        </handler>

       <netremotecall name="onCardEvent" funcname="onCardEvent">
            <attribute name="event" value="" type="string" />
            <netparam name="vars1"><method name="getValue">return parent.event;</method></netparam>
        </netremotecall>

       <netremotecall name="newEvent" funcname="newEvent">
            <method name="onResult" args="value">
                Debug.write('event received: ' + value);
            </method>
        </netremotecall>
    </rtmpconnection>
</canvas>

I see the rtmpconnection being made on the Red5 server, but when I try to send an event by clicking the "callButton"
it never comes through in Red5.  I'm thinking this has something to do with the compiler warnings.

Any thoughts?

Tony




--
Henry Minsky
Software Architect
hminsky-oDN+GTs16Eu/3pe1ocb+swC/G2K4zDHf@public.gmane.org

André Bargull | 4 May 11:44 2008
Picon

Re: Problem with rtmpconnection (to red5) and 4.0.12

Created LPP-5930 ("http://www.openlaszlo.org/jira/browse/LPP-5930") to 
track this issue.

> Hmm, we rewrote how the base "schema" is declared to the compiler,and that
> does indeed declare "call" as a final method:
>
> <interface name="Instance" extends="Object">
>   <method name="validateClassStructure" final="true"/>
>   <method name="initialize" />
>   <method name="nextMethod" final="true"/>
>   <method name="addProperty" final="true"/>
>   <method name="constructor" final="true"/>
>   <method name="hasOwnProperty" final="true"/>
>   <method name="isPropertyEnumerable" final="true"/>
>   <method name="isPrototypeOf" final="true"/>
>   <method name="toLocaleString" final="true"/>
>   <method name="prototype" final="true"/>
>   <method name="apply" final="true"/>
>   <method name="call" final="true"/>
> </interface>
>
> Since 'call' is a javascript built-in, it would really be best to rename
> this method in the library.
>
>
>
>
> On Fri, May 2, 2008 at 1:11 PM, Anthony Bargnesi <abargnesi at gmail.com <http://www.openlaszlo.org/mailman/listinfo/laszlo-user>>
> wrote:
>
> >/ I found out some further information.  I modified
> />/ components/extensions/av/rtmpconnection.lzx to make the netconnection always
> />/ through the line:
> />/
> />/ this._nc.call(func, obj);
> />/
> />/ instead of:
> />/
> />/ this._nc.call.apply(arguments);
> />/
> />/ This condition takes place at line 233 of rtmpconnect.lzx.  It seems like
> />/ the compiler warnings say that the "call" method cannot be overriden in a
> />/ base class.  So by reverting back to "this._nc.call(func, obj);" does the
> />/ trick, but obviously this refactor was done for a reason.  Plus I still get
> />/ the compiler warnings.
> />/
> />/ Hope this helps uncover some issues,
> />/ Tony
> />/
> />/
> />/ On Fri, May 2, 2008 at 8:26 AM, Anthony Bargnesi <abargnesi at gmail.com <http://www.openlaszlo.org/mailman/listinfo/laszlo-user>>
> />/ wrote:
> />/
> />/ > Hello,
> />/ >
> />/ > I recently ran a lzx test app in 4.0.12 that makes a call to Red5.  What
> />/ > worked fine in an previous laszlo versions
> />/ > has since stopped working.  This time, however, I am seeing the
> />/ > following compiler warnings:
> />/ >
> />/ > *extensions/av/rtmpconnection.lzx:14:49:* Method rtmpconnection.call is
> />/ > overriding a superclass method of the same name which has been declared
> />/ > non-overridable
> />/ > *extensions/av/rtmpconnection.lzx:250:48:* Method netremotecall.call is
> />/ > overriding a superclass method of the same name which has been declared
> />/ > non-overridable
> />/ >
> />/ > Here is the example LZX:
> />/ >
> />/ > <canvas debug="true">
> />/ >     <button name="callButton" onclick="onCardEventCall();">
> />/ >         Call sendEvent
> />/ >         <method name="onCardEventCall">
> />/ >             canvas.rtmp.onCardEvent.event = "button was clicked!";
> />/ >             canvas.rtmp.onCardEvent.call();
> />/ >         </method>
> />/ >     </button>
> />/ >     <rtmpconnection name="rtmp" debug="true" autoconnect="true"
> />/ > src="rtmpt://localhost:8888/srvr/myhome" <rtmpt://localhost:8888/srvr/myhome%22>>
> />/ >         <handler name="onconnect">
> />/ >             Debug.write("connected");
> />/ >         </handler>
> />/ >         <handler name="onerror">
> />/ >             Debug.write("error ",this.status);
> />/ >         </handler>
> />/ >
> />/ >        <netremotecall name="onCardEvent" funcname="onCardEvent">
> />/ >             <attribute name="event" value="" type="string" />
> />/ >             <netparam name="vars1"><method name="getValue">return
> />/ > parent.event;</method></netparam>
> />/ >         </netremotecall>
> />/ >
> />/ >        <netremotecall name="newEvent" funcname="newEvent">
> />/ >             <method name="onResult" args="value">
> />/ >                 Debug.write('event received: ' + value);
> />/ >             </method>
> />/ >         </netremotecall>
> />/ >     </rtmpconnection>
> />/ > </canvas>
> />/ >
> />/ > I see the rtmpconnection being made on the Red5 server, but when I try
> />/ > to send an event by clicking the "callButton"
> />/ > it never comes through in Red5.  I'm thinking this has something to do
> />/ > with the compiler warnings.
> />/ >
> />/ > Any thoughts?
> />/ >
> />/ > Tony
> />/ >
> />/
> />/
> /
>
> -- 
> Henry Minsky
> Software Architect
> hminsky at laszlosystems.com <http://www.openlaszlo.org/mailman/listinfo/laszlo-user>

André Bargull | 4 May 12:03 2008
Picon

Re: <gridtext> to create an element?

Hi Jesse,

I guess the far most easiest way to achieve this, is to change your 
local gridtext-component (in "lps/components/lz/gridtext.lzx").
You only need to override the "updateData()"-method in the gridtext's 
editbox and handle in that place your node-creation code.
For instance like that:
>  <at>  <at>  -106,6 +106,15  <at>  <at> 
>                          this.globalMouseDel = new LzDelegate( this,
>                                                                
> "checkMouse" );
>                          super.init();
> +                    </method>
> +                    <method name="updateData" >
> +                        var ret = super.updateData();
> +                        
> +                        if (this.datapath.p == null) {
> +                            
> this.datapath.context.addNode("description", ret);//for a 
> "description/text()" datapath
> +                        }
> +                        
> +                        return ret;
>                      </method>
>                      <method name="applyData" args="d">
>                          //because of the monkeying with init that this

> Hello,
>
>   In a databound grid, I want to use a <gridtext> for an "optional" node
> in the dataset; ie. the gridtext datapath ("Description/text()") may not
> match anything, and that's ok.  It works fine if there is a match, but
> if there isn't for that row, I'd like to be able to create a node (the
> Description) when text is entered.  Any clues how that can be done?
>
>   Further info: in that case, when there's no matching node, trying to
> enter text prints the error "setNodeText: p is null in Datapath ...".
> I've tried doEnterDown() and various events to try to catch that and
> create a node, but they don't "fire," I think due to that error.  I'm
> using 4.0.11.
>
> -- 
> Jesse Norell
> Kentec Communications, Inc.
> jesse at kci.net <http://www.openlaszlo.org/mailman/listinfo/laszlo-user>

Antun Karlovac | 5 May 22:23 2008

Re: Focusoverlay

Hi Greg,

I think you should be able to disable the focus overlay by saying:

<canvas>
     <attribute name="focusclass" value="null" />
     ...
</canvas>

-Antun

Greg Denton wrote:
> Newbie question again: finally found (by googling, couldn't find in
> docs) what causes the focus animation brackets, the focusoverlay under
> the canvas. How does an app turn it off? Thanks.

Vivian Zong | 6 May 04:31 2008
Picon

problem on animator and LzTimer

Hi, everyone!
I set an animator to move a view horizontally. At the same time, a timer counts elapsed time.
The problem is, when the duration is larger than 45 sec, the animator stops 1sec before the timer get the right elapsed time.
That is, if the duration is 75 sec (my app need this value), the animator stops when the timer is 74 sec.

I list test codes below.
Why animator and LzTimer are not consistent? How to make them consistent?

Any idea is appreciated!

##### codes below  ############
<canvas debug="true">

    <attribute name="dur" type="number" value="$once{parseInt(canvas.setDur.getText())}" />

   
    <text x="40" y="10" text="${'duratuon: '+canvas.dur+' sec'}" resize="true" fontstyle="bold" fontsize="12" />

    <text name="sec" x="200" y="10" resize="true" fontstyle="bold" fontsize="12" text="${'elapsed time:'+this.cnt+' sec'}">
        <attribute name="cnt" type="number" value="0" />
    </text>
   
    <text x="40" y="80" text="packet animation:" fontstyle="bold" />
   
    <view x="40" y="100" width="400" height="15" bgcolor="gray"/>
   
    <view name="pkt" x="40" y="100" width="40" height="15" bgcolor="blue">
        <animator attribute="x" name="move" start="false" relative="false" motion="linear">
            <method event="onstop">               
                LzTimer.removeTimer(del);
                Debug.write("animator stops at:",canvas.sec.cnt);
            </method>
        </animator>
       
        <method name="Move" args="aXto,aDuration">
           
            this.move.from=this.x;
            this.move.setTo(aXto);
            this.move.duration=aDuration;
               this.move.doStart();
        </method>
       
        <method event="onx">
            if(this.x==400){
                Debug.write("packet arrives at:",canvas.sec.cnt);
            }
        </method>
    </view>
   
    <button name="setBtn" x="40" y="150" width="120">set duration(sec):
        <method event="onclick">
            canvas.setAttribute("dur",parseInt(canvas.setDur.getText()));       
        </method>
    </button>
   
    <edittext name="setDur" width="50" x="160" y="150">50</edittext>
   
    <button name="btn" x="300" y="150">start animation
        <method event="onclick">
            canvas.setBtn.setClickable(false);
            canvas.setBtn.setOpacity(0.5);
            canvas.pkt.Move(400,canvas.dur*1000);
            canvas.count();       
        </method>
    </button>
   
    <method name="count">
        canvas.sec.setAttribute("cnt",canvas.sec.cnt+1);
        del = new LzDelegate(this, "count");
        LzTimer.resetTimer(del, 1000);   
    </method>
   
</canvas>


--
Vivian Zong
ramesh ganesan | 6 May 13:09 2008
Picon

Unicode character is not showing in flash environment!

Hi,

I ran  the below code with the OL 4.0.11 server,

<?xml version="1.0" encoding="UTF-8" ?>
<canvas>

<dataset name="let" >
        <word>&#2949;</word>
</dataset>

 <simplelayout spacing="1" axis="x"> </simplelayout>
 <text datapath="let:/word/text()" fontsize="40"/>

</canvas>

---
I am getting the correct interpretation for the DHTML environment but
FLASH environment   is not showing the unicode character ( Its showing
only box like symbol...).

Thanks in advance!

Regards,
Ramesh G.


Gmane