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

Added registered lists concept and reactivating previous list on list removal #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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