xsharp.eu • Get / End Get doesn't get highlighted
Page 1 of 1

Get / End Get doesn't get highlighted

Posted: Mon Dec 30, 2024 1:29 pm
by Irwin
Hi Chris,

The words "Get" and "Set" are not being highlighted with the new version. eg:

Code: Select all

Get
   return _myProperty
End Get

Set
   _myProperty := value
End Set

Re: Get / End Get doesn't get highlighted

Posted: Mon Dec 30, 2024 10:17 pm
by Chris
Hi Irwin,

Seems to work here. Are those inside a PROPERTY...END PROPERTY statement?

Re: Get / End Get doesn't get highlighted

Posted: Tue Dec 31, 2024 9:02 am
by Irwin
Chris wrote: Mon Dec 30, 2024 10:17 pm Hi Irwin,

Seems to work here. Are those inside a PROPERTY...END PROPERTY statement?
Hi Chris, I've detected my error. I was declaring an "Instance" property but that's not a valid identifier (although the compiler does not complain at all :)). I've solved the issue typing @@ before my identifier.

Code: Select all

   Static Property @@Instance As MyClass
      Get
         If _instance != Null
            Throw InvalidOperationException{"Class not initialized."}
         EndIf
         Return _instance
      End Get
   End Property
thanks!

Re: Get / End Get doesn't get highlighted

Posted: Tue Dec 31, 2024 9:45 am
by Chris
Hi Irwin,

Ah, OK, it's a bug in XIDE then, will make it accept "Instance" as a property name. Normally INSTANCE is a modifier synonym to PROTECT(ED), but it's fine to use it as a property name, too.