Skip to content

tcltk tkfilefind demo problem

2 messages · apjaworski@mmm.com, Peter Dalgaard

#
Hi everyone,

I wonder if anybody observed the crash of the tkfilefind demo.  I looked
into the code and it seems to crash executing

        dirtree<-tkwidget(base, "hierarchy_dir",
                          root=path,
                          showparent="Parent",
                          showfiles=1,
                          showall=all.names,
                          selectmode=if(multiple) "multiple" else "browse")

with the following error message

Error in structure(.External("dotTcl", ..., PACKAGE = "tcltk"), class
= "tclObj") :
        [tcl] megawidget initialization error: expected integer but got "
--1".


I have a fresh binary install of 1.7.0 on Win2000 machine.  I observed this
behavior with the Tcl library included with R and with ActiveTcl 8.4.2 I
just installed.  I think I have it set-up correctly: my TCL_LIBRARY and
MY_TCLTK both point to c:/Tcl where I installed ActiveTcl.  I also have
c:/Tcl/bin on my path - to avoid possible interference with cygwin Tcl I
have the following in my Rprofile:

      Sys.putenv("Path"="c:/Tcl/bin;c:/cygwin/bin")

I can run the other demos successfully.  I also just ran all the examples
posted recently by James Wettenhall with no problems.

Any comments will be welcome.  Thanks in advance,

Andy

__________________________________
Andy Jaworski
Engineering Systems Technology Center
3M Center, 518-1-01
St. Paul, MN 55144-1000
-----
E-mail: apjaworski at mmm.com
Tel:  (651) 733-6092
Fax:  (651) 736-3122
#
apjaworski at mmm.com writes:
I have two systems, both RH8 with RPM installs of R-1.7.0, and see a
similar error on only one of them... On the system where it breaks, it
works after changing directory, so I suspect the code is not resilient
to weird filenames (I found a "!lpr" file).

The tkfilefind demo is mainly a programming example of how to work
with larger pieces of Tcl code, not an instruction in how to select
files (tkgetOpenFile/tkgetSaveFile do that much better). If the bug is
actually in the internals of the not very good megawidget, I'd be
loath to spend time in trying to fix it. This could be a bug that
needs fixing in the veterinarian sense... (i.e. by removal of the
demo).