Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

TCL(Tool Command Language) Scripting

FreeWrap and BWidget


I am having trouble creating a stand-alone application using FreeWrap.
I recently incorporated a ScrolledWindow (BWidget) into my Tcl code
and now the stand-alone executable can't "find" the BWidget package
(it works on a computer with Tcl installed but not on a computer
without Tcl). I have not been able to find a solution to my problem on
the Internet (I am an intermediate programmer so maybe the answer is
over my head). Can anybody help?

I am running ActiveTcl 8.4.12 and FreeWrap 6.2 on Windows 2000 and XP.
I am simply issuing the following FreeWrap command from the command
promp window: "freewrapPLUS bwidget.tcl", where bdwidget.tcl is my Tcl
code. Below is the simple bwidget.tcl code:

#
#Tcl/Tk script to test FreeWrap with BWidget
#
lappend auto_path /Tcl/lib/bwidget1.7
package require Tk
package require BLT
package require BWidget
catch {namespace import blt::*}
#
toplevel .manBox
#
#Define a ScrolledWindow BWidget
ScrolledWindow .manBox.sw
wm geometry .manBox 100x100
pack .manBox.sw -fill both -expand true
ScrollableFrame .manBox.sw.sf
.manBox.sw setwidget .manBox.sw.sf
#
set c1 [label .manBox.sw.sf.frame.c1_0 -text "Port #"]
set c2 [label .manBox.sw.sf.frame.c2_0 -text "Diff #"]
set c3 [label .manBox.sw.sf.frame.c3_0 -text "Port X"]
set c4 [label .manBox.sw.sf.frame.c4_0 -text "Diff Z"]
set c5 [label .manBox.sw.sf.frame.c5_0 -text "Port Z"]
#
grid $c1 -row 0 -column 1 -padx 10
grid $c2 -row 0 -column 2 -padx 10
grid $c3 -row 0 -column 3 -padx 10
grid $c4 -row 0 -column 4 -padx 10
grid $c5 -row 0 -column 5 -padx 10

OK, I with some more research I answered my own question. I basically
had to do two things:

(1) Add the -f option to the FreeWrap command line with a text file
containing the path to all the BWidget files. I guess this is
necessary so that FreeWrap can "wrap" the Bwidget files into the
executable.

(2) Add an newline to the "en.rc" file found in the BWidget directory
(/Tcl/lib/bwidget1.7/lang/en.rc). Just open the "en.rc" file in a text
editor and add an empty newline to the end of the file. This
eliminates the "missing newline on line 52" FreeWrap error.

So my FreeWrap command line looks like this:

freewrapPLUS bwidget.tcl -f bwidget.txt

where the file "bwidget.txt" contains the following:

c:\Tcl\lib\bwidget1.7\arrow.tcl
c:\Tcl\lib\bwidget1.7\bitmap.tcl
c:\Tcl\lib\bwidget1.7\button.tcl
c:\Tcl\lib\bwidget1.7\buttonbox.tcl
c:\Tcl\lib\bwidget1.7\bwidget.tap
c:\Tcl\lib\bwidget1.7\color.tcl
c:\Tcl\lib\bwidget1.7\combobox.tcl
c:\Tcl\lib\bwidget1.7\dialog.tcl
c:\Tcl\lib\bwidget1.7\dragsite.tcl
c:\Tcl\lib\bwidget1.7\dropsite.tcl
c:\Tcl\lib\bwidget1.7\dynhelp.tcl
c:\Tcl\lib\bwidget1.7\entry.tcl
c:\Tcl\lib\bwidget1.7\font.tcl
c:\Tcl\lib\bwidget1.7\init.tcl
c:\Tcl\lib\bwidget1.7\label.tcl
c:\Tcl\lib\bwidget1.7\labelentry.tcl
c:\Tcl\lib\bwidget1.7\labelframe.tcl
c:\Tcl\lib\bwidget1.7\listbox.tcl
c:\Tcl\lib\bwidget1.7\mainframe.tcl
c:\Tcl\lib\bwidget1.7\messagedlg.tcl
c:\Tcl\lib\bwidget1.7\notebook.tcl
c:\Tcl\lib\bwidget1.7\pagesmgr.tcl
c:\Tcl\lib\bwidget1.7\panedw.tcl
c:\Tcl\lib\bwidget1.7\panelframe.tcl
c:\Tcl\lib\bwidget1.7\passwddlg.tcl
c:\Tcl\lib\bwidget1.7\pkgIndex.tcl
c:\Tcl\lib\bwidget1.7\progressbar.tcl
c:\Tcl\lib\bwidget1.7\progressdlg.tcl
c:\Tcl\lib\bwidget1.7\scrollframe.tcl
c:\Tcl\lib\bwidget1.7\scrollview.tcl
c:\Tcl\lib\bwidget1.7\scrollw.tcl
c:\Tcl\lib\bwidget1.7\separator.tcl
c:\Tcl\lib\bwidget1.7\spinbox.tcl
c:\Tcl\lib\bwidget1.7\statusbar.tcl
c:\Tcl\lib\bwidget1.7\titleframe.tcl
c:\Tcl\lib\bwidget1.7\tree.tcl
c:\Tcl\lib\bwidget1.7\utils.tcl
c:\Tcl\lib\bwidget1.7\widget.tcl
c:\Tcl\lib\bwidget1.7\xpm2image.tcl
c:\Tcl\lib\bwidget1.7\lang\da.rc
c:\Tcl\lib\bwidget1.7\lang\de.rc
c:\Tcl\lib\bwidget1.7\lang\en.rc
c:\Tcl\lib\bwidget1.7\lang\es.rc
c:\Tcl\lib\bwidget1.7\lang\fr.rc

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc