Re: How to delete yourself????

2005-10-17 Thread christian . siegl
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

Re: How to delete yourself????

2005-10-14 Thread Istvan Albert
> 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

Re: How to delete yourself????

2005-10-14 Thread christian . siegl
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

Re: How to delete yourself????

2005-10-14 Thread Kay Schluehr
[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

How to delete yourself????

2005-10-14 Thread christian . siegl
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,