Hi Ralf,

your problem can be solved if you first deselect the item you want to remove. 

To explain the current behaviour:
If you select an item after you removed the currently selected one, qooxdoo 
adds two jobs to the state queue:
        * remove the state "selected" from the current selected item
        * add the state "selected" to the newly selected item

The problem is now that the item whose state "selected" should be removed not 
exists anymore. That's the point when the error-message pops up. So simply 
deselect the item before you remove it. That should do the job.

cheers,
  Alex

On Wednesday 28 March 2007 Ralf Sternberg wrote:
> Hi,
>
> I get a JavaScript error after removing a currently selected TreeFolder
> item from a Tree (using the qx.ui.treefullcontrol classes). After the
> selected item has been removed, there is no item selected anymore. The
> error occurs when another item is selected thereafter:
>
>    qx.manager.selection.TreeFullControlSelectionManager[231]: Setting
>    property "leadItem" to "[object org.eclipse.rap.rwt.widgets.TreeItem]"
>    failed with exception: TypeError - this._states has no properties
>
> This happens when the item is simply disposed of. I am not sure about
> the proper way of removing a child item  from a Tree. I also tried this:
>
>    var parent = item.getParentFolder();
>    var index = parent.indexOf( item );
>    parent.removeAt( index );
>
> but the index is always -1.
>
> However, even with removeAt( 0 ), an error occurs when the first item is
> currently selected and another item is selected afterwards:
>
>    qx.ui.treefullcontrol.TreeFolder: Setting property "selected" to
>    "false" failed with exception: TypeError - this._states has no
>    properties
>
> Is there a way to remove a selected item properly?
>
> Thanks,
>    Ralf
>
>
> -------------------------------------------------------------------------
> 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


-- 
Alexander Back
Core Development::Webtechnologies
[EMAIL PROTECTED]
fon +49 721 91374 8047
http://www.1und1.de

1&1 Internet AG
Brauerstraße 48
76135 Karlsruhe

Amtsgericht Montabaur HRB 6484

Vorstand: Henning Ahlert, Hans-Henning Doerr, Ralph Dommermuth, Matthias 
Ehrlich, Andreas Gauger, Matthias Greve, Robert Hoffmann, Achim Weiss
Aufsichtsratsvorsitzender: Michael Scheeren

-------------------------------------------------------------------------
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