[GRASS5] NVIZ Compiling Error

After adding tkIntDecls8.4.h and tkInt8.4.h to
src.contrib/GMSL/NVIZ2.2/src
and updating
src.contrib/GMSL/NVIZ2.2/src/interface.h

it seems that NVIZ compiles now also with tcl/tk8.4.

Cheers

Markus

Dear List,

- Compiling NVIZ from grass cvs (HEAD) snapshot from 04-Oct-2002 on my
  linux now works with Tcl/Tk 8.4 and gcc version 3.2 -> grazie Markus !

but ...

Using NVIZ another problem appeared. All! functions work, but I get
error
messages setting height, zexag and perspective:

   invalid command name "tkCancelRepeat"
   invalid command name "tkCancelRepeat"
        while executing
   "tkCancelRepeat"
        (command bound to event)

Does anybody has a solution for this ?

thanks
  Otto

Otto Dassau wrote:

- Compiling NVIZ from grass cvs (HEAD) snapshot from 04-Oct-2002 on my
  linux now works with Tcl/Tk 8.4 and gcc version 3.2 -> grazie Markus !

but ...

Using NVIZ another problem appeared. All! functions work, but I get
error
messages setting height, zexag and perspective:

   invalid command name "tkCancelRepeat"
   invalid command name "tkCancelRepeat"
        while executing
   "tkCancelRepeat"
        (command bound to event)

Does anybody has a solution for this ?

tkCancelRepeat is a built-in command in Tcl/Tk 8.0 (and presumably up
to 8.3, as no-one else has reported this).

Unless we can determine that 8.4 has a replacement, we should define a
stub, e.g.

  if {[string length [info commands tkCancelRepeat]]} {} {
  proc tkCancelRepeat {} {}
  }

--
Glynn Clements <glynn.clements@virgin.net>

On Friday, October 11, 2002, at 11:42 AM, Glynn Clements wrote:

Otto Dassau wrote:
   invalid command name "tkCancelRepeat"
        while executing
   "tkCancelRepeat"
        (command bound to event)

Does anybody has a solution for this ?

tkCancelRepeat is a built-in command in Tcl/Tk 8.0 (and presumably up
to 8.3, as no-one else has reported this).

Unless we can determine that 8.4 has a replacement, we should define a
stub, e.g.

  if {[string length [info commands tkCancelRepeat]]} {} {
  proc tkCancelRepeat {} {}
  }

Greetings,

I have created a patch which fixes the problem. The screen is now automatically redrawn.

The solution "restores the existence of the Tk private command(s)". I came across it at:
  < http://www.tcl.tk/cgi-bin/tct/tip/44.html

*** old/widgets.tcl Mon Oct 14 23:51:42 2002
--- new/widgets.tcl Mon Oct 14 23:50:47 2002
***************
*** 248,255 ****
--- 248,264 ----

   #Bind For Re-Draw Surface
       bind $S.scale <Any-ButtonRelease> {+
+ if {![llength [info commands tkCancelRepeat]]} {
+ tk::unsupported::ExposePrivateCommand tkCancelRepeat
+ }
   tkCancelRepeat
+ if {![llength [info commands tkScaleEndDrag]]} {
+ tk::unsupported::ExposePrivateCommand tkScaleEndDrag
+ }
   tkScaleEndDrag %W
+ if {![llength [info commands tkScaleActivate]]} {
+ tk::unsupported::ExposePrivateCommand tkScaleActivate
+ }
   tkScaleActivate %W %x %y
   if {[Nauto_draw] == 1} {Ndraw_all} }

***************
*** 298,305 ****
--- 307,323 ----

   #Bind For Re-Draw Surface
   bind $S.scale <Any-ButtonRelease> {+
+ if {![llength [info commands tkCancelRepeat]]} {
+ tk::unsupported::ExposePrivateCommand tkCancelRepeat
+ }
   tkCancelRepeat
+ if {![llength [info commands tkScaleEndDrag]]} {
+ tk::unsupported::ExposePrivateCommand tkScaleEndDrag
+ }
   tkScaleEndDrag %W
+ if {![llength [info commands tkScaleActivate]]} {
+ tk::unsupported::ExposePrivateCommand tkScaleActivate
+ }
   tkScaleActivate %W %x %y
   if {[Nauto_draw] == 1} {Ndraw_all} }

Cheers,

Jeshua Lacock __________________________
Programmer/Owner Phone: 760.935.4736
http://OpenOSX.com Fax: 760.935.4845
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

Jeshua Lacock schrieb:

On Friday, October 11, 2002, at 11:42 AM, Glynn Clements wrote:

>> Otto Dassau wrote:
>> invalid command name "tkCancelRepeat"
>> invalid command name "tkCancelRepeat"
>> while executing
>> "tkCancelRepeat"
>> (command bound to event)?
>
> tkCancelRepeat is a built-in command in Tcl/Tk 8.0 (and presumably up
> to 8.3, as no-one else has reported this).
>
> if {[string length [info commands tkCancelRepeat]]} {} {
> proc tkCancelRepeat {} {}
> }

