Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

TCL(Tool Command Language) Scripting

tk8.5a: namespace import ::ttk::* no longer works


Hello,

since 8.5a5 ttk (aka tile) is part of the tk core.  But the widget
constructors are no longer exported from the ttk namespace. Is this by
intention?

Uwe Koloska

koloska wrote:
> since 8.5a5 ttk (aka tile) is part of the tk core.  But the widget
> constructors are no longer exported from the ttk namespace. Is this by
> intention?

Suggested workaround: use [namespace path] to make ::ttk be one of the
namespaces that Tcl searches for commands.

Donal.

On 26 Mai, 00:43, "Donal K. Fellows"

<donal.k.fell@manchester.ac.uk> wrote:
> Suggested workaround: use [namespace path] to make ::ttk be one of the
> namespaces that Tcl searches for commands.

Wow -- just another nice thing about 8.5 I've had to learn ;-)

My current workaround is to explicitly export the needed contructors
-- cause [namespace path] will reveal *all* commands from the ttk-
namespace and not only the contructors.

So my question stands, wether this is intentionally or an error that
has to be reported.

Uwe

> So my question stands, wether this is intentionally or an error that
> has to be reported.

My understanding is that it's intentional.  See
http://tktable.sourceforge.net/tile/doc/converting.txt, which states
in part:

    IMPORTANT NOTE: Previous versions of this document suggested
using 'namespace import -force ttk::*' at global scope, for the
really adventurous.  This is now considered a Really Bad Idea:
it will cause many things to break, and will cause more things
to break in the future.  So don't do that anymore.

On 26 Mai, 08:55, Aric Bills <aric.bi@gmail.com> wrote:

> My understanding is that it's intentional.  Seehttp://tktable.sourceforge.net/tile/doc/converting.txt, which states
> in part:

>     IMPORTANT NOTE: Previous versions of this document suggested
> using 'namespace import -force ttk::*' at global scope, for the
> really adventurous.  This is now considered a Really Bad Idea:
> it will cause many things to break, and will cause more things
> to break in the future.  So don't do that anymore.

No, this says what has been suggested before was a bad idea, cause it
overwrites at global level all widget constructors -- and thus breaks
most of or all of the standard dialogs.  But the suggested way (even
in the quoted document) is (was?)

  If you're feeling adventurous, you can try:

     namespace import ttk::*

  in your application's namespace(s) to locally override all
  the widget construction commands (button, scrollbar, etc).

And this is what I tried.  But the 'namespace export' for all widget
constructors is gone.  It was in 'tile.tcl' but is not present in
'ttk.tcl'.

Uwe

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc