T.R | Title | User | Personal Name | Date | Lines |
---|
884.1 | To quote or not to quote | VERNA::V_GILBERT | | Tue Apr 09 1991 18:46 | 11 |
| Richard,
We had many discussions about latin1strings and the iconic map. We finally
decided that the user should enter what he wants. Otherwise, if he really
wants quotes, he must enter "", etc.
We certainly could put in additional code to strip off beginning and end
quotes, if that is the desired behavior, but we felt that the user should
simply enter what he wants.
Verna
|
884.2 | AM can enforce quote consistency | COOKIE::KITTELL | Richard - Architected Info Mgmt | Tue Apr 09 1991 19:39 | 24 |
|
RE: .1
Thanks Verna. I agree that a user will get used to the way the IMPM
does it. I know I do when I primarily use the windowing interface. These
things tend to bite me when I have to move back and forth between the
two PMs.
I'm sure you've been over the philosophical ground of "do we try to
keep the different PMs as consistent as possible, or let each of them
do what it does best?"
In this case, I can buy an argument that quotes are an unfortunate
side-effect of FCL needing syntax for parsing, and other PMs that are
syntax-free shouldn't have to clutter themselves with quotes.
On the other hand, my customers are going to be focused on media management,
and I don't think I'll be able to get their span of attention down to the
level of "command lines use quotes, windows don't". A small matter of
code in my routine that converts ILV can strip the quotes if they are
there.
It was worth asking to see if you'd do it for me... :-)
|
884.3 | | VERNA::V_GILBERT | | Wed Apr 10 1991 19:10 | 5 |
| Richard,
It is certainly something that can be on a wishlist, but no promises.
Verna :-)
|
884.4 | works for me so far... | COOKIE::KITTELL | Richard - Architected Info Mgmt | Wed Apr 10 1991 21:22 | 32 |
|
This little segment sits in the routine that does all the ILV to descriptor
conversions. It just takes off enclosing quotes if they're there.
case MCC_K_DT_LATIN1STRING:
status = mcc_ilv_get (ctx, val_desc, reason);
/*
* Strip single leading and trailing quotes. This is because
* it is easy to enter them to the Iconic interface, where they
* aren't needed.
*/
if (GOOD (status))
{
char *string, *first, *last;
string = val_desc->mcc_a_pointer;
string[val_desc->mcc_w_curlen] = '\000';
/* See if the first and last chars are quotes */
if ((first = strchr (string, '"')) &&
(last = strrchr (string, '"')) &&
(first == string) &&
(last == &string[val_desc->mcc_w_curlen - 1]))
{
val_desc->mcc_w_curlen -= 2;
if (val_desc->mcc_w_curlen)
strncpy (string, &string[1], val_desc->mcc_w_curlen);
}
}
break;
|