Mod /
Faq
Search:  


1.  A Tod object call to a subnamespace fails

The _ variable must be defined before calling Mod export. eg.

namespace eval ::foo::sub1 {
   variable _
   array set _ {}
   Mod export
   # ...
}

2.  Does GUI Support Conditionals

Yes, by using eval.

{Toplevel + -title "Simple Editor"} {    

    {Text} {}
    {Frame + -pos _ -subpos l} {
        Button Quit
        eval {
            if {$tcl_version>8.3 && !$pp(-use83)} {
                return {{Spinbox - -id status -pos *l} {}}
            } else {
                return {{Entry - -id status -pos *l} {}}
            }
        }
    }
}

© 2008 Peter MacDonald

Page last modified on September 14, 2010, at 05:06 PM