ewerybody / a2

Autohotkey module managing and developing framework.
GNU General Public License v3.0
63 stars 10 forks source link

Improve runtime setup functionality #138

Closed ewerybody closed 6 years ago

ewerybody commented 7 years ago

Expected Behavior

It's easy and clear for a module developer how to add variables, hotkeys, includes and so. He has easy access to whats there and sees what happens. It's rather hard to mess things up and if something goes wrong its clear what happened.

Current Behavior

There are different lists and dicts that one has to write into in different ways to set things up. These objects are THE very things the setup process reads from. It's unintuitive, not self explanatory and pretty easy to fuck things up.

Possible Solution

Provide some functions that do exactly these things with a clear interface.

add_hotkey(keys, command, scopes)
add_variable(key, value)
add_include(path)
...

These could be members of an object thats set up for the current module. So while looping over the elements of the module this object is passed along and then eventually used by the setup process to write things down.