This is exactly it.Craig wrote:Heh none taken, but the function to check if a property was empty was requested by several non programmers who were having errors occur during macrosn3phrit wrote:ok, I didnt noticed resetProperty() function, but still think that for many GM especially not programmers this will be issue. I hear a java programmer from you, not a macro designer no offense.
The problem stemmed from the fact that an "empty" Property makes string comparisons and manipulations and whatever go totally pear shaped, because it doesn't have any kind of string in it. A Null/empty value is basically a sort of number (close enough in this context) and computers get very very huffy if you try to ask them if the string "Weapon1Name=" is in a particular number. And then your macro errors out with another cryptic error message...
The difference between a Null property and a property with an empty string stored in it is a bit hidden from users (and even if we showed it, folks who don't have programming training would think we were crazy, basically), so a function had to be added to help the macro coders detect it and catch the problem. The difference is significant, however - a null property can use the default value in the right circumstances, whereas a property that's been "overwritten" with an empty string will NOT use the default value.
Changing the way isPropertyEmpty works is going to mess up all those people that needed it in the first place.
However, clearly documenting it, and perhaps adding a isPropertyValueEmpty() that behaves as expected might be a good plan