|
From: Jeff H. <je...@Ac...> - 2005-01-24 23:20:40
|
> > If package Tk is not present at the time of [package require Tile
> > 0.5], then the Tile package will not be found. The index script(s)
> > above require the application to do:
> >
> > package require Tk 8.5
> > package require Tile 0.5
> >
> > in order. Since I cannot imagine any application that will use Tile
> > commands that would not also use Tk commands, I don't think this
> > limitation imposes any burden.
>
> OK, that answers my question. You are assuming that Tk is present.
>
> No problems - I agree that it isn't an undue burden. But it is a change
> from the current situation.
>
> What do others think?
I don't like it because you are forcing an error situation
every time that pkgIndex.tcl is hit. catch'es with errors
are actually expensive. I think it should avoid those
situations, instead being a bit more refined to not error
as much (same general code-path, just slightly different).
I'm not sure exactly what was intended from the original
design, but something more like:
if {[info tclversion] != 8.4} { return }
if {[package provide Tk] eq ""} { return }
....
Note that you can't use 'eq' in an expr before checking 8.4+
compatability.
Jeff
|