Hi Sebastian,
I have already splited these actions. The example below was only a
demonstration. What i have is a window with a list in it. Before the
windows is opened it's list is filled with data and focused. Therefor
window-class has a routine setList() that becomes an Array with data an
sets the list content. Like this:
//here "this" is my window-class
qx.Proto.setList = function(Arr)
{
this.Liste.removeAll();
for( var i=0; i<Arr.length; i++)
{
...
setList() is called before window.open(). Then in _afterAppear routine
of my window-class i call
this.Liste.focus()
Hope that helps a bit.
alex.d
>
> Maybe it's better to split these actions. Why do you need to wait for
> the appear to fill the list? Maybe you can tell us some more
> background and what the exact result should be.
>
> Cheers,
>
> Sebastian
>
>
>
> Alex D. schrieb:
>> 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