For the Set Piece Property Trait, Increment Does Not Seem to Work With Numeric Properties in Curley Braces


The Increment numeric value feature for the Set Piece Property seemed to think a numeric Dynamic Property of the piece doing the setting was non-numeric when in curly braces, but when the same property was in dollar signs “$…$” things seemed to work fine.

This form did not work:

The increment expression was:
Where “Amount” is the name of a numeric Dynamic Property in the same prototype trait list as the Set Piece Property trait.
I got an error message about trying to increment by a non-numeric value.

However, this form seemed to work fine:

The working increment expression was:

A variant that I tried for the increment expression that did not raise an error message, but did not perform the increment either was:

Amount and $Amount$ are handled differently in the Set Piece Property trait, in the same way they are handled differently in Global Key Command Property traits.

From the the Set Piece Property reference manual page:

Note that the properties named in this expression are evaluated against the properties of the target pieces, NOT the properties of the piece issuing the Set Piece Property
If you want to use a property in this piece in an expression here, then use $property$. All $…​$ property references will be evaluated against this piece before the final expression is evaluated using properties from the target piece. E.g., Incrementing a property using the expression {$p1$ + p2} will add the value of the p1 property from this piece, plus the value of the p2 property from the target piece.

1 Like