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

scriptUI: Choice dialog with custom buttons #29

Closed
nvaccessAuto opened this issue Jan 1, 2010 · 2 comments
Closed

scriptUI: Choice dialog with custom buttons #29

nvaccessAuto opened this issue Jan 1, 2010 · 2 comments

Comments

@nvaccessAuto
Copy link

Reported by jteh on 2008-02-12 09:37
There will probably be several uses for a dialog containing a list and several buttons. A links list is one example.

The current scriptUI code includes !SingleChoiceDialog and !LinksListDialog. It would make sense to abstract this code so that it can be used more generally and then sub-class to provide these dialogs.

For this new class:

  • The constructor should take:
    • title
    • message
    • choices: A list of choices
    • defaultChoice :index of default choice
    • buttons:
      • A list of buttons to display
      • Need some way of identifying which button was pressed
      • Callbacks might be nice, but might be tricky to implement, as the GUI !ExternalExecuteEvent can only take one callback. Also, might actually make coding harder
      • Perhaps just return the index of the button that was pressed?
      • Cancel button will be added in addition to these buttons
      • How do we handle the case of just wanting a standard !ButtonSizer with OK and Cancel buttons?
        • Maybe an empty buttons list?
    • defaultButton: Index of default button
      • The default button will get an ID of ID_OK
  • Callback will probably return (buttonIndex, selectedItemIndex, selectedItemText)
@nvaccessAuto
Copy link
Author

Comment 1 by mdcurran on 2008-04-27 12:13
Do we still need this? as the Links list is already implemented. Was this going to be used for a System Tray list? if so I'd suggest making a ticket for that and making this block that.

@nvaccessAuto
Copy link
Author

Comment 2 by jteh on 2008-05-20 01:05
ON further reflection, this idea is probably overly complicated. It is probably easier to just make such dialogs for individual cases as required. This can be reopened if desired at a later point.
Changes:
Added labels: wontfix
State: closed

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

No branches or pull requests

2 participants