Is it possible to create a data structure that is IDENTICAL to the “PAIR” structure
but instead of being LEFT:RIGHT it is ROW:COLUMN
I have an app that uses PAIR for dictionary keys, but it is getting confusing to keep LEFT is ROW and RIGHT is Column
especially with LEFT is a common attribute for controls, etc… makes it confusing to keep the LEFTS easy to discern when reading the code etc.
Note : I need it to work the same as PAIR, otherwise I have to change hundreds of lines of code
if at all possible…
I have methods that accept pair as a parameter, and some that return pairs
would be optimal if I can replace “AS PAIR” with “AS customPAIR”
and then just change the .LEFT and .RIGHT
I am trying to create this overload… and XOJO IDE keeps crashing when attempting to define it
SUB KeyRow(byref key as pair, assigns new_value as variant)
key=new_value:key.right
END SUB
FUNCTION KeyRow(key as pair) as variant
return key.left
END SUB
It allows me to create the first, but as soon as I attempt to create the 2nd, the IDE crashes, over and over again
NOTE : ONLY CRASHES IN XOJO 2015r1! works as it should in 2014r3.2
not here
I’ve created this now 3 different ways in 2015r1
add 2 new methods
a) copied the declaration from your post for the SUB
b) add new method to a class
c) pasted
d) copied the declaration from your post for the FUNCTION
e) add new method to a class
f) pasted
variation on this where I copied pasted & added the code as well
seems like if Norm can reproduce the issue and opens the ticket himself, it gets fixed immediately… I need to get Norm to reproduce my errors in the future…
I ran into this one while doing some other work & realized it was Dave’s issue
It is kind of tough to figure the steps to reproduce it and the fix was pretty quick
But yes , when I run into it it usually gets fixed ASAP if I can reproduce it right away
That’s not always the case