From: Glenn L. <pe...@ne...> - 2004-04-19 16:09:39
|
Thanks for the quick response... I'm off camping for the rest of the week but I'll play with this some when I get back. So one would think that an appropriate "untie" would be possible, to allow Window destruction. On approximately 4/19/2004 8:17 AM, came the following characters from the keyboard of Laurent ROCHER: > Hi, > > Yes, you right, i break TIED window property. > You can reactivate it by changing in _new methods : > my $self = tie %tier, $class, $oself; > By : > tie %tier, $class, $oself; > my $self = bless \%tier, $class; > > I mode this change when i want to add Window destruuction when undef a perl > window reference. > But, i have trouble when this feature is activated. > > You can replace hard coded window type constant by > Win32::GUI::constant("WIN32__GUI__DIALOG", 0). > > Laurent > > > >>Hi Laurent, >> >>I got the compile working with the new SDK variables set up. (Lots of >>other stuff going on, so slow progress. Nice to have CVS set up so I >>can easily pick up and compile the latest changes now). >> >>So my first step was to test the new GUI, with a functioning OEM script. >> It failed. >> >>Upon investigation, it seems that one used to be able to make a new window >> >> $mw = Win32::GUI::Window->new( -name => 'Main', ... ); >> >>and then add a button >> >> $but = $mw->AddButton( -name => 'b_nl', ..., -width => 24, ... ); >> >>And then do things like >> >> print "but-width: $but->{'-width'}\n"; >> >>and get back the 24. >> >>Now this always seemed very mysterious to me, because there was no data >>member of the hash referenced by $but named '-width'. However, when I >>had found the %TwoWayMethodMap in gui.pm which contained "-width" as one >>of the entries, I convinced myself that this "fashionable" but not >>understood technique was how the sort of print statement above could work. >> >>Unfortunately, the above code sequence doesn't work on the latest CVS >>version. The print statement just prints "but-width:" without the 24 :( >>So we need to decide if this is something we want to have keep working, >>so that we can stay "fashionable". >> >>Clearly, I could call Width() directly, but the borrowed code would need >>significant modification, because is uses many of the fashionable >>techniques! >> >>The item below is clearly an internal, but I am less sure whether the >>above behavior should be considered internal or external. >> >>So I also noticed that the object types got renumbered to remove the gap >>after WIN32__GUI__DIALOG ... some code I'd borrowed had also depended on >>that, but since it was just discriminating between WINDOW & DIALOG and >>"all the rest", I could simply change the "> 10" test to "> 1", and that >>works for all versions of Win32::GUI. >> > > > > > -- Glenn -- http://nevcal.com/ =========================== The best part about procrastination is that you are never bored, because you have all kinds of things that you should be doing. |