That was a good idea using _beforeAppear or _afterAppear and they almost worked. They did set the item as selected and when I clicked on another item the first one did get un-selected. The problem was then when I did a show on the list a second time (this list is hidden except when needed) the original item got selected again. So I got creative and added a function in the _afterAppear that cleared the _beforeAppear function. It seems to work as I want it to right now.

Thanks for the pointer.

Jim

On 4/6/06, Sebastian Werner <[EMAIL PROTECTED]> wrote:
Hi Jim,

I would suggest to select this initially using a beforeAppear event (of
this file/folder) instead. The problem is that this selection stuff
needs the selection manager of the tree. You must add the child to the
tree first, before you can select it. Alterativly it should also be
possible to remember of this element and select it after all these
for-loops.

Sebastian


Jim Hunter schrieb:
> I have a QxTree that has about 50 QxTreeFile items in 11 QxTreeFolder
> objects. I am initially setting one of the QxTreeFile items to selected
> via setSelected(true). This works and when I display the tree that item
> is showing as selected. The issue is that when I select another item,
> the first one does not un-select. If I click on that item then click on
> another it then un-selects. I tried to set the focus of the selected
> item to true but that did not help. Is there some little thing I can do
> to fix this problem, or is it going to need a code fix?
>
> I was just now running the code listed below and noticed an exception
> does come up yet the item still gets selected. Here is the exception:
>
> 001531:Failed to execute "_modifySelected()":Modification of property
> "selected" failed with exception('_fastUpdate' is null or not an object)
>
> Thanks,
> Jim
>
> here is a quick demo to show you what I am talking about:
>
>
>     window.application.main = function()
>     {
>       var T = new QxTree("Main");
>       for (var x=0; x<5;x++)
>       {
>         var F = new QxTreeFolder("Folder " + x);
>         for (var y=0; y<6; y++)
>         {
>           var I = new QxTreeFile("File " + x + y);
>           if ((x == 2) && (y == 3))
>             I.setSelected(true);
>           F.add(I);
>         }
>         T.add(F);
>       }
>       this.add(T);
>     }



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to