"Property is read-only" error Topic is solved

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
bmcclure
Posts: 31
Joined: 29 May 2018, 22:11
Location: West Virginia, USA
Contact:

"Property is read-only" error

Post by bmcclure » 23 Apr 2021, 18:40

In several of my class definitions, I have instance variables defined which are throwing a "Property is read-only" error.

Example:

Code: Select all

class OpStatusBase {
    started := false
    finished := false
    result := false
    hasResult := false
    hasErrors := false
    
    ...
}
For some reason, this code complains about "hasResult" being a read-only property and I am not sure why. This didn't happen on the previous AHK v2 version I was using (from December I believe), but started happening today when I updated to the version of AHK v2 from 4/10.

Anyone happen to know what may have changed to cause this?
Last edited by bmcclure on 23 Apr 2021, 18:42, edited 1 time in total.

bmcclure
Posts: 31
Joined: 29 May 2018, 22:11
Location: West Virginia, USA
Contact:

Re: "Property is read-only" error  Topic is solved

Post by bmcclure » 23 Apr 2021, 18:42

Nevermind, the issue occurs when the class also has a method of the same name since methods and properties have been merged in more recent AHK versions. All good!

Post Reply

Return to “Ask for Help (v2)”