[GRASS-dev] New v.digit

Maciej Sieczka wrote:

>> I'm currently using the -n switch. If you get rid of it, I can take it
>> out
>> of the v.digit command (and shorten the code a bit) in vector.tcl..
>
> Well what I took from previous discussions was its OK to use the -n flag
> even if the map already exists, because it is only checked if the map
> doesn't already exist! So it would be fine to just use it all the time,
> but probably a more preferable solution is just to get rid of it as it
> seems to be anomaly with no real use.

I don't have a strong opinion about it. However, eventual removal of
the -n flag should be postponed to GRASS 7 I think.

It shouldn't be *removed* without warning, but if it is considered
unnecessary, it can be ignored. IOW, if the old map doesn't exist,
always create a new map, rather than generating an error if -n wasn't
given.

--
Glynn Clements <glynn@gclements.plus.com>

Paul Kelly wrote:

> I added the OK button. It's in the cvs now.

I just tested this and as far as I can see it doesn't work correctly. You
stil have to press enter in the box after changing the line width for it
to be picked up. And the default line width still isn't placed in the box
to start with. Also if there is an OK button there should be a cancel too
I think.

An OK button either needs to run the "invoke" method on each Entry
widget in the tab (or in the entire dialog), or run the commands (the
arguments to the -command switches) directly.

A cancel button is a bit problematic, as there is only c_var_set, and
no corresponding c_var_get, so you can't reset the displayed values to
the internal values.

--
Glynn Clements <glynn@gclements.plus.com>

I've improved the performance of the OK button. But what I really did was
get the line width variable to update properly when the widget is changed.
The rest of the settings seem to update OK.

As Glynn says, doing a cancel button requires rewriting the module quite a
bit. As it is, it simply sets a set of v.digit working environment
variables. To make a real cancel button, you'd need to track prior values of
all variables, then reset them to prior values if a cancel button is hit.
For creating/changing cat and attribute values, it would be even harder to
'roll back' to a prior state.

With respect to the window title, it's not about hiding commands from the
user. I simply think it's better if the title briefly explains what is going
on in the window. "Digitizing mymap@PERMANENT" seems more informative than
telling the name of the command that calls the window IMHO. However, it's
not a big thing and I've reverted it to v.digit. It's easy enough to change
back should opinion swing that way.

A couple of bugs I noted:

1. In the copy cats tool, one of the mouse button prompts says "Conform and
select next". It should be "Confirm and select next".

2. Whenever I try to do something with the display cats window (add new), it
crashes v.digit. I apparently don't understand how it's supposed to work.
But it shouldn't crash it either.

Michael

On 2/25/07 1:02 PM, "Glynn Clements" <glynn@gclements.plus.com> wrote:

Paul Kelly wrote:

I added the OK button. It's in the cvs now.

I just tested this and as far as I can see it doesn't work correctly. You
stil have to press enter in the box after changing the line width for it
to be picked up. And the default line width still isn't placed in the box
to start with. Also if there is an OK button there should be a cancel too
I think.

An OK button either needs to run the "invoke" method on each Entry
widget in the tab (or in the entire dialog), or run the commands (the
arguments to the -command switches) directly.

A cancel button is a bit problematic, as there is only c_var_set, and
no corresponding c_var_get, so you can't reset the displayed values to
the internal values.

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

Michael Barton wrote:

I've improved the performance of the OK button. But what I really did was
A couple of bugs I noted:

2. Whenever I try to do something with the display cats window (add new), it
crashes v.digit. I apparently don't understand how it's supposed to work.
But it shouldn't crash it either.

This one is due to the restructuring changes (prior to actually using
Tk instead of libraster). The "display cats" tool doesn't update the
global variable last_cat_line, which the "Add new" button uses (along
with the Delete button which appears alongside the new category).

Fixed in CVS.

--
Glynn Clements <glynn@gclements.plus.com>

Michael Barton wrote:

