Hi,Sebastian Werner:

I already paste all the js code in the previous mail, I just want know when
I dispatch a event to notify my program to load a function in order to
create a new window, but it's fail, I don't know why, pls tell me, and you
can run the js code. If we load the function not through the event , and it
will work correctly.

thks


Sebastian Werner wrote:
> 
> Hi Wenhua!
> 
> Please tell us some details about the error. And please try a much 
> simpler example first. What's about to modify a small qooxdoo demo 
> regarding to your question?
> 
> Cheers,
> 
> Sebastian
> 
> 
> [EMAIL PROTECTED] schrieb:
>> Hi,folks
>> Can anyone tell me why this error would happen? Is this the bug of the
>> qooxdoo? Why we can create a window when a event notify, and the alert
>> window can show successfully?
>> Hope for your reply,thks!
>> The js file is show below:
>> 
>> qx.OO.defineClass("AtWebIM", qx.core.Object,
>> function () {
>>   qx.core.Object.call(this);
>> qx.ui.core.ClientDocument.getInstance().addEventListener("createlogineve
>> nt",function(event){
>>      alert("test alert!!");
>>      var login = _createLoginWindow("123","123");
>>      login.setLocation(350, 100);
>>      login.open();
>>   });
>>      var btn = new qx.ui.form.Button("Login", "icon/16/apply.png");
>>      btn.setHorizontalAlign("right");
>>      btn.addEventListener("click", function() {
>>              qx.ui.core.ClientDocument.getInstance().dispatchEvent(
>> new qx.event.type.DataEvent("createloginevent","1234" ) );
>>      });
>>      btn.addToDocument();
>> 
>> });
>> qx.Proto._createLoginWindow = function(localUser, targetUser){
>> 
>>      var chatWin = new qx.ui.window.Window("login Window "+
>> localUser+" to " + targetUser,"icon/16/_message.png");
>>     chatWin.getPane().setPadding(10);
>>     chatWin.setLocation(350, 100);
>>     chatWin.setWidth("auto");
>>     chatWin.setHeight("auto");
>>      chatWin.setShowStatusbar(true);
>>      
>>      qx.ui.core.ClientDocument.getInstance().add(chatWin);
>>      chatWin.open();
>> }
>> 
>> -------------------------------------------------------------------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>> your
>> opinions on IT & business topics through brief surveys -- and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> _______________________________________________
>> qooxdoo-devel mailing list
>> qooxdoo-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> qooxdoo-devel mailing list
> qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
> 

-- 
View this message in context: 
http://www.nabble.com/the-problem-about-create-a-window-through-a-event-notify-tf2337147.html#a6561719
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to