I think the silent option is not working in dev. I noticed it starting maybe last week when Riley fixed the "cannot delete old ID repeating row" bug. Here is my code (I also noticed it in other places, but this is the simplest): <span><label >Recalculate hit points and set hit points to max</label>
<input type="checkbox" name="attr_HP_reset" value="1" /></span>
on("change:HP_reset",
TAS.callback(function eventResetHP(eventInfo) {
getAttrs(["HP_reset"],function(v){
TAS.debug("caught " + eventInfo.sourceAttribute + " event: " + eventInfo.sourceType + ", val is:"+ v["HP_reset"] );
if (eventInfo.sourceType === "player" ) {
PFSheet.updateMaxHP(true);
PFSheet.updateTempMaxHP(true);
setAttrs({"HP_reset":"0"},{silent:true});
}
});
})
);
and here is the console output. As you can see the change:HP_reset is called a second time. The second time it has the new value of 0 that I just set. note even the "caught hp event: sheetworker" below, is an update the "HP" attribute, which also was done with {silent:true} yet it is still firing events on our sheet. Really updating character sheet values
app.js?1460651081:37 Setting up repeating sections took until 17ms
app.js?1460651081:37 Finding list of dirty attributes took until 17ms
sheetsandboxworker.js?20150218:56 Triggering for change:hp_reset
VM41:178 TAS: Entering: eventResetHP
VM41:178 TAS: Exiting: eventResetHP
sheetsandboxworker.js?20150218:56 Triggering for change:hp_reset_max
app.js?1460651081:37 Querytest took until 20ms
app.js?1460651081:37 Set values took until 29ms
app.js?1460651081:37 Took 74ms
VM41:178 DEBUG: caught hp_reset event: player, val is:1
app.js?1460651081:37 Really updating character sheet values
app.js?1460651081:37 Setting up repeating sections took until 18ms
app.js?1460651081:37 Finding list of dirty attributes took until 18ms
sheetsandboxworker.js?20150218:56 Triggering for change:hp_reset
VM41:178 TAS: Entering: eventResetHP
VM41:178 TAS: Exiting: eventResetHP
sheetsandboxworker.js?20150218:56 Triggering for change:hp_reset_max
sheetsandboxworker.js?20150218:56 Triggering for change:hp
VM41:178 TAS: Entering: eventUpdateHP
VM41:178 DEBUG: caught hp event: sheetworker
VM41:178 TAS: Exiting: eventUpdateHP
sheetsandboxworker.js?20150218:56 Triggering for change:hp_max
app.js?1460651081:37 Querytest took until 20ms
app.js?1460651081:37 Set values took until 30ms
app.js?1460651081:37 Took 73ms
VM41:178 DEBUG: caught hp_reset event: sheetworker, val is:0
app.js?1460651081:37 Really updating character sheet values
app.js?1460651081:37 Setting up repeating sections took until 16ms
app.js?1460651081:37 Finding list of dirty attributes took until 16ms
app.js?1460651081:37 Querytest took until 19ms
app.js?1460651081:37 Set values took until 31ms
app.js?1460651081:37 Took 92ms