Re: More points for the technical discussion

Wolfgang Thaller <[email protected]>
Newsgroups gmane.comp.lang.haskell.gui
Message-ID <[email protected]>
"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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.