Skip to content

Conversation

@jbarata
Copy link

@jbarata jbarata commented Feb 7, 2013

Hi there,

This PR adds a registered lists array that serves as a stack for started lists and allows us to get back and reactivate the previous started list on removal of a list.

Also added a public method (removeList(list)) that removes a list from Shortcuts object and reactivates the list that was previously started (the last one in the registered array), instead of stopping the whole thing.

This is very useful for cases where, for example, we have a main shortcut list that has a shortcut for opening a dialog with its own list of shortcuts (which itself can open other stuff with its own shortcuts). In this scenario, we can press the shortcut to open the dialog, do some stuff in the dialog (using its own shortcuts), then, before closing the dialog we call Shortcuts.removelist('the_dialog_list') and it will reactivate the previous registered list (in this example the main list).

… removal

added a registered lists array that serves as a stack for started lists and allows us to get back and reactivate the previous started list on removal of a list.

Also added a public method (removeList(list)) that removes a list from Shortcuts object and  reactivates the list that was previously started (the last one in the registered array), instead of stopping the whole thing.

This is very useful for cases where, for example, we have a main shortcut list that has a shortcut for opening a dialog with its own list of shortcuts (which itself can open other stuff with its own shortcuts). In this scenario, we can press the shortcut to open the dialog, do some stuff in the dialog (using its own shortcuts), then, before closing the dialog we call Shortcuts.removelist('the_dialog_list') and it will reactivate the previous registered list (in this example the main list).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant