From: Georgios Petasis on
στις 1/6/2010 21:47, O/H Csaba Nemethi έγραψε:
> While one can make sure that Tk cannot find any older tile versions, and
> (alternatively/additionally) that "package require tile" doesn't get
> invoked when the Tk version is 8.5 or later, I still fail to understand
> how an *older* tile engine can override the built-in one, which in this
> case is guaranteed to be the *most recent* one. This behavior is
> totally different from the common package loading mechanism, where an
> already loaded package cannot be overridden by an older version of the
> same package. *Isn't this a bug in Tk?*
>

I think this is easy: the included in Tk package has been renamed to
Ttk. So, the presence of Ttk does not suggest to Tcl that tile cannot be
loaded. So, the tile package that gets loaded is not an older version of
the Ttk package, it is a different package.

George
From: Csaba Nemethi on
Am 01.06.2010 20:58, schrieb Georgios Petasis:
> στις 1/6/2010 21:47, O/H Csaba Nemethi έγραψε:
>> While one can make sure that Tk cannot find any older tile versions, and
>> (alternatively/additionally) that "package require tile" doesn't get
>> invoked when the Tk version is 8.5 or later, I still fail to understand
>> how an *older* tile engine can override the built-in one, which in this
>> case is guaranteed to be the *most recent* one. This behavior is
>> totally different from the common package loading mechanism, where an
>> already loaded package cannot be overridden by an older version of the
>> same package. *Isn't this a bug in Tk?*
>>
>
> I think this is easy: the included in Tk package has been renamed to
> Ttk. So, the presence of Ttk does not suggest to Tcl that tile cannot be
> loaded. So, the tile package that gets loaded is not an older version of
> the Ttk package, it is a different package.
>
> George

You are right, but wouldn't it be possible to instruct Tcl to view the
built-in Ttk "package" within Tk at the same time as tile package? This
would automatically prevent any older tile version from being loaded. I
think this could be done with a small patch of the Tcl or Tk code.

--
Csaba Nemethi http://www.nemethi.de mailto:csaba.nemethi(a)t-online.de

From: Jeff Hobbs on
On Jun 1, 2:17 pm, Csaba Nemethi <csaba.neme...(a)t-online.de> wrote:
> Am 01.06.2010 20:58, schrieb Georgios Petasis:
> > στις 1/6/2010 21:47, O/H Csaba Nemethi έγραψε:
> >> While one can make sure that Tk cannot find any older tile versions, and
> >> (alternatively/additionally) that "package require tile" doesn't get
> >> invoked when the Tk version is 8.5 or later, I still fail to understand
> >> how an *older* tile engine can override the built-in one, which in this
> >> case is guaranteed to be the *most recent* one.  This behavior is
> >> totally different from the common package loading mechanism, where an
> >> already loaded package cannot be overridden by an older version of the
> >> same package.  *Isn't this a bug in Tk?*
>
> > I think this is easy: the included in Tk package has been renamed to
> > Ttk. So, the presence of Ttk does not suggest to Tcl that tile cannot be
> > loaded. So, the tile package that gets loaded is not an older version of
> > the Ttk package, it is a different package.
>
> You are right, but wouldn't it be possible to instruct Tcl to view the
> built-in Ttk "package" within Tk at the same time as tile package?  This
> would automatically prevent any older tile version from being loaded.  I
> think this could be done with a small patch of the Tcl or Tk code.

8.5+ has actually defined a 'tile' package in the core, v0.8.0. This
was to prevent older versions of tile loading. Since then however,
tile has moved beyond that version, so what you actually get are
_newer_ tile versions that aren't 100% compatible to the core Ttk.
While the C side is ok because symbols were renamed, some of the Tcl-
level names remain the same and can be overwritten.

I would argue that now is the time to disambiguate tile from Ttk at
the Tcl level. This would be an incompatibility for tile users, but
this could be handled with a tile major version shift. Users of tile
v1+ could then more happily coexist with core Ttk. That would be up
to Joe English though, as the tile maintainer. It is a little
backwards (Ttk coopting all the Tcl references), but it helps for
those that had grown used to tile, but now want Ttk (which I think
most are), while disambiguating issues for tile bleeding edge users
(the few?).

Jeff
From: Georgios Petasis on
στις 3/6/2010 21:48, O/H Jeff Hobbs έγραψε:
> On Jun 1, 2:17 pm, Csaba Nemethi<csaba.neme...(a)t-online.de> wrote:
>> Am 01.06.2010 20:58, schrieb Georgios Petasis:
>>> στις 1/6/2010 21:47, O/H Csaba Nemethi έγραψε:
>>>> While one can make sure that Tk cannot find any older tile versions, and
>>>> (alternatively/additionally) that "package require tile" doesn't get
>>>> invoked when the Tk version is 8.5 or later, I still fail to understand
>>>> how an *older* tile engine can override the built-in one, which in this
>>>> case is guaranteed to be the *most recent* one. This behavior is
>>>> totally different from the common package loading mechanism, where an
>>>> already loaded package cannot be overridden by an older version of the
>>>> same package. *Isn't this a bug in Tk?*
>>
>>> I think this is easy: the included in Tk package has been renamed to
>>> Ttk. So, the presence of Ttk does not suggest to Tcl that tile cannot be
>>> loaded. So, the tile package that gets loaded is not an older version of
>>> the Ttk package, it is a different package.
>>
>> You are right, but wouldn't it be possible to instruct Tcl to view the
>> built-in Ttk "package" within Tk at the same time as tile package? This
>> would automatically prevent any older tile version from being loaded. I
>> think this could be done with a small patch of the Tcl or Tk code.
>
> 8.5+ has actually defined a 'tile' package in the core, v0.8.0. This
> was to prevent older versions of tile loading. Since then however,
> tile has moved beyond that version, so what you actually get are
> _newer_ tile versions that aren't 100% compatible to the core Ttk.
> While the C side is ok because symbols were renamed, some of the Tcl-
> level names remain the same and can be overwritten.
>
> I would argue that now is the time to disambiguate tile from Ttk at
> the Tcl level. This would be an incompatibility for tile users, but
> this could be handled with a tile major version shift. Users of tile
> v1+ could then more happily coexist with core Ttk. That would be up
> to Joe English though, as the tile maintainer. It is a little
> backwards (Ttk coopting all the Tcl references), but it helps for
> those that had grown used to tile, but now want Ttk (which I think
> most are), while disambiguating issues for tile bleeding edge users
> (the few?).
>
> Jeff

I am a little surprised that tile gets still developed. Wasn't ttk in
the core the successor of tile?

George