I'm not sure why, but the first function has the nasty side effect of leaving the widget one is trying to remove in memory, however this one should be much cleaner :D
def remove_child(child, parent=None): """Because there is no Container.remove_child(foo) method!""" if not parent: parent = soya.root_widget if parent.children.count(child): child = parent.children.pop(parent.children.index(child)) child._container_flags = None child.parent = None del child On 7/3/07, Lunpa, The <[EMAIL PROTECTED]> wrote: > Yeah, I see that now. Actually, I've since removed the statement all > together, because its not used. > > On 7/3/07, marmoute <[EMAIL PROTECTED]> wrote: > > > > On 3 juil. 07, at 12:02, Lunpa, The wrote: > > > > > Yeah, the try/except was going to do something if "root" didn't have > > > any children, but I'm using it differently now, so its not needed at > > > all. > > > > You should except the proper exception then and not every. > > > > -- > > marmoute > > > > > > > > > > _______________________________________________ > > Soya-user mailing list > > Soya-user@gna.org > > https://mail.gna.org/listinfo/soya-user > > > > > -- > This email message is public domain. Have a nice day! ^_^ > -- This email message is public domain. Have a nice day! ^_^ _______________________________________________ Soya-user mailing list Soya-user@gna.org https://mail.gna.org/listinfo/soya-user