Sorry, I meant window.setTimeout(function() { liste.focus() }, 1);

dperez wrote:
> 
> Sorry, I meant window.setTimer(function() { liste.focus() }, 1);
> 
> 
> alex.d wrote:
>> 
>> Hi dperez,
>> window has no such method "setInterval", but if i do understand it - 
>> your idea was to set a timer that focuses the list every millisecond?
>> smth. like this:
>> ================================
>>     timer = new qx.client.Timer(1);
>>     timer.addEventListener(qx.constant.Event.INTERVAL, function(){
>>        liste.focus();
>>     }, this);
>> ================================
>> ? It works, but also the first time window is opened!
>> ...---...---...---...---...---...---...
>> Anyway - thx for the help..
>> alex.d
>>> This trick can work:
>>>
>>> Instead of
>>>
>>> liste.focus();
>>>
>>> employ this:
>>>
>>>   window.setInterval(1, function() {
>>>      liste.focus();
>>>   });
>>>
>>>
>>> alex.d wrote:
>>>   
>>>> Hello,
>>>> i have a strange behavior of focus() function and i can't explain it.
>>>> The situation is following: i have a window:
>>>> ================================
>>>>     var win1 = new qx.ui.window.Window;
>>>>     win1.setSpace(10, 600, 10, 400);
>>>> ================================
>>>> that has a list with few items. ListItems are added to the list on
>>>> window-appear:
>>>> ================================
>>>>     liste = new qx.ui.form.List;
>>>>     liste.set({ width:"100%", height:"100%" });
>>>>     win1.addEventListener("appear", function(e){
>>>>         liste.removeAll();
>>>>         item1 = new qx.ui.form.ListItem("item1");
>>>>         item2 = new qx.ui.form.ListItem("item2");
>>>>         liste.add(item1, item2);
>>>>         liste.focus();
>>>>     });
>>>> ================================
>>>> The crux is that liste.focus() works only the first time the window is
>>>> opened. I found out that liste.removeAll() is the problem - without, it
>>>> works perfectly! I tried to debug the focus routine but i can't detect
>>>> any problems.
>>>> Will be grateful  for any hints.
>>>>
>>>> Best Regards,
>>>> alex.d
>>>>
>>>>
>>>>
>>>> -------------------------------------------------------------------------
>>>> Using Tomcat but need to do more? Need to support web services,
>>>> security?
>>>> Get stuff done quickly with pre-integrated technology to make your job
>>>> easier
>>>> Download IBM WebSphere Application Server v.1.0.1 based on Apache
>>>> Geronimo
>>>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>>>> _______________________________________________
>>>> qooxdoo-devel mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>>>
>>>>
>>>>     
>>>
>>>   
>> 
>> -------------------------------------------------------------------------
>> Using Tomcat but need to do more? Need to support web services, security?
>> Get stuff done quickly with pre-integrated technology to make your job
>> easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache
>> Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/focus%28%29-strange-behavior-tf2227810.html#a6185986
Sent from the qooxdoo-devel forum at Nabble.com.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to