obj.%prop% dynamic access no longer works?

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
User avatar
TheArkive
Posts: 1027
Joined: 05 Aug 2016, 08:06
Location: The Construct
Contact:

obj.%prop% dynamic access no longer works?

19 Apr 2021, 06:31

Code: Select all

prop := "myProp"
msgbox test.%prop% ; <-- error  Invalid syntax

class test {
    static myProp := "my value"
}
Is this meant to still function? If not is there a way to dynamically access properties still? or no? (other than iterating through with __enum()? )

EDIT: I double checked, proper EXE versions and such. a131 allows this, a132 does not.
OpalMonkey
Posts: 18
Joined: 23 Jan 2014, 03:02

Re: obj.%prop% dynamic access no longer works?

19 Apr 2021, 09:59

Exactly what I came here to ask. I've been over the a132 changes several times and don't see anything that alludes to this. Though admittedly, I don't fully understand some of the changes.
User avatar
TheArkive
Posts: 1027
Joined: 05 Aug 2016, 08:06
Location: The Construct
Contact:

Re: obj.%prop% dynamic access no longer works?

19 Apr 2021, 10:22

Code: Select all

Fixes

Fixed %ref% to throw if the VarRef is unset.

I think it might be in the fixes... a residual effect of throwing an error for %ref% when the VarRef is unset.

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: Bassman002, Panaku, RussF, wpulford and 35 guests