Well, this might be the best way, but my special case is programming a
GUI. And a (child) window receives a close event and wants to destroy
itself. The main window (parent) will never notice that (or its lots of
code and not very nice). So that is the case and there is no way
that the parent d
> But is this nice code??? Is there another way to delete yourself???
I think you are overcomplicating things.
Don't think of it as deleting 'itself', since what you seem to need is
deleting a reference to the instance.
In your example the parent is a container and it usually makes more
sense t
well, of course these classes are dummies. in my application they
have of course more functionality they shall only describe the
problem here
one certain event which could appear is, that the child wants to delete
itself by calling self.deleteMe() somewhere in one of the member
functio
[EMAIL PROTECTED] wrote:
> Hello,
>
>
> I got a problem deleting objects, which are placed in a hirarchy
>
> Asume we have the following code:
>
> class parent:
>
> MyChilds = [] # this list is filled with childs
>
> def AddC
Hello,
I got a problem deleting objects, which are placed in a hirarchy
Asume we have the following code:
class parent:
MyChilds = [] # this list is filled with childs
def AddChild(self, child):
# add childs here,