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 .
×
Create a free account

[Sheet Worker] Delete Repating Item and Change Events

1460908271

Edited 1460910091
This is a new thread. The other in the Pro Forum is specific about the intended behaviour. This thread is about how other sheet authors have worked around this stupid problem. It would be kind if neither of the two threads would be closed right away. If you set an attribute of a repeating item during a change:  event this can recreate the item and destory the validity of rows as the delete action might have deleted many or all fields of the row but the Sheet Worker will set fields again and therefore recreate them. Please don't discuss the design decision that remove:  triggers change:  as well, as I have created a thread about that already. The question is: How do you deal with this problem? Are there any known workarounds? The eventInfo object does not contain any information useful for this problem, as it just holds if it is a sheet worker or a player event and which field triggered the event, both which happen during change: as well as remove:  . Do you ever use setAttr for a repeating Item row in a change:  listener?
I haven't been able to delve into sheet workers much, yet, so I'm not sure about the scope that's allowed, but perhaps you could set a global boolean during remove:  and check it during change: , changing it back if necessary.