Updating values using RegisterForUpdate()
Hey,
I have to update duration values (represented by a label) of ~10 objects. Each object contains a control (Top level window) and it's data: Code:
object.control = #userData Now the question: There is two ways of achieving it: 1) Registering one updater that iterates through all objects and sets their displayed durations Code:
Addon:RegisterForUpdate("GenericUpdater", 100, OnUpdateHandler) Code:
In short words: Should I register an updater for every object, that only handles itself, or should I register a 'monster updater' for the whole addon that updates every object that is part of the addon by iterating through it using a loop? |
Since the goal appears to be to update them simultaneously any way: I don't know of any benefit to making them all independently do the same thing when you could just have the parent refreshing function handle all of them at once.
|
Yes, Chip helped with this on gitter, yesterday and he told us the same. Using as few updaters as possible is mostly the best solution.
|
All times are GMT -6. The time now is 06:06 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI