[GUI] More points for the technical discussion

Wolfgang Thaller wolfgang.thaller@gmx.net
Sun, 16 Feb 2003 23:19:19 +0100


"Nick Name" wrote:

>>  *) File types

> Has this really something to do with the UI library? The fileopen 
> dialog
> will always show correct file types for you if it is native.

An application that presents an open dialog will have to tell the GUI 
library to "display just plain text and RTF files by default". When a 
file is opened, it needs to discover whether it was a text file or an 
RTF file.

>>  *) Displaying File Names and Extension Hiding

> The same. IMO, this has to do with a filesystem abstraction, not with
> the UI library.

Then why is it part of Apple's GUI toolkits? I think in this case, this 
file system feature is an important part of the UI experience, and it's 
probably just a single function. Something like this:

displayNameForPath :: String -> IO String
#if MACOS
displayNameForPath path = .. - don't remember exactly
#else
displayNameForPath = return . reverse . takeWhile (/= '/') . reverse
#endif


Cheers,

Wolfgang