lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] Quoting in diagnostic messages


From: Greg Chicares
Subject: [lmi] Quoting in diagnostic messages
Date: Wed, 23 Nov 2005 01:45:31 +0000
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Wendy pointed out that messages like
  Value '' invalid
for empty strings are too easy to misread as
  Value " invalid
or even
  Value "invalid
with default msw fonts.

I think the problem here is that ASCII has only the quotation
marks found on a typewriter, where we'd rather distinguish
open from close quotes. Unicode would allow something like
  Value ‘’ invalid
though I don't know how that'll display in this message; but
that's not a good enough reason to forsake ASCII. I don't
want to use backquote (ASCII 0x060, '`') because
  Value `foo` invalid
looks bizarre to American end-users unless they're
accustomed to writing shell scripts, and this variant
  Value `foo' invalid
occasionally seen on webpages is surprising and wrong.

German-style quotes might be simulated like this
  Value ,foo` invalid
in ASCII, but backquote ('`') isn't right here, and other
cultures wouldn't know what to make of it.

French quotes are logical enough that anyone who's never
seen them would know what they mean, but we don't have left
and right guillemet («like this») in ASCII; we might try
'<' and '>' as ersatz guillemets, but
  Value <foo> invalid
and
  Value <<foo>> invalid
look wrong too, and I try to avoid those characters whenever
I can because they're 'special' in xml and html.

We could use special logic for the empty-string case, but
wouldn't that require changes in lots of places? We'd wind up
writing
        fatal_error()
            << "Value "
            << quote(s)
            << " invalid for type "
            << quote(typeid(T).name())
            << '.'
            << LMI_FLUSH
            ;
which might not be all that bad, but still it seems, well,
excessive, and it's all to easy to forget to do it somewhere.

If we forced a nonproportional font, messages like
  Value '' invalid
would be clearer; but mixing fonts in a dialog looks ugly.

I think it would be best to spend our time instead on adding a
facility to copy the contents of the 'diagnostics' static-text
control. I tried making it a wxTE_READONLY | wxTE_NOHIDESEL
wxTextCtrl, but the builtin msw right-click handler wouldn't
copy its contents; so I think we'd be better off leaving it
as a wxStaticText control and adding, say, a right-click
handler to place its contents on the clipboard. That would
make it easier for users to send us problem reports; probably
they can't resolve problems like the one reported at the top
of this message themselves, which--best solution of all--I'm
trying to prevent from arising in the first place.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]