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.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Software Development Tools 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!