Interfaces Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
tyroneous9
Posts: 9
Joined: 02 Dec 2021, 22:29
Contact:

Interfaces

07 Dec 2021, 19:48

Does AHK allow you to implement interfaces like in Java or Python? I took a look at COM thinking it might be related, but did not really understand it. Can someone point me in the right direction?
User avatar
mikeyww
Posts: 26883
Joined: 09 Sep 2014, 18:38

Re: Interfaces

07 Dec 2021, 19:54

You can make a GUI if that is what you need. :arrow: Gui
tyroneous9
Posts: 9
Joined: 02 Dec 2021, 22:29
Contact:

Re: Interfaces

07 Dec 2021, 20:20

Maybe I lack experience with GUIs, but they don't seem to serve my intent here. I want to abstract a couple classes that are quite similar in concept but not in their implementation, and an interface should do this pretty well.
User avatar
mikeyww
Posts: 26883
Joined: 09 Sep 2014, 18:38

Re: Interfaces

07 Dec 2021, 20:25

OK. I do not know how to use a GUI to abstract classes, but someone else here who uses classes more may know.
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Interfaces  Topic is solved

07 Dec 2021, 21:34

there's no native support for interfaces. u can write ahk classes behaving as such, but the burden is entirely on u to ensure they work as advertised, ie the runtime won't automatically check and enforce constraints for u

u can write clientcode that would do that(in fact for a bigger project ull probably have to either way, otherwise gl maintaining it) but thats still code youll have to write urself. it would be easier to do this in v2 though(more introspection capabilities, saner object model)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: GollyJer, Lamron750, septrinus and 254 guests