Re: [tcltk-perl] create_widget_package questions ...
Brought to you by:
hobbs
From: Vadim K. <va...@ar...> - 2004-04-20 20:51:07
|
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. ----- Original Message ----- From: "Jeff Hobbs" <je...@ac...> To: "'Vadim Konovalov'" <va...@ar...> Cc: <tcl...@li...>; "'Jan Dubois'" <Ja...@ac...> Sent: Wednesday, April 21, 2004 12:39 AM Subject: [tcltk-perl] create_widget_package questions ... > 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 > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Tcltk-perl mailing list > Tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcltk-perl > > > |