Item does not exist

Ok… this is frustrating. seems since I saved some code using 2018… things are messed up

The compiler (regardless of what version) is now reporting that two methods “do not exist”

  • They clearly do exist. even Autocomplete identifies them.
  • They are both called multiple times… yet it only complains about one call of each of them
  • If I right click on the offending line… it still manages to “Jump to Definition” so clearly SOMETHING knows

I have tried deleting and retyping the lines to no avail…

I also did notice something else. I had a line that originally contains " + S + " and it changed to “+ Str(d) +”

FYI… I ran all this code just last night, and was resuming activity this morning, when all of a sudden …

REALLY STRANGE.
This code was originally written before the COLOR function had named colors attached
So I was using “&C000000” for black instead of “COLOR.BLACK”
I restored a previous version of the code that worked, and did a global replace of “&c000000” with “color.black”
Then the above issue reappeared!

EDIT : FOUND IT… and this needs to be included somehow in the documents I think

Each of the two methods… had an optional parameter… which was a color who defaulted to black

Turns out using COLOR.BLACK in the signature of a method to assign an default optional value is NOT VALID, you must use &C000000

I’m not sure why you’d get an error as they should just evaluate as constants, which you can use to provide default values for parameters.

If you’re able to file a Feedback case for this, it would be helpful as this behavior seems incorrect.

I don’t do feedback for reasons that I have discussed before.

But I restored the parameter to &C000000 and the error went away… put it back in and the error returned… so this should be super simple to replicate.

and is COLOR.BLACK truly a “constant”… since it is a function of a class

I am currently having similar issues with random errors when running a debug. I can clear those errors by Analyzing the project then running it.

Dave, I filed it as feedback://showreport?report_id=54438

Thanks… we should meet for lunch of something… since we seem to be the only two forum members in San Diego