From: AndreasK on
On May 30, 2:04 pm, Georgios Petasis <peta...(a)iit.demokritos.gr>
wrote:
> στις 21/5/2010 02:29, O/H AndreasK έγραψε:
>
> > ActiveState is pleased to announce the release of ActiveTcl 8.6.0.0
> > Beta 3, a beta release of the complete, ready-to-install Tcl
> > distribution for Windows, Mac OS X, Linux, Solaris, AIX and HP-UX;
> > based on the Tcl/Tk 8.6b1.2 core.
>
> I think there is a conflict in the Thread package:
>
> Main console display active (Tcl8.6b1.2 / Tk8.6b1.2)
> (petasis) 49 % package ifneeded Thread 2.6.5
> thread_load C:/TclApps/Tcl/lib/tcl8.6/thread2.6.5
> (petasis) 50 % package ifneeded Thread 2.6.6
> thread_load c:/tclapps/tcl/lib/teapot/package/win32-ix86/lib/Thread2.6.6
> (petasis) 51 % package require Thread
> couldn't load library
> "c:/tclapps/tcl/lib/teapot/package/win32-ix86/lib/Thread2.6.6/thread265.dll":
> this library or a dependent library could not be found in library path
> (petasis) 52 % info body thread_load
>
>          load [file join $dir thread265.dll]
>          rename thread_load {}
>
> (petasis) 53 %
> (petasis) 54 % cd
> {C:\TclApps\Tcl\lib\teapot\package\win32-ix86\lib\Thread2.6.6}
> (Thread2.6.6) 55 % load ./thread266.dll
> (Thread2.6.6) 56 % package req Thread
> 2.6.6
> (Thread2.6.6) 57 %
>
> I think that the problem is in the re-definition of thread_load.

Checking the package index in the sources of Thread I have to agree.
Multiple versions of Thread will overwrite each other's thread_load
procedure, allowing for version mismatches to occur, i.e. 2.6.6
actually loading 2.6.5. because that index was read last, per chance.

> Perhaps
> the version should be also be an argument?

In this case the command is so simple that it can be the whole
ifneeded script on its own, without and procedure at all. That is
pretty much the standard for binary packages and it is not clear to me
why Thread deviates.

In the case of more complex load code (like for TTrace below) a
procedure is a necessary eval, at least before we had ::apply (TIP
194). There having the version number or whatever is changing between
version as argument is IMHO the best way of doing things, i.e.
multiple versions still overwrite their procedures, but always with
identical code.

With 8.5+ and ::apply on the other we can separate all version
properly. Wrap the code into a lambda, no need for polluting the
command namespace, yet still complex code, and a local variable scope,
without quoting hell.

I will now endeavor to cleanup the Thread package index.


Andreas
From: Csaba Nemethi on
Am 31.05.2010 16:41, schrieb Georgios Petasis:
> στις 28/5/2010 22:42, O/H Csaba Nemethi έγραψε:
>> Am 28.05.2010 19:18, schrieb Georgios Petasis:
>>> στις 21/5/2010 02:29, O/H AndreasK έγραψε:
>>>> ActiveState is pleased to announce the release of ActiveTcl 8.6.0.0
>>>> Beta 3, a beta release of the complete, ready-to-install Tcl
>>>> distribution for Windows, Mac OS X, Linux, Solaris, AIX and HP-UX;
>>>> based on the Tcl/Tk 8.6b1.2 core.
>>>
>>> I have just upgraded, and tablelist_tile (obtained through teacup) does
>>> not seem to use ttk (or tile) widgets. It looks strange...
>>>
>>> And the problem of tile still getting loading (despite the fact that I
>>> don't have "package require tile" in my code) is still alive...
>>>
>>> George
>>
>> I have just installed ActiveTcl 8.6.0.0 Beta 3 on Linux. The
>> distribution includes the last stable version 4.12.1 of the Tablelist
>> package. For me it works as expected, I couldn't reproduce any of your
>> problems.
>>
>> As promised by Jeff a few weeks ago, the file
>>
>> lib/teapot/package/tcl/teapot/tcl8/8.4/tablelist_tile-4.12.1.tm
>>
>> no longer loads tile if not needed, and I can confirm that tile is not
>> loaded, indeed.
>>
>> I suspect that something is wrong with your ActiveTcl installation.
>> Also, I don't see any reason for using teacup, because, as said, you
>> automatically get the latest stable Tablelist version (4.12.1) if you
>> install ActiveTcl 8.6.0.0 Beta 3.
>>
>
> Dear Csaba,
>
> I am still searching for the problem: it seems to be dependencies among
> packages in ActiveTcl. I usually issue a "teacup update" just after
> every install. I am not sure if this is a good or a bad thing yet :-)
>
> So, here is the problem I am facing: I have an app that does some stuff,
> which never calls "package require tile".
>
> Starting up the application and showing a tablelist widget, works just
> fine:
>
> http://www.ellogon.org/~petasis/tcl/Images/bugs/tile/tablelist-ok.png
>
> In this image, there are 2 tablelist widgets (on the window left side),
> which are drawn correctly.
>
> Then, if I choose to annotate something, the following happens:
>
> 1) Tile gets loaded. This has a visual effect on labels (smaller font is
> used) and scrollbars (they get thinner).
>
> 2) The new window that opens, has tablelist widgets that are not drawn
> correctly:
>
> http://www.ellogon.org/~petasis/tcl/Images/bugs/tile/tablelist-ok-not-ok.png
>
>
> (you can see the tablelist widget on the bottom right corner of the
> window on top - Id & Value are simple square boxes).
>
> Closing the app, and restarting it, having as its first line "package
> require tile" (yes I know, obsolete in 8.6...), I get this:
>
> http://www.ellogon.org/~petasis/tcl/Images/bugs/tile/tablelist-ok-ok.png
>
> Consistent look of all tablelist widgets. The same happens if I add
> "package provide tile 2.0" as the first line in the app.
>
> It seems that this behaviour occurs when at least a tablelist widget has
> been created, and then tile gets loaded afterwards. Then any tablelist
> widget created after tile was loaded will not be drawn correctly.
>
> I think that is not a tablelist problem, but a problem of tile being
> loaded in Tk 8.6. I will check for the package that does that...
>
> Regards,
>
> George

