Heyas,
 
I noticed before that if if have a setup where i Pass objects downstream, in that:
 
scottsStruct.tmpListener = new listener();
 
ManagerLevelA.setListener(scottsStruct.tmpListener);
 
- ManagerLevelA will pass that argument onto
    employeeLevelB.setListener(arguments.myPassedInListener);
 
 
Which means that basically employeeLevelB has a direct reference to scottsStruct.tmpListener; so that if i change anything inside this object, it will also reflect through-out. Thats kind of what I needed as this way throughout the life cycle data can be changed around but when it comes to actually doing a commit to saving then it takes a snapshot of all current data and stores it away.
 
Having said that, i noticed that if i were to delete "tmpListener" vis StructDelete  even though outside the objects its no longer a valid variable to use, but within each object it is. I'm not sure what i am trying to achieve in doing this but i just noticed it and wondered how this could affect things in general?
 
I'm unsure on how to navigate around this. I had thought of doing a EventDispatcher type solution but if you then delete the listening object, the eventDispatcher logic will still a direct reference to that object.. its kind of scarey way in the end and in many ways i'm thinking i need to store all objects in one singelton registry of some sort...
 
How have others implemented situations like this where you need two objects dependent on each other for various resons? is it just a matter of keeping an id only of both objects and compare against each other if one comes up false consider it invalid and invoke some kind of invaldiate() method?
 
 
 

Regards,

--------------------------------------------------

Scott Barnes

System Development Engineer

 

Goro Nickel Project
Level 8, 201 Charlotte Street
Brisbane QLD 4000
Email: [EMAIL PROTECTED]

 

Reply via email to