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

createObj fires token:change?

1456164661
Lucian
Pro
API Scripter
Hi, I was under the impression that things done by the API shouldn't fire change events. I've just spent a while debugging a weird issue in one of my scripts, and I finally realised that a call to createObj was resulting in a (apparently synchronous) firing of a "token:change" event. Is this intended behaviour or is it a bug? I've never noticed this behaviour before, so I wonder if there's some sort of regression? Lucian
1456165172
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
I think it's always done it. I have done thing like this... if ( 'add' === obj.get('controlledby') ) { obj.set('controlledby', ''); return; } ...to get around it. Better ways to deal with it I am sure.