Do you mind if I change the display and digitizing controls window
titles to "Digitizing $map_name@$map_mapset" (from "v.digit -
$map_name@$map_mapset".

This is a bit more descriptive, especially when run from the GIS
Manager rather than from the command line.

"Digitizing controls for $map_name@$map_mapset" might be even better
for the toolbox window, but I'm afraid that title would be too long
for some maps.

For my 2c, I still prefer "v.digit - $mapname".

@$mapset is redundant, you can only edit maps in the current mapset.
Or if you really want the mapset in there, use "in mapset $mapset".

Glynn:
[-n flag]

It shouldn't be *removed* without warning, but if it is considered
unnecessary, it can be ignored. IOW, if the old map doesn't exist,
always create a new map, rather than generating an error if -n wasn't
given.

mmph. it protects uncoordinated typists such as myself from small typos
in a map name from becoming larger problems/wasted time.

Hamish

ps- [-n flag] I made a mistake some time ago calling a module flag
"superseded" (replaced) when it was better termed "depreciated"
(removed). For a lot of cases now "depreciated" is a better word for
what's happening but "superseded" is what is now used.

I already reset it to v.digit. I agree that if mapset is redundant, it can
be removed.

I prefer something like "Digitizing" over "v.digit" for a window title
because it is a quick descriptor of what is happening in the window. This is
the way that most window titles seem to work (and hence, what users
unconsciously or consciously expect). But it's not a big deal either way.

Michael

On 2/25/07 11:49 PM, "Hamish" <hamish_nospam@yahoo.com> wrote:

For my 2c, I still prefer "v.digit - $mapname".

@$mapset is redundant, you can only edit maps in the current mapset.
Or if you really want the mapset in there, use "in mapset $mapset".

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

Hamish wrote:

ps- [-n flag] I made a mistake some time ago calling a module flag
"superseded" (replaced) when it was better termed "depreciated"
(removed). For a lot of cases now "depreciated" is a better word for
what's happening but "superseded" is what is now used.

The word is "deprecated" (no "i"); but at least you didn't spell
"supersede" with a "c" :wink:

--
Glynn Clements <glynn@gclements.plus.com>

Glynn Clements wrote:

Hamish wrote:

> ps- [-n flag] I made a mistake some time ago calling a module flag
> "superseded" (replaced) when it was better termed "depreciated"
> (removed). For a lot of cases now "depreciated" is a better word for
> what's happening but "superseded" is what is now used.

The word is "deprecated" (no "i");

don't take my word for it; see below, (sorry about the pun)

but at least you didn't spell "supersede" with a "c" :wink:

it has in fact taken a long time for my brain to seize that one.

[dict.org]

"The Collaborative International Dictionary of English v.0.48"
deprecate dep"re*cate (de^p"r-e*k=at), v. t. imp. & p.
   p. Deprecated (-k=a`te^d); p. pr. & vb. n.
   Deprecating (-k=a`ti^ng). L. deprecatus, p. p. of
   deprecari to avert by prayer, to deprecate; de- + precari to
   pray. See Pray.
   To pray against, as an evil; to seek to avert by prayer; to
   seek deliverance from; to express deep regret for; to desire
   the removal of. archaic
   1913 Webster

   2. To protest against; to advance reasons against.
      PJC

            His purpose was deprecated by all round him, and he
            was with difficulty induced to adandon it. --Sir W.
                                                  Scott.
      1913 Webster

   3. To disapprove of strongly; to express a low opinion of.
      PJC

"The Collaborative International Dictionary of English v.0.48"
Depreciate De*pre"ci*ate (d-e*pr=e"shi^*=at), v. t.
   imp. & p. p. Depreciated
   (d-e*pr=e"shi^*=a`te^d); p. pr. & vb. n.
   Depreciating (d-e*pr=e"shi^*=a`ti^ng). L.
   depretiatus, depreciatus, p. p. of depretiare, -ciare, to
   depreciate; de- + pretiare to prize, fr. pretium price. See
   Price.
   To lessen in price or estimated value; to lower the worth of;
   to represent as of little value or claim to esteem; to
   undervalue. --Addison.
   1913 Webster

         Which . . . some over-severe philosophers may look upon
         fastidiously, or undervalue and depreciate. --Cudworth.
   1913 Webster

         To prove that the Americans ought not to be free, we
         are obliged to depreciate the value of freedom itself.
                                                  --Burke.

   Syn: To decry; disparage; traduce; lower; detract; underrate.
        See Decry.
        1913 Webster

the "i"s have it,
H

Hamish wrote:

> > ps- [-n flag] I made a mistake some time ago calling a module flag
> > "superseded" (replaced) when it was better termed "depreciated"
> > (removed). For a lot of cases now "depreciated" is a better word for
> > what's happening but "superseded" is what is now used.
>
> The word is "deprecated" (no "i");

don't take my word for it; see below, (sorry about the pun)

  http://dictionary.reference.com/search?q=deprecate

In the context of a software feature slated for removal, the commonly
used term is "deprecated"; use of "depreciated" is usually a typo.

--
Glynn Clements <glynn@gclements.plus.com>

Glynn Clements wrote:

Hamish wrote:
> > > ps- [-n flag] I made a mistake some time ago calling a module
> > > flag "superseded" (replaced) when it was better termed
> > > "depreciated" (removed). For a lot of cases now "depreciated" is
> > > a better word for what's happening but "superseded" is what is
> > > now used.
> >
> > The word is "deprecated" (no "i");
>
> don't take my word for it; see below, (sorry about the pun)

  http://dictionary.reference.com/search?q=deprecate

the only relevant entry I see there is
3. to depreciate;

and some notes that deprecate is often used in place of depreciate..

Rather than falling into a debate about the Latin source of the two
words (lessen in value vs. ward off by prayer) as applied in the modern
Queen's english to software design, I'll just say that this really
doesn't matter to me much at all, my main concern is clarity of meaning
not common spellings.

moving on to more important issues...

Hamish

Hamish wrote:

> > > > ps- [-n flag] I made a mistake some time ago calling a module
> > > > flag "superseded" (replaced) when it was better termed
> > > > "depreciated" (removed). For a lot of cases now "depreciated" is
> > > > a better word for what's happening but "superseded" is what is
> > > > now used.
> > >
> > > The word is "deprecated" (no "i");
> >
> > don't take my word for it; see below, (sorry about the pun)
>
> http://dictionary.reference.com/search?q=deprecate

the only relevant entry I see there is
3. to depreciate;

1. to express earnest disapproval of.

Describing a feature as "deprecated" means that you disapprove of its
use.

With regard to computer software, the term is normally reserved for
features which are superseded and/or obsolete, although it is
occasionally used to describe features which should only be used as a
last resort, e.g. low-level access to system "internals" (aka "debug
mode").

--
Glynn Clements <glynn@gclements.plus.com>