[GUI] More points for the technical discussion
Wolfgang Jeltsch
wolfgang@jeltsch.net
Tue, 18 Feb 2003 12:36:21 +0100
On Monday, 2003-02-17, 23:34, CET, Glynn Clements wrote:
> Wolfgang Jeltsch wrote:
> > > > Generally, you only set widget properties programmatically if you=
have
> > > > to (i.e. because the values are determined dynamically).
> > >
> > > Yes,yes :) I was not proposing any true API, just arguing that one =
can
> > > abstract over a yesNoCancel dialog window, parametrizing it with th=
e
> > > verb to use on macos and kde3 to avoid a "yes/no" question.
> >
> > I think the distinction between static values (which don't have to be
> > computed at run-time) and dynamic values (which have to be computed a=
t
> > run-time) is not very natural. It is just like a distinction between
> > squares and rectangles which are not squares.
>
> Huh? Would you build a web site entirely from CGI scripts, even for sta=
tic
> pages?
My plan for the Haskell Web Publisher is indeed to produce everything=20
dynamically (maybe based on static data from databases etc.) One advantag=
e of=20
this is consistency.
> Static-vs-dynamic is a pretty fundamental programming concept; e.g. the
> distinction between variables and functions in most languages
But not in Haskell! (And that's a good thing, I think.)
> [...]
> > > This does not solve the verb conjugation problem,indeed (how does a=
pple
> > > handle it in internationalization?)
> >
> > Your approch for the Yes-No-Cancel dialogs was to specify a verb
> > describing the action (e.g., "save") and to let the system produce th=
e
> > button captions. Why shouldn't we just define a function which has th=
e
> > captions of the Yes and the No button directly as arguments? An examp=
le
> > application of it could be
> > dialogYesNoCancel "Save" "Don't save" <other arguments>
> > which would name the buttons "Save", "Don't save" and "Cancel" on the=
Mac
> > and "Yes", "No" and "Cancel" on a PC running Windows or KDE (:-)).
>
> Because localisation is a lot easier if all user-visible text is in one
> place (and in a place other than the source code).
I didn't want to vote for strings in the source code here but for specify=
ing=20
complete button captions (e.g., "Save" and "Don't save") instead of just =
a=20
verb (e.g., "save") which the library would have to conjugate.
> [...]
Wolfgang