Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v2] Missing __New(…) meta functions #586

Open
Bunker-D opened this issue Dec 29, 2024 · 2 comments
Open

[v2] Missing __New(…) meta functions #586

Bunker-D opened this issue Dec 29, 2024 · 2 comments
Assignees
Labels
AHK v2 exclusive to AHK v2

Comments

@Bunker-D
Copy link

Issue

Some __New meta function are missing from the ahk2.d.ahk. For example:

class MyHook extends InputHook {
    __New() {
        super.__New("L1")
    }
}

results in __New being highlighted with the message Class 'InputHook' might not have member '__New'.

I guess it was missing because not in the documentation? For the other classes I've checked, __New was recognized by the extension if and only if it was explicitly mentioned in the documentation.

Possible solutions

If I'm not mistaken, every object class has a tacit __New(…) method, and its signature and description can be directly copied from its Call(…) method, except it returns nothing. So I guess it could be used to generate the missing __New(…) methods.

Alternatively, it seems like thqby's vscode-autohotkey2-lsp currently include those __New(…) methods. At least it does for InputHook.

@Bunker-D Bunker-D added the AHK v2 exclusive to AHK v2 label Dec 29, 2024
@mark-wiemer
Copy link
Owner

Makes sense, this was probably "lost" when I switched to GroggyOtter's syntax files, I'll see what I can do. Ref #549 for the curious :)

@mark-wiemer
Copy link
Owner

(GitHub UX is being a bit wonky with project links appearing right now, as I recently moved the repo out of mark-wiemer-org and into mark-wiemer, but didn't move the project. Ref AHK++ project for those that want to track priority of this issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AHK v2 exclusive to AHK v2
Projects
None yet
Development

No branches or pull requests

2 participants