I have 3 constructor methodes (overloaded) and get an error message
“there is more than 1 item with this name and it is not clear to which this refers”.
- constructor (string)
- constructor (string, string)
- constructor (string, integer)
any idea why ?
I have 3 constructor methodes (overloaded) and get an error message
“there is more than 1 item with this name and it is not clear to which this refers”.
any idea why ?
Possibilities:
constructor (string, string): the second parameter is defined as optional
you are using a Variant or Auto variable as second argument
no, it is defined as I mentioned above, for me it should work
I have to say, initialy I had only 2 constructors
that was working,
only by adding a 3rd constructor as (string, string) the compiler complains about the constructor (string, integer) which is strange to me.
I have to agree, my first guess is that one of the values being passed in is a variant.
Found it,
I passed (string, string) to constructor (string, integer) which is working, which should not have worked, I thought.
But a closer look was telling me, that I used a method to get the integer argument and that method has 2 constructors, one for returning an integer and the other one for returning a string.
it worked in both cases before I added the new constructor (string,string) and now the compiler got confused, I can see that now.
I use now (string, Val(string)) which works fine
thank’s for your hint guys