Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tkhtml and Displaying *simple* html

30 views
Skip to first unread message

jerry...@gmail.com

unread,
Apr 14, 2008, 12:05:41 PM4/14/08
to
Hi,
A long time ago I fiddled with the hv1.tcl program so I could source
the rascal
and show simple html...
After upgrading to 8.5.2 the html command seems to work differently...

Here is a fragment that seems to be at the center of the problem


***********************************************
# Construct the main HTML viewer
#
frame .dv.h
pack .dv.h -side top -fill both -expand 1
html .dv.h.h \
-padx 5 \
-pady 9 \
-fontcommand pickFont \
-formcommand FormCmd \
-imagecommand ImageCmd \
-scriptcommand ScriptCmd \
-appletcommand AppletCmd \
-underlinehyperlinks 1 \
-unvisitedcolor blue \
-bg beige -tablerelief raised \
-yscrollcommand {.dv.h.vsb set} \
-xscrollcommand {.dv.f2.hsb set}

# Pack the HTML widget into the main screen.
#
pack .dv.h.h -side left -fill both -expand 1
scrollbar .dv.h.vsb -orient vertical -command {.dv.h.h yview}
pack .dv.h.vsb -side left -fill y

frame .dv.f2
pack .dv.f2 -side top -fill x
frame .dv.f2.sp -width [winfo reqwidth .dv.h.vsb] -bd 2 -relief
raised
pack .dv.f2.sp -side right -fill y
scrollbar .dv.f2.hsb -orient horizontal -command {.dv.h.h xview}
pack .dv.f2.hsb -side top -fill x
*********************
On my linux box I get a runtime error on whatever the first arg is
to the html command ie "unknown option" ( in this case the -padx
option).

On the mac I get a dv.h.h is not defined error...

Anyone know what has changed? How can i fix
the rascal to show simple html from within my app?

Thanks jerry


Neil Madden

unread,
Apr 14, 2008, 1:46:34 PM4/14/08
to
jerry...@gmail.com wrote:
> Hi,
> A long time ago I fiddled with the hv1.tcl program so I could source
> the rascal
> and show simple html...
> After upgrading to 8.5.2 the html command seems to work differently...
>
...

> On my linux box I get a runtime error on whatever the first arg is
> to the html command ie "unknown option" ( in this case the -padx
> option).
>
> On the mac I get a dv.h.h is not defined error...
>
> Anyone know what has changed? How can i fix
> the rascal to show simple html from within my app?

Which version of Tkhtml are you using? Version 3 has made significant
API changes from version 2. A simple "package require Tkhtml 2" might be
sufficient for your needs.

-- Neil

Jerry Levan

unread,
Apr 14, 2008, 3:10:14 PM4/14/08
to
In article <KIWdnZkLY9vhBZ7V...@bt.com>,
Neil Madden <n...@cs.nott.ac.uk> wrote:

I am currently using Tkhtml 3, I nuked the previous release
so that 2.x is no longer available.

I looked at the Tkhtml doc at ActiveState and html seems to
have all of the parameters that my posted code shows...

Jerry

Neil Madden

unread,
Apr 14, 2008, 4:09:36 PM4/14/08
to

Is the Tkhtml 3 you have from ActiveTcl or did you install it yourself?
IIRC, last time I checked ActiveTcl still shipped with version 2. The
docs for Tkhtml 3 are at: http://tkhtml.tcl.tk/tkhtml.html and for
instance show no -padx/-pady options.

-- Neil

Jerry Levan

unread,
Apr 14, 2008, 5:43:43 PM4/14/08
to
In article <v-idnbtNJZifJ57V...@bt.com>,
Neil Madden <n...@cs.nott.ac.uk> wrote:

Neil,

Thanks for the pointer to the documentation... It is certainly
different from what I found up at activeState. (teacup
installed TKhtml 3).

It looks like I will have to kill the html presentation till
I can find some examples to help figure out how the module
works ;(

Jerry

Andreas Kupries

unread,
Apr 15, 2008, 3:04:56 AM4/15/08
to
Neil Madden <n...@cs.nott.ac.uk> writes:

> Is the Tkhtml 3 you have from ActiveTcl or did you install it
> yourself? IIRC, last time I checked ActiveTcl still shipped with
> version 2. The docs for Tkhtml 3 are at:
> http://tkhtml.tcl.tk/tkhtml.html and for instance show no -padx/-pady
> options.

The ActiveTcl 8.4 distributions ship with Tkhtml v2, and the
documentation is for hat version as well.

The Tkhtml in the public TEApot, accessible through the 'teacup'
however are v2 and v3.

% teacup list Tkhtml|grep linux-glibc2.3-ix86
package Tkhtml 2.0 linux-glibc2.3-ix86
package Tkhtml 3.0 linux-glibc2.3-ix86

--
So long,
Andreas Kupries <akup...@shaw.ca>
<http://www.purl.org/NET/akupries/>
Developer @ <http://www.activestate.com/>
-------------------------------------------------------------------------------

Jerry Levan

unread,
Apr 15, 2008, 8:52:36 AM4/15/08
to
In article <87lk3fz...@bluepeak.andreas.kupries.org>,
Andreas Kupries <akup...@shaw.ca> wrote:

> Neil Madden <n...@cs.nott.ac.uk> writes:
>
> > Is the Tkhtml 3 you have from ActiveTcl or did you install it
> > yourself? IIRC, last time I checked ActiveTcl still shipped with
> > version 2. The docs for Tkhtml 3 are at:
> > http://tkhtml.tcl.tk/tkhtml.html and for instance show no -padx/-pady
> > options.
>
> The ActiveTcl 8.4 distributions ship with Tkhtml v2, and the
> documentation is for hat version as well.
>
> The Tkhtml in the public TEApot, accessible through the 'teacup'
> however are v2 and v3.
>
> % teacup list Tkhtml|grep linux-glibc2.3-ix86
> package Tkhtml 2.0 linux-glibc2.3-ix86
> package Tkhtml 3.0 linux-glibc2.3-ix86

Thanks for the tip Andreas...

I teacup'ed version 2 and probed for version 2 in my app and
my html help viewer is working again...

Any chance y'all will add the hv3 viewer to teapot?

Jerry

0 new messages