Opened 11 years ago

Closed 11 years ago

#2250 closed defect (fixed)

d.text unsupported from command line

Reported by: veroandreo Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: wxGUI Version: svn-releasebranch70
Keywords: d.text Cc:
CPU: x86-64 Platform: Linux

Description

Hi,

d.text appears as an unsupported command in grass7 when used from command line. It does work when used from GUI, but for a loop it's really handy to have it running in the shell.

Example:
GRASS 7.1.svn (plate_carree):~ > d.mon wx0
GRASS 7.1.svn (plate_carree):~ > d.rast jan_average
GRASS 7.1.svn (plate_carree):~ > d.text text="HOLA" at=30,30
GRASS_INFO_WARNING(2716,1): Unsupported command d.text.
GRASS_INFO_END(2716,1)

GRASS 7.1.svn (plate_carree):~ > g.version -g
version=7.1.svn
date=2014
revision=59627M
build_date=2014-04-07
build_platform=x86_64-unknown-linux-gnu

Best,
Vero

Change History (4)

comment:1 by wenzeslaus, 11 years ago

To make it more clear:

In command line:

GRASS 7.1.svn (nc_spm_08):~ > d.mon wx0
GRASS 7.1.svn (nc_spm_08):~ > d.rast elevation
 100%
GRASS 7.1.svn (nc_spm_08):~ > d.text text="Hola" at=30,30
GRASS_INFO_WARNING(3720,1): Unsupported command d.text.
GRASS_INFO_END(3720,1)

In the main GUI (g.gui, wxGUI):

d.rast elevation
d.text text="Hola" at=30,30

results in error dialog with:

Command 'd.text' not yet implemented in the WxGUI. Try adding it as a command layer instead.

Adding a command layer ("d.text text="Hola" at=30,30") works.

My first guess is that layers in d.mon wxGUI backend are added by standard mechanism, the same as in GUI. While command layers are added separately. The questing is if just adding all layers in d.mon wxGUI backend as command layers would solve the problem. Can this be so simple, or are there some consequences? I can see problem with all dependent functions in wxGUI (e.g. profile) which accepts rasters or vectors maps from layers currently loaded into the map display, so there apparently need to know the type of the layer, just command layer is not enough.

By the way, I'm actually not sure if you can safely use d.* commands with d.mon wx* in script (or for loop in command line). This is a topic for different ticket, however.

Vero, note that you can use {{{ and }}} to add source code listings (verbatim, list of commands) which is simpler and nicer than [[BR]]. Generally, you can use Trac WikiFormatting.

in reply to:  description comment:2 by neteler, 11 years ago

Component: DisplaywxGUI

Replying to veroandreo: ...

GRASS 7.1.svn (plate_carree):~ > d.mon wx0
GRASS 7.1.svn (plate_carree):~ > d.rast jan_average
GRASS 7.1.svn (plate_carree):~ > d.text text="HOLA" at=30,30
GRASS_INFO_WARNING(2716,1): Unsupported command d.text.
GRASS_INFO_END(2716,1)

Hopefully fixed in r60285 (trunk) and r60286 (relbr7). Please test.

comment:3 by veroandreo, 11 years ago

Hi,

I can confirm it's working in freshly compiled r60329M

thanks much! :)

comment:4 by neteler, 11 years ago

Milestone: 7.1.07.0.0
Resolution: fixed
Status: newclosed
Version: unspecifiedsvn-releasebranch70
Note: See TracTickets for help on using tickets.