[tcltk-perl] create_widget_package questions ...
Brought to you by:
hobbs
From: Jeff H. <je...@ac...> - 2004-04-20 20:40:04
|
Vadim, I have a few questions about create_widget_package design, or rather one question with multiple facets. The AUTOLOAD stuff basically all points to Tcl::Tk::Widget::AUTOLOAD as the autoloader of choice. The problem I am having with "method inheritance" changes is as follows ... A DialogBox is really a Toplevel with extra methods. As you noted, all the special stuff used to be created in the same Tcl::Tk::Widget package, which isn't really desirable. I like that the creation of the first DialogBox creates Tcl::Tk::Widget::DialogBox and creates the special methods as subs of that package. The problem comes when I run something like the DialogBox sample I sent earlier, where 'resizable' must be autoloaded. Since a DialogBox used to be a Tcl::Tk::Widget object, we would AUTOLOAD with $method eq "resizable", and it would be found in ptk2tcltk_wm. Now however $method eq "DialogBox::resizable", and it isn't found. It seems that we can't blindly strip to the base method name in all cases, but we do for some. Do you have any good ideas at how to handle this change in behavior? Thanks, Jeff |