TheSaint99
Technical User
Hi,
I have a collection of items that can be selected through a listbox. I store the selection in a variable by using the bitwise operator.
for example I have 4 items:
one
two
three
four
If I select nothing, my variable is 0. If I select one, my variable is 1(2^0). If i only select three, my variable is 4(2^2) and when i select one and three the variable would be 5 (2^0+2^2).
This way of storing the selection is working perfectly until I have more than 31 items in the collection, because then the operator has problems with the 32-bit limit in javascript. Is there a way to work around this problem with the limit? Does anyone has suggestions?
Thnx
TheSaint99
I have a collection of items that can be selected through a listbox. I store the selection in a variable by using the bitwise operator.
for example I have 4 items:
one
two
three
four
If I select nothing, my variable is 0. If I select one, my variable is 1(2^0). If i only select three, my variable is 4(2^2) and when i select one and three the variable would be 5 (2^0+2^2).
This way of storing the selection is working perfectly until I have more than 31 items in the collection, because then the operator has problems with the 32-bit limit in javascript. Is there a way to work around this problem with the limit? Does anyone has suggestions?
Thnx
TheSaint99