Dears,
It seem odd to say, but I continue to face challenges using the BJS GUI. Looks like until today I didn’t really have to worry about the behavior of checkboxes or sliders.
But right now, I’m creating a more ‘evolved’ Editor and I have some issues (question actually) regarding the ‘onValueChanged’ observables for these controls.
Basically, I believe it is something common, I have two ways of changing the state or value of these controls:
-
setting it through the control itself. User checks the box or user moves the slider and the value is applied.
-
User does not check or move the slider but the value or state is applied through the function (as the initial value).
Now, I’ve been going through the observables for these controls - and - (again, might just be missing something) but, to me, the ‘onValueChanged’ observable kind of doesn’t seem 100% accurate. Currently, I have functions triggered when the user changes this value/state BUT I don’t want these to trigger when the value is set programmaticaly. Of course, as always, there’s a work-around (and may be I don’t even have the right one)… but with all that said, I’m still thinking:
"Wouldn’t it make sense to be able to differentiate when the value or state is set/changed through user interaction and when it isn’t?". May be something like:
- ‘OnValueSetObservable’, when the value is set to initial, programmatically
- ‘OnValueChangedObservable’, when the value is actually set through user interaction
?
I’d appreciate your input and comments (and feel free to LOL me if I obviously missed something )
Meanwhile, have a great day