Author:admin

Date:2008-09-19T07:54:43.000000Z


git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@25 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
jfiat
2008-09-19 07:54:43 +00:00
parent c0aba35d72
commit 8a46c5d793
247 changed files with 1257 additions and 47 deletions

View File

@@ -0,0 +1,45 @@
[[Property:title|Preferences Sample]]
[[Property:link_title|EiffelPreferences Sample]]
[[Property:weight|2]]
[[Property:uuid|f492e71c-07a8-9b1d-f72a-d59330acbf16]]
<br/>
<br/>
==Compiling==
* Launch EiffelStudio.
* Click '''Add project'''
* Browse to ''$ISE_EIFFEL\examples\preferences\''.
* Choose ''preferences_example.ecf''
* Choose the location where the project will be compiled, by default the same directory containing the configuration file.
* Choose the target: ''registry'' (Windows only) will use the registry to store the preferences, ''xml'' will use a xml file to store the preferences.
* Click '''OK'''.
==Running==
After launching the application, you will see a window displayed with 2 buttons. When clicked each will display a window showing the preferences, one is the default view provided with the library, the other is a custom view for purposes of example. The default view looks like:
[[Image:normal|preferences_example_normal_view]]
The custom view looks like:
[[Image:custom|preferences_example_normal_view]]
In each dialog you can select the preferences and alter the values.
==Under the Hood==
This example shows you how to achieve the following tasks:
* Create preferences using the library supplied preference types and associated views
* Use the default widget for viewing preferences and manipulating their values
* Create a custom preference (a preference for storing correctly formatted directory path names)
* Create a widget to view and change the custom preference type value
* Create a custom manager to register custom types to the system
* Create a custom dialog for viewing all the preferences