Hi, as i said in my earlier post, i have some questions that are probably so
simple for you.

1-) I have two classes like below.

<class name="chatView" extends="view" align="center">

        <!--shared object for chat-->
        <sharedObjectChat id="soChat">
            <handler name="onconnected" reference="conn">
                //Debug.info("connected attribute operation, value
:%w",conn.connectionOK);
                if (conn.connected) {
                    this.connect("chat", conn._conn, true);
                    this.so.client=this;
                }
            </handler>
        </sharedObjectChat>
...
</class>

<class name="login" extends="window">
<button name="loginButton" >Login
     <handler name="onclick"><![CDATA[
          *conn.connect('rtmp://127.0.0.1/fi6en' <http://127.0.0.1/fi6en%27>
);*
          //Debug.info("connected attribute operation, value
:%w",conn.connected);
          *soChat.send("writeInfo", username + " logged in");*
     </handler>
....
</button>

in the chatView class definetion, i am creating the soChat object depend on
the connection status of *conn*.
The problem causes at the lines that i have made bold. in the debugger, i
see that soChat.send() method is being called before the connected message
of the conn object and getting flash runtime error as expected *Error 1009 :
*Cannot access a property or method of a null object reference. .
And later i see that i can use the soChat  clearly.

So my goal is to delay the soChat.send() method depend on the message
NetConnection.Connect.Success. Is there any way to do something for this.


2-)
Is it possible to override a handler of an element in a class object.
For the clarification :

<class name="registerNewUser" extends="window" title="Register">
    <button name="registerButton">Register
           <handler name="onclick">
               Debug.info('Username : %w', classroot.getUsername());
               ....
           </handler>
    </button>
....
</class>

<canvas>
    <registerNewUser name="registerWindow">
*                // here i want to override the onclick handler of the
registerButton button*
   </registerNewUser>
</canvas>


3-) Actually, this is not a specific question:) I am not sure that somebody
has the same idea with me, but it takes a long time to organize the visual
elements in openlaszlo.
At this situation, i strongly need a visual openlaszlo editor. Max
recommended me one, named "dragn", but i got some problems on installing
and running issues.
For openlaszlo-dev team: do you have any plan for developing an openlaszlo
IDE as the developer team.

Thanks
-- 
Cem SONMEZ

Reply via email to