I have created a patch which fixes the problem. The screen is now
automatically redrawn.

   #Bind For Re-Draw Surface
       bind $S.scale <Any-ButtonRelease> {+
+ if {![llength [info commands tkCancelRepeat]]} {
+ tk::unsupported::ExposePrivateCommand tkCancelRepeat
+ }
   tkCancelRepeat
+ if {![llength [info commands tkScaleEndDrag]]} {
+ tk::unsupported::ExposePrivateCommand tkScaleEndDrag
+ }
   tkScaleEndDrag %W
+ if {![llength [info commands tkScaleActivate]]} {
+ tk::unsupported::ExposePrivateCommand tkScaleActivate
+ }
   tkScaleActivate %W %x %y
   if {[Nauto_draw] == 1} {Ndraw_all} }

thanks a lot for your help.

finally a mixture of your ideas seem to be
a solution. The automatic Re-Draw unfortunately does not work
- NVIZ compiles, but does not start.

adding this to the top of src.contrib/GMSL/NVIZ2.2/scripts/widgets.tcl
makes NVIZ work fine again!:

#######
if {![llength [info commands tkCancelRepeat]]} {
tk::unsupported::ExposePrivateCommand tkCancelRepeat
}
if {![llength [info commands tkScaleEndDrag]]} {
tk::unsupported::ExposePrivateCommand tkScaleEndDrag
}
if {![llength [info commands tkScaleActivate]]} {
tk::unsupported::ExposePrivateCommand tkScaleActivate
}
########

thanks again for your help.

  Otto

PS: If you have any solution for the automatic Re-Draw
error -> I could test your ideas -> errors are:

....
Error in startup script: can't read "S": no such variable
    while executing
"bind $S.scale <Any-ButtonRelease> {
if {![llength [info commands tkCancelRepeat]]} {
      tk::unsupported::ExposePrivateCommand tkCancelRepeat
}
i..."
    (file "/usr/local/grass5/etc/nviz2.2/scripts/widgets.tcl" line 11)
    invoked from within
"source /usr/local/grass5/etc/nviz2.2/scripts/widgets.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 $auto_index($name)"
    (procedure "auto_load" line 13)
    invoked from within
"auto_load $name [uplevel 1 {::namespace current}]"
    (autoloading "Nv_mkMenu")
    invoked from within
"Nv_mkMenu $Nv_(AREA).menu.file File {"Load State..." "Save State..."
"Load 3d Settings..." "Save 3d Settings..." "Image Dump..." "Reset"
"Quit" } {..."
    (procedure "Nv_makeGUI" line 59)
    invoked from within
"Nv_makeGUI .top"
    (file "/usr/local/grass5/etc/nviz2.2/scripts/nviz2.2_script" line
660)
child process exited abnormally
    while executing
"exec /usr/local/grass5/etc/nviz2.2/NVWISH2.2 -f
/usr/local/grass5/etc/nviz2.2/scripts/nviz2.2_script -q -name NVIZ

&@stdout"

    ("eval" body line 1)
    invoked from within
"eval exec $env(GISBASE)/etc/nviz2.2/NVWISH2.2 -f
$env(GISBASE)/etc/nviz2.2/scripts/nviz2.2_script $argv -name NVIZ

&@stdout"

    invoked from within
"if {$argv == ""} {
#no arguments
eval exec $env(GISBASE)/etc/nviz2.2/NVWISH2.2 -f
$env(GISBASE)/etc/nviz2.2/scripts/nviz2.2_script -name NVIZ >&@stdo..."
    (file "/usr/local/grass5/bin/nviz" line 16)

On Mon, Oct 14, 2002 at 11:57:34PM -0700, Jeshua Lacock wrote:

On Friday, October 11, 2002, at 11:42 AM, Glynn Clements wrote:

>> Otto Dassau wrote:
>> invalid command name "tkCancelRepeat"
>> invalid command name "tkCancelRepeat"
>> while executing
>> "tkCancelRepeat"
>> (command bound to event)
>>
>> Does anybody has a solution for this ?
>
> tkCancelRepeat is a built-in command in Tcl/Tk 8.0 (and presumably up
> to 8.3, as no-one else has reported this).
>
> Unless we can determine that 8.4 has a replacement, we should define a
> stub, e.g.
>
> if {[string length [info commands tkCancelRepeat]]} {} {
> proc tkCancelRepeat {} {}
> }

Greetings,

I have created a patch which fixes the problem. The screen is now
automatically redrawn.

The solution "restores the existence of the Tk private command(s)". I
came across it at:
  < http://www.tcl.tk/cgi-bin/tct/tip/44.html

*** old/widgets.tcl Mon Oct 14 23:51:42 2002
--- new/widgets.tcl Mon Oct 14 23:50:47 2002

[...]

Cheers,

Jeshua Lacock __________________________

I have applied this patch to CVS.

Markus