Re: [tcltk-perl] create_widget_package questions ...
Brought to you by:
hobbs
From: Vadim K. <va...@ar...> - 2004-04-20 21:11:34
|
> > Once you'll insert DialogBox entry into %ptk2tcktk hash, all > > its methods will be autoloaded as usual, because of > > > > $method =~ > > s/^(Tcl::Tk::Widget::((MainWindow|$ptk_w_names)::)?)//o or > > die "weird inheritance ($method)"; > > > > .... and DialogBox will be stripped out, because it will be > > inside $ptk_w_names string. > > I see ... so the create_widget_package should be completed > to add the info into %ptk2tcltk and update $ptk_w_names? Indeed, you're right. I forgot to populate dynamically that hash, but I was used to think about it as some constant hash that could not be changed. And must not forget to remove that tranling "o" in s///o operator. But, after you said all that, probably AUTOLOAD should just analyze method slightly differently: remove leading Tcl::Tk::Widget, then see if it has /^(\w+)::/ after that, and then see how to process remaining method. OTOH MultipleWidget could be used as alternate way... sometimes simplier way, I think... BTW, once you're at this, it could be reasonable to invent a way to communicate with widgets like blt::graph, widgets that in Tcl have package specifier... (But this is way unnecessary right now) |