Re: [perl-win32-gui-users] Adding attributes to a Win32::GUI object (was: How to pass $_ to a subroutine)

2007-01-09 Thread Leif Andersson
Robert May wrote: > Recommended: Use the UserData() method - this is exactly what this > method is intended for: > > $object->UserData($whatever); # store scalar with object > my $w = $object->UserData(); # retrieve previously stored scalar Thank you very much. UserData() seems to be the way t

[perl-win32-gui-users] Adding attributes to a Win32::GUI object (was: How to pass $_ to a subroutine)

2007-01-08 Thread Leif Andersson
> But there is no GetName() method for the button object (or indeed any > Win32::GUI object). Slightly naughty, and I shouldn't be encouraging > this [1], but the object's name is stored in it's '-name' hash slot, so > you can replace: > print $self->GetName(), "\n"; > with > print

Re: [perl-win32-gui-users] [win32-gui] constants + OO + external file generates cleanup error message

2006-12-28 Thread Leif Andersson
Thank you Robert, Your explanation makes sense to me. I will search the archives for your work-arounds. And, by the way, the reason my posted code didn't work as advertised is that the first line of mainw.gui should read: $mainW = new Win32::GUI::DialogBox( Thanks again for the time and efforts

[perl-win32-gui-users] constants + OO + external file generates cleanup error message

2006-12-15 Thread Leif Andersson
I had the, maybe bad, idea of putting up a kind of "framework", so I could manage my windows definitions in external separate files. In its simplest form it works as expected: #!/usr/bin/perl -w use strict; use Win32::GUI qw(WS_SYSMENU); my $handle = do 'mainw.gui' ; $handle->Show; Win32::GUI::D