Re: More points for the technical discussion
Wolfgang Jeltsch <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.gui |
|---|---|
| Message-ID | <[email protected]> |
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 the > > > 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 at > > 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 static > pages? My plan for the Haskell Web Publisher is indeed to produce everything dynamically (maybe based on static data from databases etc.) One advantage of 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 apple > > > 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 the > > button captions. Why shouldn't we just define a function which has the > > captions of the Yes and the No button directly as arguments? An example > > 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 specifying complete button captions (e.g., "Save" and "Don't save") instead of just a verb (e.g., "save") which the library would have to conjugate. > [...] Wolfgang