Open Kein opened 5 months ago
Hidden means that its variable will not be seen in the set of variables shown in pattern data window not that the value will be ignored if accessed. Why is it not printing for the two rats?
There is no way for me to access this value from the constructed pattern table (because it is set to hidden), so why would it display it in the value overview? It makes no logical sense. I specifically want it to be hidden so I set it to hidden.
Again, that's not what hidden does. The attribute [[hidden]] doesn't erase the variable and its value can be displayed, but the member variable will not be listed in the contents of the pattern that contains it.
Perhaps you should use the padding data type which will be non-existent as a variable.From online docs:
Padding
It’s also possible to insert padding in between fields using the padding syntax.
bitfield Flags { a : 1; b : 2; padding : 4; c : 1; };
This inserts a 4 bit padding between field b and c.
If this was a struct you could also leave the field anonymous, but i don't think bit-fields can have anonymous members.
I dont want to use padding, it is ImHex specific.
If [[hidden]]
does not do what it is logically and empirically supposed to do (or what its alternative does in 010 Editor) then it needs to be/should be/could be updated to be wider or have a modifier that can do full hide.
To me, this looks like you are really looking for padding: https://docs.werwolv.net/pattern-language/core-language/data-types#padding.
Also, to clarify, it looks like the [[hidden]]
attribute doesn't correctly hide the bitfield values, not struct members.
the attribute works. what doesn't work is the summary value of the bitfield.
Operating System
Windows
What's the issue you encountered?
[[hidden]]
values being shown in value summary for structHow can the issue be reproduced?
ImHex Version
1.33.0
ImHex Build Type
Installation type
manual
Additional context?
The hidden pad value is being displayed, essentially ignoring
[[hidden]]
: