Search code examples
actionscript-3apache-flexcopytransient

How to Force ObjectUtil.copy() to copy Transient attribute


I'd like to force the method ObjectUtil.copy() to copy the transient attribute...

Do you have a solution to do that?Or do you know another method to copy my Object?

Thank you very much,

Bat


Solution

  • I solve that with the getter function, I put a condition in ma getter function to know if I'm in a context in wich one I want to copy the transient variable or no

    public function get myVar():Object {
    if (WantCopyTransient)
      return _myVar;
    else
      return null;
    }
    

    Thanks for your answers