public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Re: insight Digest 8 Nov 2000 20:49:20 -0000 Issue 248
       [not found] <973716560.9718.ezmlm@sources.redhat.com>
@ 2000-11-08 13:15 ` Jim Ingham
  0 siblings, 0 replies; only message in thread
From: Jim Ingham @ 2000-11-08 13:15 UTC (permalink / raw)
  To: insight

Larry,

There are two issues here.  One is what if you click without highlighting and what if you click on a highlighted region.  In the first case, it is uncertain what the person intended, and you have to guess.  You can try to be smart about the guess (like if you have

   foo.bar.baz

and the user clicks on the "a" in bar, you might want to show "foo.bar").  But here you are pretty much guessing, and also the user may not have intended the level of precision you are assuming.  In general, you should err on the side of less specificity, since if the user wanted to see foo.bar, and you show her foo instead, she can just turn down the foo triangle to see what she wanted.  If you are too specific, then she has to go back and do it again, which is probably more annoying.  In this case "'argv[1]" is a little annoying, since if argv is a "char **" rather than a "char * [10]" or such-like, then the argv display will NOT allow you to turn it down and see argv[1].  So you might want to look for arrays, and get the whole specification in this case. 

HOWEVER, if the user goes to the trouble to select a portion of text, and then click on it, you have to trust them to know what they are doing.  In general, you should never discard extra info that the user is consciously providing you...

This is the way gdbtk works, so I don't think that it needs much fixing.  The cases like argv[1] can be worked around using the select & click method.  However, if SN does NOT behave this way, and ignores the selection, then I think that should certainly be fixed.

Jim

> ----------------------------------------------------------------------
> From: Larry Smith <larry@smith-house.org>
> Date: Tue Nov 07, 2000  01:44:54 PM US/Pacific
> To: insight@sources.redhat.com
> Cc: lsmith@redhat.com
> Subject: Source Window - pop-up over array elements
> 
> 
> One bug report we have here says that highlighting "argv[0]"
> and adding it to the watchlist results in adding "argv", not
> "argv[0]" and that the latter should be correct.
> 
> However, this seems to me to be another example of a C-ish
> orientation.  Gdbtk has no notion of a "type", such as an
> array, nor code to parse array element notation - in C, or
> any other supported language.  Trying to add it sounds like
> a poorly-considered can of worms.  Should I quash this report,
> or can someone suggest a generic and non-hacky way for the
> gdbtk code to magically become aware of arrays in all supported
> languages?
> 
> Or...does someone want to see "argv[0]" special-cased?
> 
> regards,
> -- 
>  .-.    .-. .---. .---. .-..-. | "Bill Gates is just a monocle
>  | |__ / | \| |-< | |-<  >  /  | and a Persian Cat away from
>  `----'`-^-'`-'`-'`-'`-' `-'   | being one of the bad guys in a
>        My opinions only.       | James Bond movie." -- D Miller

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-11-08 13:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <973716560.9718.ezmlm@sources.redhat.com>
2000-11-08 13:15 ` insight Digest 8 Nov 2000 20:49:20 -0000 Issue 248 Jim Ingham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).