How to access a containing objects properties from an object inside.

2009-03-05 Thread nuwandame
I have two objects obj1 and obj2. Inside obj1 there is an attribute for success (obj1.success) and for containing other objects (obj1.data) I am using setattr() to add obj2 as an attribute to obj1.data (obj1.data.obj2) this is working fine. My problem is when someone changes a variable in obj2

Re: How to access a containing objects properties from an object inside.

2009-03-05 Thread Aaron Brady
On Mar 5, 8:44 am, nuwandame nuwand...@hotmail.com wrote: I have two objects obj1 and obj2. Inside obj1 there is an attribute for success (obj1.success) and for containing other objects (obj1.data) I am using setattr() to add obj2 as an attribute to obj1.data (obj1.data.obj2) this is working

Re: How to access a containing objects properties from an object inside.

2009-03-05 Thread nuwandame
Aaron Brady wrote: On Mar 5, 8:44 am, nuwandame nuwand...@hotmail.com wrote: I have two objects obj1 and obj2. Inside obj1 there is an attribute for success (obj1.success) and for containing other objects (obj1.data) I am using setattr() to add obj2 as an attribute to obj1.data

Re: How to access a containing objects properties from an object inside.

2009-03-05 Thread Aaron Brady
On Mar 5, 9:51 am, nuwandame nuwand...@hotmail.com wrote: Aaron Brady wrote: On Mar 5, 8:44 am, nuwandame nuwand...@hotmail.com wrote: I have two objects obj1 and obj2. Inside obj1 there is an attribute for success (obj1.success) and for containing other objects (obj1.data) I am using

Re: How to access a containing objects properties from an object inside.

2009-03-05 Thread nuwandame
Aaron Brady wrote: On Mar 5, 9:51 am, nuwandame nuwand...@hotmail.com wrote: Aaron Brady wrote: On Mar 5, 8:44 am, nuwandame nuwand...@hotmail.com wrote: I have two objects obj1 and obj2. Inside obj1 there is an attribute for success (obj1.success) and for containing other objects (obj1.data)