[tex-live] TeXshop and other GUIs: space in text box data

Maxwell, Adam R adam.maxwell at pnnl.gov
Thu Sep 19 19:57:47 CEST 2013

On Sep 19, 2013, at 10:41, "Nelson H. F. Beebe" <beebe at math.utah.edu> wrote:

> So, the question for GUI interface programmers on this list is: should
> the GUI trim leading and trailing space in strings entered into text
> boxes?  I rather think that it should, or if it does not, at least it
> should issue a prominent warning.

No, but it should definitely warn if the path doesn't exist (this is the
approach we took in BibDesk's TeX preferences, for instance). Trimming
or guessing at the user's intent for executables isn't generally safe.

IMHO, the best approach is to disallow direct entry of paths, and use
NSOpenPanel to guarantee a correct path. An NSPathControl is a more
modern way to represent paths, which I use in TeX Live Utility's 
preferences. It works with an open panel or drag-and-drop.


More information about the tex-live mailing list