That's where/when Value2ConstantDebug comes in handy. It takes a value (f.i. of an event) and converts it back to the according constant-name.
Furthermore Value2ConstantDebug adds a smart feature as suppression of redundant values.
How to use it? Well, it's just like an enhanced Debug statement. Take a look at this example:
Code: Select all
v2cd_Debug(EventType(), "#pb_eventtype_,#pb_anti", #True, #True)
Code: Select all
v2cd_Debug(value.i, constantNameFilter.s = "", suppressRedundancies.b = #True, printIfNotFound.b = #True)
Furthermore any redundancies would be suppressed, though counted and printed as one message when the value changes.
If no fitting constant-definition is found the value still gets printed in its original form.
Why the argument "constantNameFilter"?
Well, there are some specific values that are shared through lots of constants (names). So which would be the fitting one? The easy answer is "only YOU can", and therefore you're helping yourself by filtering out the right ones by defining the contant-name beginnings you'd like to get.
An empty "constantNameFilter" brings up only the original values, though the redundancy suppression feature still can be used.
Setting "constantNameFilter" to "#" will bring you *all* known constant-names for the according value - these might be many.
However, I was once fed up with dealing with event-issues and so I coded this tiny tool. I hope that it will also be useful to you guys.
Download
EDIT: This should work on Linux and Mac OS, too - but I didn't test it on the latter, yet.
Cheers,
Didelphodon.