enums are based on Integers - not Int32
so your code was literally written to ONLY work for 32 bit apps because you cast to int32 instead of integer
…[/quote]
I use Int32(…) because the documentation says do that. The new documentation change to Integer(…), So I think is a bug, compile in 32-bit and not in 64-bit by a recommendation of xojo.
Thats why the docs were updated
Your code is wrong
A cast is literally “take this thing and all its bits and treat it as if its the type we’re casting to”
But you have a 64 bit integer you’re saying you want to treat as a int32
That doesn’t work
The type you’re casting TO has to be the same number of bits
And in your code it isn’t
The right update to make things work in 32 or 64 bit is what I posted