You can simple do a mnBtn.setParent(null) for each menu button.
Or a mnBtn.getParent().remove(mnBtn);
Sebastian
Patrick W. Fraley schrieb:
Hi,
well seems like I found the solution. there is a removeAll (it helps to
read thru the entire page ;) ). Which will remove all children from
that menu :)
So now I can dynically add entries to menu's. Now I would still like to
know how the remove method works. What if I call it with the
forEachChild method I get an object but it seems to just be a number?
Maybe someone can let me know how this works :)
Thanks
Patrick
Patrick W. Fraley schrieb:
Hi all,
I have a toolbar, which contains two menus ( m1 and m2 ). Now the
contents of m2 are depentend on the selection in m1 and get loaded
from the server after an item in m1 has been selected. Now when I
change something in m1 I have and event that fires. This event calls
a function which is suppose to modify the menu m2.
Now on first call the menu is empty. But in my function I have a
check if m2 has children and it turns up true, even though I have not
added any children. Now I can add new children and they do show up.
The problem I am having is removing those children later again. So on
second call m2 does have children, which I need to get rid of, or even
better dump the entire menu and add a new one to the menu button of m2.
Now how do I do this. There is a function remove as well as a dispose
function, but I can not seem to make either one of them work.
Sorry if this is a stupid question ( or any other one I have posted so
far ;). I am a web developer trying to grog qooxdoo. I have no
experience with Eventmodels, and Application Interfaces and my
JavaScript experience is mostly from generating hovers and a few other
things which do not even come close to what I have to do with qooxdoo ;)
So please be patient :)
Patrick
-------------------------------------------------------
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