Re: Multiple instances and wrong parental links

2011-01-03 Thread DevPlayer
Mere are my ramblings of a novice (bad) Hobbyst programmer. You mentioned that your having a hard time coming up with a solution to your complex problem. Complex means you are doing lots of different things to different things all over the place where timing is an issue. First it seems you are t

Re: Multiple instances and wrong parental links

2011-01-02 Thread Josh English
Steven, This was simplified. The complete story is, well, tedious: I have created a set of XML Validation and Normalization classes. With them I can define my data structures and make sure my data is good. These complications have come in wanting to take this tool and create a GUI (in wxPytho

Re: Multiple instances and wrong parental links

2011-01-02 Thread Josh English
Chas, Thanks. The "self" in the setattr statement works sometimes, but what I'm adding most of the time is a property, and if I don't use the class when setting a property, nothing works. The property is returned instead of the value of the function the property returns. (yeah, it's complicated

Re: Multiple instances and wrong parental links

2011-01-01 Thread Steven D'Aprano
On Sat, 01 Jan 2011 17:59:33 -0800, Josh English wrote: > I have hit yet another wall. I am dynamically creating a class and then > creating instances of that class. The class relies on a second class to > store a list of objects. (This is simplified from the the original by a > factor of about 20

Re: Multiple instances and wrong parental links

2011-01-01 Thread John Nagle
On 1/1/2011 9:57 PM, ChasBrown wrote: setattr(Wrap, 'stuff', ElementList(self, 'test')) Right. As the previous poster wrote, that line is the basic problem. It's not entirely clear what you're trying to do, but it seems to be overly complex. You could have Wrap inherit from ElementList, if y

Re: Multiple instances and wrong parental links

2011-01-01 Thread ChasBrown
On Jan 1, 5:59 pm, Josh English wrote: > I have hit yet another wall. I am dynamically creating a class and then > creating instances of that class. The class relies on a second class to store > a list of objects. (This is simplified from the the original by a factor of > about 20. The real pro

Multiple instances and wrong parental links

2011-01-01 Thread Josh English
I have hit yet another wall. I am dynamically creating a class and then creating instances of that class. The class relies on a second class to store a list of objects. (This is simplified from the the original by a factor of about 20. The real program is trying to create a Python object around