Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×

On change handler interaction with _max

I've got a question: is it normal for an on change handler for an xxx_max variable to fire if xxx is changed? After trying to debug a really weird behavior in a custom sheet I was working on, I set up a pair of variables, attr_fizzbin and attr_fizzbin_max, both uninitialized, and created separate on change handlers for the two. and when I make a change to fizzbin, both handlers fire: And as you can see from the event, there was no value change on fizzbin_max to trigger it. So, is it normal for the current value change to trigger the max value handler like that, or should I report it as a bug?
1796000603
vÍnce
Pro
Sheet Author
I believe that has always been the behavior. there's a note: on the wiki that mentions it. <a href="https://wiki.roll20.net/Sheet_Worker_Scripts?__cf_chl_tk=mqT8q7Srwq8ZP4Bc5qzPtndPTHIWlhrN5592YBdFCh8-1796000312-1.0.1.1-h3ll32ilOHNYvyfrarubsn.sqdVQVWlTtKWH_Toh7Xw#change:.3Cattribute_name.3E" rel="nofollow">https://wiki.roll20.net/Sheet_Worker_Scripts?__cf_chl_tk=mqT8q7Srwq8ZP4Bc5qzPtndPTHIWlhrN5592YBdFCh8-1796000312-1.0.1.1-h3ll32ilOHNYvyfrarubsn.sqdVQVWlTtKWH_Toh7Xw#change:.3Cattribute_name.3E</a> If you need to distinguish xxx from xxx_max, you would probably need to filter the change event to determine which attribute actually changed and then proceed accordingly.
Well, duh. How did I miss that.&nbsp; Thanks Vince, much appreciated. Now to go redesign a bunch of stuff...