I want to detect (among others) when a user changes of the properties of a page (Scene) and update my
HtmlDialog if it is visible.
The problem is that I can’t really find an Observer that can be used.
@DanRathbun has already summarized the good part of my situation very well here, so I won’t repeat it:
As a matter of fact, changes to the above mentioned properties are not currently detectable through the Ruby API.
I have some ideas for workarounds, but none of them seems an ideal:
Open HtmlDialog as a modal dialog.
So the user has no chance to change…problem solved …Easy
Of course, this would all lose the purpose of my dialog to interact or see the information as long as the user is using other tools or operation. So, I do not really like it.
I will instruct the user (RTFM :-)) to update the data (press a button) if they feel that the changes made may affect the data in the dialog.
This is not elegant at all.
After I open the HtmlDialog, I start a timer (1-5 sec) that periodically collects and sends the changes to the dialog. Then, when the dialog closes, of course I also stop the timer and sending data’s.
I don’t know how stressful is this for Ruby engine, but sure the dialog will flicker less or more… periodically. (And can be conflicting with the operation what the user is doing inside the HtmlDialog exactly the same time when the updated data arriving …)
The point is, that I can not be perfectly define what the “accordingly” can be in details…
So, what other ideas or comments are there?
Please share your thoughts!