GUI design question

Lothar Scholz llothar at web.de
Thu Apr 19 00:33:14 PDT 2007


Hello I.,

Wednesday, April 18, 2007, 8:54:03 AM, you wrote:

IS> Lothar:

IS> On 4/19/07, Lothar Scholz <llothar at web.de> wrote:
>> So how to do this on Apple Systems?
>>

IS>   Definitely get rid of the apply button. :-)

Advise acknowledged.

IS>   I recommend using KVO/KVC and Bindings (read the documentation for
IS> details). This allows you to use NSUserDefaultsController to apply
IS> preference changes immediately. It also allows you to use the
IS> validation method -validateValue:forKeyPath:error: to take immediate
IS> corrective action. See this doc for a good overview of the process:

IS> http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/Concepts/MessageFlow.html

IS>   Without specific details about some of the settings and the nature
IS> of their dependencies, that's about as detailed as anybody can get.

Okay one example (by the way it is the port of
http://www.ruby-ide.com). In this IDE the user can start a tool
program and the output is parsed by an regexpr to catch error messages
for example from gcc. So one of the configuration dialogs is the
parameters for the start of external programs and one option is a
checkbox to mark that a regexpr is used. I enable the text field
only when the checkbox is checked. If the textfield with the
regexpr contains a syntax error a small indicator error icon
will appear to the right of the text field, giving a visual clue.

In this case, if there is an error and the user want to run this
program. What is the most expected behaviour of a MacOSX application:

1) Interrupt the workflow of the user and tell him his input is
incorrect (at least issue a warning).

2) Don't run the program and show an alert box that the output will not
be parsed correctly because the regexpr is invalid. Means: check
preferences before the first use.

3) Run the program and the user will see it on his own because the
error lines in the output are not highlighted. Let him guess that this
have to do with his wrong input.

Thats only one example (it's the current part i'm working on it) but
i think this catches a lot of common preference settings problem i
have at the moment.

By the way: should a preference window have a "reset" button to
revert all the options to the time when the dialog was shown the
first time?

-- 
Best regards,
 Lothar                            mailto:llothar at web.de



More information about the MacOSX-dev mailing list