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

2007-01-08 Thread Robert May
Leif Andersson wrote: 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

[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] How to pass $_ to a subroutine

2007-01-08 Thread Robert May
Perl Rob wrote: [slightly edited] foreach ( @button_names ) { my ($name) = $_; $main->AddButton( -name=> $name, -text=> $name, -onClick => sub { Button_Clicked ( $name ) }, ... ); } sub Button_

Re: [perl-win32-gui-users] Writing ActiveX modules in perl?

2007-01-08 Thread Jonathan Epstein
ActiveState provides commercial tools to do this, PerlCOM and PerlCtrl. And here are some Perl links: http://ftp.activestate.com/unsupported/PDK/release.htm http://www.mkssoftware.com/docs/man5/perlcom.5.asp http://burningbird.net/devaspcomp/bonus/perl.htm http://www.foo.be/docs/tpj/issue

Re: [perl-win32-gui-users] How to pass $_ to a subroutine

2007-01-08 Thread Perl Rob
If you specify -onClick, aren't you using the NEM? At any rate, Steve was exactly right: I had to assign the name of the button to a temp variable and use a closure. Thank you so much Steve!!! I could have written your other post verbatim (I'm surprised I couldn't find it with all my searching). I

Re: [perl-win32-gui-users] Writing ActiveX modules in perl?

2007-01-08 Thread Jan Dubois
On Mon, 08 Jan 2007 17:03:45 +, Steve Loughran <[EMAIL PROTECTED]> wrote: >Is it relatively easy to do with the AS dev kit? Are there any online >help/FAQs about it? or will I be taking a trip to the local bookstore to >get some AX books (and convert back into perl code :) ) The PDK include

Re: [perl-win32-gui-users] Writing ActiveX modules in perl?

2007-01-08 Thread Steve Loughran
Is it relatively easy to do with the AS dev kit? Are there any online help/FAQs about it? or will I be taking a trip to the local bookstore to get some AX books (and convert back into perl code :) ) Steve Jason Plum wrote: With the ActiveState Perl Dev Kit, yes, it is possible to make stanadl

Re: [perl-win32-gui-users] Writing ActiveX modules in perl?

2007-01-08 Thread Jason Plum
With the ActiveState Perl Dev Kit, yes, it is possible to make stanadlone ActiveX objects for other programs uses :) Jason P Steve Loughran wrote: Slightly off-topic, but is it possible to write standalone (dll or ocx) ActiveX modules in win32 perl? (And I dont mean show them in perl using AX

[perl-win32-gui-users] Writing ActiveX modules in perl?

2007-01-08 Thread Steve Loughran
Slightly off-topic, but is it possible to write standalone (dll or ocx) ActiveX modules in win32 perl? (And I dont mean show them in perl using AXWindow). Or should I just stick with VB6 for that? Any helpful hints or tips would be gratefully received, especially from anyone who has actually d

Re: [perl-win32-gui-users] Multi threaded Win32: :GUI app and the DBI (DBD: :mysql)

2007-01-08 Thread Charles Alderman
Wow, I didn't realize my perl was so out of date. I thought I'd installed the latest version this June, but it turns out I had a 2+ year old version. So, the easy solution is to install 5.8.8. That fixes the DBI, threads issue. Thanks, Charles Alderman Quoting [EMAIL PROTECTED]: Hi,

Re: [perl-win32-gui-users] a newbie's question

2007-01-08 Thread Geoffrey Spear
Without seeing your code, I'd assume that you're opening the file outside of the "Run" subroutine and just reading the data in that subroutine. If this is the case, what you want to do is open the file at the start of the subroutine, read the data, then close the file at the end of the subroutine

Re: [perl-win32-gui-users] How to pass $_ to a subroutine

2007-01-08 Thread jez_white
Silly question, but why don't you use the NEM? Cheers, Jeremy. -Original Message- From: "Perl Rob" <[EMAIL PROTECTED]> To: "Win32 GUI Users Mailing List" Sent: 08/01/07 08:06 Subject: [perl-win32-gui-users] How to pass $_ to a subroutine Hi all, Are you ready for this one? :) Let's s

Re: [perl-win32-gui-users] How to pass $_ to a subroutine

2007-01-08 Thread Steve Loughran
kind of been there, done that, banged my head against it for several hours :) I assigned the "name" to a temp variable, and used that my $name = $configdata{name}; then used -onClick => Button_Clicked($name) http://sourceforge.net/mailarchive/message.php?msg_id=14457436 Per

[perl-win32-gui-users] How to pass $_ to a subroutine

2007-01-08 Thread Perl Rob
Hi all, Are you ready for this one? :) Let's see if I can even explain what I'm trying to do... I'm attempting to dynamically create buttons that use the -onClick option to go to a subroutine that is passed the name of the button. Why am I doing this, you ask? Well, since I don't know the name