[v2] possible improvements to rare error msg?

Propose new features and changes
Posts: 4018
Joined: 11 Jan 2017, 17:59

[v2] possible improvements to rare error msg?

07 Aug 2020, 22:25

see https://www.autohotkey.com/boards/viewtopic.php?p=346235#rare_error for a "realworldish" example

Code: Select all

Obj := {}
Obj.DefineProperty('myProp', {
    get: {} ; "function object", lacking .Call()
MsgBox Obj.HasOwnProp('myProp') ; true
MsgBox Obj.myProp ; "... doesnt have a property named 'myProp'"
basically, the problem is if u define a dynamic property, and rig its getter(and/or setter) to invoke an object that doesnt implement a .Call() method(most likely due to script coding errors), the property will get defined(ie, .HasOwnProp() for it returning true), however, when the property is invoked, the error msg will claim the object has no such property.

while this alerts the user that there is an error, the msg is misleading
this was fixed in a120 actually

Return to “Wish List”

Who is online

Users browsing this forum: No registered users and 2 guests