Re: "package require BWidgets" starkit fails under tclkit86b1, succeeds under tclkit858

dburns <[email protected]> Mon, 22 Mar 2010 11:51:09 -0700 (PDT)
Newsgroups gmane.comp.lang.tcl.starkit
Message-ID <09dad344-41b5-4bd9-b62e-fafbbdbea75e@y17g2000yqd.googlegroups.com>
I have analyzed this problem further, and come to the conclusion that
BWidgets is "fine", the problem lies in accessing and reading the
"en.rc" file within BWidgets by the "option readfile" command when
BWidgets has been wrapped in a starkit.

The supporting facts:
- Doing a "package require BWidgets" on a raw (not 'starkitted')
source of BWidgets-1.9.0 works fine for both of Pat Thoyt's tcl8.5.8
and tcl86b1 interpreters.
- By using the latest "sdx" of this date ("sdx-20100310.kit" running
in Pat's tcl858.exe) to wrap a "main.tcl" file containing:
---------------
package require starkit
starkit::startup
console show ; update
set f [file join "$starkit::topdir" en.rc]
option read "$f"
update
puts stdout "option read is finished."
---------------

along with the unmodified "en.rc" file from the "lang" subdirectory of
the BWidgets-1.9.0 distribution in a "vfs" directory named "u.vfs"
containing at the toplevel only:

+++++
main.tcl
en.rc
+++++

the problem occurs when running
"tclkit86b1.exe u"
and does NOT occur when running
"tclkit858.exe u"

However, as an "Added Interesting Sidelight", if the "en.rc" file is
modified by
1) Removing the first hyphen from line 50 (counting lines from 1) and
2) Adding a ^Z character at the end of the file,
thereby producing a file of exactly the same length, rewrapping and re-
running...

"tclkit858.exe u" gives error:
missing colon on line 53 while executing
"option read "$f"

while
"tclkit86b1.exe u" gives the same error reported below.

Each of these tclkit executables is the full windows metakit version
of "tclkit"


On Mar 8, 12:58 am, dburns <[email protected]> wrote:
> With this "main.tcl" code in the subdirectory of "t.vfs" on a windows
> XP SP3 platform...
>
> --------
> package require starkit
> starkit::startup
> console show ; update
> puts stdout "package require BWidget: [package require BWidget]"
> --------
>
> ...and built with "sdx wrap t" from the directory above so the entire
> "t.vfs" tree looks like:
>
> t.vfs\
>     main.tcl
>     lib\
>         BWidget-1.9.0\
>           <contents of BWidget Zip file as fetched from SF>
>
> Under 8.5.8, I get:
>  % source t
> package require BWidget: 1.9
>
> Under 8.6b1, I get:
> error seeking to end of file "<tree-elided>/t/lib/BWidget-1.9.0/lang/
> en.rc":invalid argument while executing
> "option read [file join $::BWIDGET::LIBRARY "lang" "en.rc"]"
> (file "<tree-elided>/t/lib/BWidget-1.9.0/init.tcl" line 32)
> invoked from within
> "source {<tree-elided>/t/lib/BWidget-1.9.0/init.tcl"
>   ("package ifneeded BWidget 1.9" script)
>   invoked from within
> "package required BWidget"
>   invoked from within
> "puts stdout "package required BWidget:[package require BWidget]""
> ....

-- 
You received this message because you are subscribed to the "starkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/starkit?hl=en

To unsubscribe from this group, send email to starkit+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.