When scripting ClassModule Basic modules, one cannot use 'Me.' prefix in order to refer to ClassModule object current instance.
Steps to Reproduce:
A 'Me' keyword macro example is available in the attached file.
'Me' is not supported as a keyword in Basic ClassModules.
A background implicit assignment of 'Me' object instance variable should occur when instantiating 'New' objects with Basic.
User Profile Reset: No
This should be supported when using 'Option Compatible' or 'Option VBASupport 1' Basic compiler options.
VBA 'Me' keyword:
Note: It is possible to circumvent 'Me' lack of support, but this requires to hack around LibreOffice Basic. See the attached file for an example of such hack.
Created attachment 178301 [details]
'Me' Basic keyword example of use
Since this is a feature of class modules, the keyword "Me" should also be implemented with Option Compatible / VBASupport 1.
I am setting this to NEW.
Just noting that there is a "Me" in basic/source/runtime/stdobj.cxx. It must not do what OP wants, since it has been there ~forever.
(In reply to Justin L from comment #3)
> Just noting that there is a "Me" in basic/source/runtime/stdobj.cxx. It must
> not do what OP wants, since it has been there ~forever.
Indeed it exists in the code:
But for some reason, using Me in a class module results in the error "BASIC runtime error. Variable not defined."