2 are like this
Type RowCol (Row As Int, Col As Int)
in one of them it is as follows
B4X:
'Cells row,col and key data
Type RowCol ( Row As Int,Col As Int,Key As Int)
the program compiles in all versions before 2.00 but in 2 I get the error
B4X:
Compiling code. Error
Error parsing program.
Error description: An item with the same key has already been added.
Occurred on line: 42
Type RowCol (Row As Int, Col As Int)
I tried to comment 2 of them out but then the compiler does not recognise the type
I just did a small test, the type declaration is available to all modules if you declare it in Globals or Process_Globals, you are getting the error because you have changed the signature and added a third parameter.
I seem to remember reading about this somewhere in the recent documentation, but can't find it now.
yes i changed the names of all 3 declarations and the program compiled. I guess the dim in one module must "run through" all modules now. Have to remember that for future programs
It's not the dim that is carried over, that will be governed by the normal rules. i.e. in Process_Globals it will be accessible everywhere but cannot involve a type that has Activity objects. In Globals it will be available only in that module.
It is the Type declaration itself that is available everywhere regardless of which globals it is entered in.
That seems reasonable, or at least make sure you only declare the type once. Whether it's in a separate module or an activity/code module/class that it's most relevant to.
Now of course what I didn't try was to make a type private. That's one for tomorrow I think.
Sent from my HTC Sensation XE with Beats Audio Z715e using Tapatalk 2
I had a similar problem last night, but it was because of a duplicated code module, that I didn't use. The previous version, 1.8 compiled the code fine, but 2.0 is a little tighter on the checking. I would check that you haven't got a code module of a different name which declares the variables all over again..