|
From: Brian G. <bgr...@mo...> - 2005-01-25 00:32:27
|
Jeff Hobbs wrote:
> 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.
>
>
You also shouldn't use floating point number comparison on a string that
isn't really a floating point number.
if {![string equal [info tclversion] "8.4"]} ...
-Brian
--
-------------------------------------------------------------
-- Model Technology Inc. --
-- 8005 SW Boeckman Road 503.685.7000 tel --
-- Wilsonville, OR 97070 USA 503.685.0921 fax --
-------------------------------------------------------------
-- Technical support ............ mailto:su...@mo... --
-- Sales and marketing info ....... mailto:sa...@mo... --
-- Licensing .................... mailto:li...@mo... --
-- Home Page ........................ http://www.model.com --
-- AIM ........................................ bgriffin42 --
-------------------------------------------------------------
|