[GRASS-dev] NVIZ now broken?

Michael Barton michael.barton at asu.edu
Thu Nov 16 12:26:28 EST 2006


This is real weird.

The offending ComboxBox is a BWidgets widget. I used this for the express
reason of NOT breaking any older TclTk installations. The -label option is
also in other places such as  the vector panel in the GIS Manager. No one
has reported a problem there.

BWidgets is sourced in the nviz startup script that calls the others.

Here's a thought. 

$GISBASE/etc/nviz2.2/nviz2.2_script has the following statement at line 29..

package require BWidget

I'm wondering if you have another, more recent, BWidget installation
installed (with a ComboBox where -label doesn't work) and some way
accessible to TclTk without specific sourcing. Try replacing line 29 with
the following...

package require -exact BWidget 1.2.1

This will force nviz to use the BWidget package that comes with GRASS. This
package DOES have the -label option and it works.

I'm going to copy Glynn in case he has some insight.


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

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


> From: Markus Neteler <neteler at itc.it>
> Date: Thu, 16 Nov 2006 18:08:01 +0100
> To: Bob Covill <bcovill at tekmap.ns.ca>
> Cc: Michael Barton <michael.barton at asu.edu>, GRASS developers list
> <grass-dev at grass.itc.it>
> Subject: Re: [GRASS-dev] NVIZ now broken?
> 
> Hi Bob,
> 
> great job! I could see the error now and identify it!
> 
> The tcl error is:
> 
> Index: panel_site.tcl
> ===================================================================
> RCS file: /grassrepository/grass6/visualization/nviz/scripts/panel_site.tcl,v
> retrieving revision 2.6
> diff -u -r2.6 panel_site.tcl
> --- panel_site.tcl      13 Nov 2006 16:33:33 -0000      2.6
> +++ panel_site.tcl      16 Nov 2006 17:05:59 -0000
> @@ -125,7 +125,7 @@
>                 -command "change_color site $row1.color"]
>      bind $ptcolor <Expose> "$row1.color configure -bg \[get_curr_sv_color
> site\]"
> 
> -    set markertype [ComboBox $row1.marker -label "  marker type " -width 8 \
> +    set markertype [ComboBox $row1.marker  -width 8 \
>         -textvariable Nv_(siteshape) -modifycmd change_marker \
>         -values {"x" "sphere" "diamond" "cube" "box" "gyro" "aster"
> "histogram"}]
> 
> -label doesn't work here.
> 
> Whan I use your proposed changes and above fix, I see NVIZ again...
> 
> I'll leave it to you/Michael to submit changes.
> 
> Thanks,
> Markus
> 
> On Thu, Nov 16, 2006 at 12:29:59PM -0400, Bob Covill wrote:
>> Hello,
>> 
>> I have been looking into why nviz fails when loading a volume from the
>> command line (i.e. nviz vol=precip3d.500z50). This is the bug reported
>> in 
>> http://intevation.de/rt/webrt?serial_num=4725
>> 
>> It appears that the volume drawmode is not initialized which causes the
>> GUI to hang when loading the volume panel. The attached patch for
>> map_obj.c in nviz/src should fix this.
>> 
>> --
>> Bob
>> 
> 
>> --- map_obj.c 2006-11-16 12:22:16.000000000 -0400
>> +++ map_obj.c_bak 2006-11-16 12:21:56.000000000 -0400
>> @@ -437,6 +437,7 @@
>>      char const_string[] = "constant";
>>      char zero_string[] = "0";
>>      int new_id;
>> +    int mode;
>>      int *surf_list, num_surfs, i;
>>      Nv_clientData *new_data;
>>      int file_used = 0;
>> @@ -560,6 +561,7 @@
>>          return (TCL_ERROR);
>>      }
>>      new_id = GVL_new_vol();
>> +    mode = 0;
>>  
>>      /* See if there is a default file name specified */
>>      if ((argc >= 3) && (strncmp(argv[2], "name=", 5))) {
>> @@ -570,6 +572,9 @@
>>              return (TCL_ERROR);
>> }
>> file_used = 1;
>> +            mode |= DM_GOURAUD;
>> +     GVL_isosurf_set_drawmode(new_id, mode);
>> +            GVL_slice_set_drawmode(new_id, mode);
>>      }
>>  
>>      sprintf(id, "Nvol%d", new_id);
> 
>> _______________________________________________
>> grass-dev mailing list
>> grass-dev at grass.itc.it
>> http://grass.itc.it/mailman/listinfo/grass-dev
> 
> -- 
> Markus Neteler  <neteler itc it>  http://mpa.itc.it/markus/
> ITC-irst -  Centro per la Ricerca Scientifica e Tecnologica
> MPBA - Predictive Models for Biol. & Environ. Data Analysis
> Via Sommarive, 18        -       38050 Povo (Trento), Italy




More information about the grass-dev mailing list