Difference between revisions of "Using Dialog Prompts (Discardable Advanced)"

m
 
m
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:Extending EiffelStudio]]
 
{{UnderConstruction}}
 
Showing dialog prompts displaying the same messages over and over again can be annoying for most end-user. Take the security or alert notifications in your browser, most of us just turn them off after we have read them after they have been shown for the first time, we even discard them without reading them in some cases. [[EiffelStudio]] another product full of cases where "discardable" dialogs prompts are a necessity, without them we could hinder and annoy end-users.
 
  
 
== Getting Started ==
 
 
You should already be familiar with the topics detailed in [[Using Dialog Prompts (Advanced)]] as the information there applies to discardable dialogs prompts also.
 
 
Before continuing you may also want to check out the following pages:
 
* [[Tool Dialog Prompts]]
 
* [[Tool Dialogs]]
 
* [[Taxonomy of Dialog Prompts]]
 
* [[Dialog Prompt Messages and Formatting]]
 
 
== The Need For Discardable Dialog Prompts ==
 
 
One such example of a need for a discardable dialog is performing a finalization compilation. Finalization asks the end-user if they want to discard or keep assertions. For the most part (95%-99% of cases) assertions are always discarded. It makes sense to offer a way to suppress the dialog in the future and perform a default, commonly used, pre-defined action (discarding assertions in this case) when performing a finalization in the future.
 
 
[[Image:Dialog prompts example discard assertions.png|Dialog shown when finalizing an Eiffel project]]
 
 
 
== Introducing Discardable Dialog Prompt Classes ==
 
 
There are, as of [[EiffelStudio]] 6.1, four common discardable dialog prompt classes for use which are somewhat self-explanatory.
 
 
* [https://eiffelsoftware.origo.ethz.ch/svn/es/trunk/Src/Eiffel/interface/new_graphical/dialogs/prompts/es_discardable_warning_prompt.e ES_DISCARDABLE_WARNING_PROMPT]: Used to display a discardable warning
 
* [https://eiffelsoftware.origo.ethz.ch/svn/es/trunk/Src/Eiffel/interface/new_graphical/dialogs/prompts/es_discardable_information_prompt.e ES_DISCARDABLE_INFORMATION_PROMPT]: Used to display a piece of informative text that can be discarded in the future.
 
* [https://eiffelsoftware.origo.ethz.ch/svn/es/trunk/Src/Eiffel/interface/new_graphical/dialogs/prompts/es_discardable_question_prompt.e ES_DISCARDABLE_QUESTION_PROMPT]: Used to ask the user a discardable yes/no question.
 
 
All dialog prompt classes are based on an abstract implementation [https://eiffelsoftware.origo.ethz.ch/svn/es/trunk/Src/Eiffel/interface/new_graphical/dialogs/prompts/es_discardable_prompt.e ES_DISCARDABLE_PROMPT], which in turn implements parts of [https://eiffelsoftware.origo.ethz.ch/svn/es/trunk/Src/Eiffel/interface/new_graphical/dialogs/prompts/es_prompt.e ES_PROMPT].
 
 
== Extending A Discardable Dialog Prompt ==
 
 
Like the regular dialog prompts (see [[Using Dialog Prompts (Advanced)]]), discardable dialog prompts can also be extended. For an example of extension inside EiffelStudio, see the [https://eiffelsoftware.origo.ethz.ch/svn/es/trunk/Src/Eiffel/interface/new_graphical/dialogs/prompts/es_discardable_compile_save_files_prompt.e ES_DISCARDABLE_COMPILE_SAVE_PROMPT] class. Below shows an extended [https://eiffelsoftware.origo.ethz.ch/svn/es/trunk/Src/Eiffel/interface/new_graphical/dialogs/prompts/es_discardable_question_prompt.e ES_DISCARDABLE_QUESTION_PROMPT] class to create a discardable prompt that informs the user about unsaved modifications to one or more classes in the project, prior to a compilation.
 
 
[[Image:Dialog prompts example unsaved list.png|Unsaved changes dialog prompt with a subtitle]]
 

Latest revision as of 08:55, 6 September 2007