Hi George,

I am pretty sure that you have the following problem:

Whatever scripts you use for annotation, some of them loads an older
tile version without explicit support for the vista theme. After that
you create a tablelist widget. The Tablelist package uses Ttk style
elements for displaying the header labels. However, the old tile
version that got loaded interferes with the built-in tile engine of Tk,
giving rise to the incorrect rendering of the header labels.

For example, if you load tile 0.7.8 and then create a tile-based
tablelist widget, then the header labels will look like in your 2nd
screenshot (I have just tested this).

Please make sure that your Tcl/Tk installation cannot "see" any old tile
version without explicit support for the vista theme. Alternatively,
find out which one of your scripts invokes an explicit "package require
tile" and remove this command from the script in question.

Best regards

Csaba

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

From: George Petasis on
στις 31/5/2010 11:08 μμ, O/H Csaba Nemethi έγραψε:
> Alternatively,
> find out which one of your scripts invokes an explicit "package require
> tile" and remove this command from the script in question.
>

Dear Csaba,

I have found the package that loads tile, is widget::scrolledwindow.
Doing a simple "package require widget::scrolledwindow" results in tile
being loaded:

C:\Tcl\lib\teapot\package\tcl\teapot\tcl8\8.4\widget\scrolledwindow-1.2.tm

package provide widget::scrolledwindow 1.2
package require widget
package require tile

It seems that almost all widget::* packages just issue a package require
tile.
I hope that we find a way to fix them, as loading tile in 8.5+ is a
little bit adventurus...

Best regards,

George
From: Jeff Hobbs on
On May 31, 4:10 pm, George Petasis <petas...(a)yahoo.gr> wrote:
> στις 31/5/2010 11:08 μμ, O/H Csaba Nemethi έγραψε:
> > Alternatively,
> > find out which one of your scripts invokes an explicit "package require
> > tile" and remove this command from the script in question.
>
> I have found the package that loads tile, is widget::scrolledwindow.
> Doing a simple "package require widget::scrolledwindow" results in tile
> being loaded:
...
> It seems that almost all widget::* packages just issue a package require
> tile.

Ah, thanks for the analysis. I'll update the widget packages to
qualify the use of package require tile.

> I hope that we find a way to fix them, as loading tile in 8.5+ is a
> little bit adventurus...

Yes, this wasn't the case for quite a while, then things started to
diverge again. I wish they didn't (and it's not always clear why they
do, especially in visually striking incompatible ways), but that's dev
for you.

Jeff
From: Csaba Nemethi on
Am 01.06.2010 18:39, schrieb Jeff Hobbs:
> On May 31, 4:10 pm, George Petasis <petas...(a)yahoo.gr> wrote:
>> στις 31/5/2010 11:08 μμ, O/H Csaba Nemethi έγραψε:
>>> Alternatively,
>>> find out which one of your scripts invokes an explicit "package require
>>> tile" and remove this command from the script in question.
>>
>> I have found the package that loads tile, is widget::scrolledwindow.
>> Doing a simple "package require widget::scrolledwindow" results in tile
>> being loaded:
> ...
>> It seems that almost all widget::* packages just issue a package require
>> tile.
>
> Ah, thanks for the analysis. I'll update the widget packages to
> qualify the use of package require tile.
>
>> I hope that we find a way to fix them, as loading tile in 8.5+ is a
>> little bit adventurus...
>
> Yes, this wasn't the case for quite a while, then things started to
> diverge again. I wish they didn't (and it's not always clear why they
> do, especially in visually striking incompatible ways), but that's dev
> for you.
>
> Jeff

It is always a potentially bad idea to invoke "package require tile"
from within Tk 8.5 or later, for the following reason:

If you have an older tile version then the "package require tile"
command will load it (if it can "see" it) and several Ttk-related things
will no longer be performed by the built-in tile engine of Tk but by
that older one. George seems to have exactly this problem: Some older
tile version gets loaded and overrides the built-in one. That older
tile engine doesn't support the vista theme, thus giving rise to some
unexpected visual effects related to that theme.

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?*

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

First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4
Prev: ActiveTcl 8.5.8.2 released
Next: st<ring trimleft and xml