Is there a “once” function?
Hi all,
I have an array of objects that should each have a property _serverDir_ set. Setting this property requires a little bit of effort and computation time (checking folders etc).
When I put this logic inside a "Dependent = True" property of my class, this logic is run on *every* object in my array of objects.
Is there a natural location to store the _serverDir_ information so that it only gets run *once* by the first object that requests this property, and each subsequent object re-uses this result?
Thanks,
Sven.Hi all,
I have an array of objects that should each have a property _serverDir_ set. Setting this property requires a little bit of effort and computation time (checking folders etc).
When I put this logic inside a "Dependent = True" property of my class, this logic is run on *every* object in my array of objects.
Is there a natural location to store the _serverDir_ information so that it only gets run *once* by the first object that requests this property, and each subsequent object re-uses this result?
Thanks,
Sven. Hi all,
I have an array of objects that should each have a property _serverDir_ set. Setting this property requires a little bit of effort and computation time (checking folders etc).
When I put this logic inside a "Dependent = True" property of my class, this logic is run on *every* object in my array of objects.
Is there a natural location to store the _serverDir_ information so that it only gets run *once* by the first object that requests this property, and each subsequent object re-uses this result?
Thanks,
Sven. static property, once MATLAB Answers — New Questions