Replies: 4 comments 13 replies
-
The premise is that this extension is the first program I have completed, so it is littered with unreasonable solutions (This is why v2.0.0 is being rewritten). Answer from here. I agree with removing However, they may use as a workaround to support previous versions. PS. I should mention that I never use Specifically, the usage is like The If you plan to use this syntax in AutoHotkey in the future, this idea is forfeited. |
Beta Was this translation helpful? Give feedback.
-
I found that after some refactoring (AutoHotkey/AutoHotkey@89994ea), supporting the previous behaviour of However, it breaks the |
Beta Was this translation helpful? Give feedback.
-
I am working on a small patch to support v2.0.14 first, as I want to take the time to do a major update. One problem I am currently having is that I cannot get each field of an object or instance such as Elements of Arrays and Maps can be retrieved without any problems. What query should I pass to property_get to get the fields |
Beta Was this translation helpful? Give feedback.
-
A bug in the page handling in v2.0.14 causes it to not return properties. Property enumeration behaviour is changed in v2.1-alpha.10, but it does not require any changes in the extension, as far as my testing could reveal. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Does the extension have any features or behaviour dependent on the existence of the
.<base>
pseudo-property?(This debugger-only property retrieves an object's base, but unlike
.base
, any child properties are evaluated in the context of the original object, not the base. Sox.<base>.<base>.y
functions likesuper.y
within the class ofx
.)The reason I ask is that I am considering removing it to reduce code size, after making it mostly redundant.
A problem with v2.1-alpha.9 and earlier is that some objects have useful properties that are implemented as getters, and inspecting these properties requires expanding
<base>
, sometimes multiple times. This problem is compounded by typed properties, which are always defined in a prototype and therefore never own properties of the instance/struct.I've been working on solving this by implementing an enumerator which returns inherited properties alongside own properties, and then utilizing that in the debugger engine. For example,
Map('a', 'Alpha', 'b', 'Binary')
gives this (with vscode-autohotkey-debug and my current AutoHotkey build):In order for
x.<base>
(where not followed by.something
) to have its previous behaviour, a mechanism must exist to overridethis
, otherwise dynamic properties are omitted because they cannot be evaluated. It would be similar to something likeMap().base.Count
, which invokes the getter for Count but passes it the Prototype and not the map. In most cases any properties returned under.<base>
will be redundant; it would be useful only for overridden/shaddowed properties.As of yet I have not removed the code for evaluating
x.<base>
orx.<base>.y
, but I think the former isn't working well because the mechanism described above doesn't exist. So I was leaning toward removing it entirely, but it looks like this extension might depend on it for some things.<base>
sub-property was returned.base
with<base>
under certain conditions. When is this needed? I couldn't think of any instance where it would actually be correct. For instance, withm := Map()
, the script cannot dom.base.Count
; the correct result is to throw, so the debugger showing 0 is misleading. (Side note: It also mangles parts of the property name that contain "base", like "abased".)<base>
, which should just have no effect if that property wasn't returned.<base>
to retrieve the class name of each prototype for youris
operator. The same could be done withbase
, but that would fail if the script overrides it. It's probably a good enough reason to at least supportx.<base>.y
(which still works in my current build).Have I missed anything that might depend on either of the following?
x.<base>
returning properties with getters.x.<base>.y
evaluating getters withx
as this.Beta Was this translation helpful? Give feedback.
All reactions