[perl-win32-gui-users] Event routines

2001-02-07 Thread thomas . emde . te
Is Win32::GUI designed to support something like this:

$subtxt = "Simple_Click";
eval qq (
  sub main::$subtxt {
print "button clicked\n";
$W->SimpleLabel->Text("Got a click");
}
);

(Actually this piece of code does not work...)

The problem is that I would like to create a number of controls dynamically
because I know the number of controls to
create only at runtime.

regards,
Thomas



Re: [perl-win32-gui-users] Event routines

2001-02-07 Thread Aldo Calpini
[EMAIL PROTECTED] wrote:
> Is Win32::GUI designed to support something like this:
>
> $subtxt = "Simple_Click";
> eval qq (
>   sub main::$subtxt {
> print "button clicked\n";
> $W->SimpleLabel->Text("Got a click");
> }
> );
>
> (Actually this piece of code does not work...)

yes, Win32::GUI supports things like these (it's really Perl that
supports it :-), but your code is wrong. $W is interpreted as a
variable in your eval string, you need to escape it:

eval qq (
sub main::$subtxt {
print "button clicked\n";
\$W->SimpleLabel->Text("Got a click");
}
);

...and always check for $@ after an eval!


cheers,
Aldo

__END__
$_=q,just perl,,s, , another ,,s,$, hacker,,print;





Re: [perl-win32-gui-users] Event routines

2001-02-07 Thread Kevin . ADM-Gibbs
Thomas,

It is possible to dynamically create windows.  I wrote the
accompanying script in response to a query quite a while
ago.  It creates 4 windows and hides all but one of them.
Clicking OK brings up the next window.

Hope this helps.

Kev.






[EMAIL PROTECTED] on 07/02/2001 12:03:17
To: perl-win32-gui-users@lists.sourceforge.net @ INTERNET
cc:  

Subject: [perl-win32-gui-users] Event routines

Is Win32::GUI designed to support something like this:

$subtxt = "Simple_Click";
eval qq (
  sub main::$subtxt {
print "button clicked\n";
$W->SimpleLabel->Text("Got a click");
}
);

(Actually this piece of code does not work...)

The problem is that I would like to create a number of controls dynamically
because I know the number of controls to
create only at runtime.

regards,
Thomas

___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users




dynamic.pl
Description: Binary data


[perl-win32-gui-users] Limit size of text field

2001-02-07 Thread Bob Stango
Hi all,

I am using this to create a text field:

# Create text field for Computer Name entry
$Win->AddTextfield(
   -MaxLength=> 15,
   -text=> "",
   -name=> "Host_Name",
   -left=> 285,
   -top => 243,
   -tabstop => 1,
   -width   => 100,
   -height  => 20,
  );

I found the MaxLength option in the docs but it does not seem to limit the
field. What I want is to be able to have the field restricted to 15
characters. So no more characters could be typed in. Is this possible? Have
I just used the wrong syntax? Thanks for any help.

Bob




[perl-win32-gui-users] Need Gui Builder

2001-02-07 Thread Bob Stango
Did the GUI Builder written by David Hiltz ever find a download home? I need
to re-install it and was wondering where I can find it. Thanks.

Bob




Re: [perl-win32-gui-users] Limit size of text field

2001-02-07 Thread Aldo Calpini
Bob Stango wrote:
> I found the MaxLength option in the docs but it does not seem
> to limit the field. What I want is to be able to have the field
> restricted to 15 characters. So no more characters could be
> typed in. Is this possible? Have I just used the wrong syntax?
> Thanks for any help.

MaxLength is a METHOD, not an OPTION. change your code to this:

$Win->AddTextfield(
-text=> "",
-name=> "Host_Name",
-pos=>  [ 285, 243 ],
-size=> [ 100, 20 ],
-tabstop => 1,
);
$Win->Host_Name->MaxLength( 15 );

cheers,
Aldo

__END__
$_=q,just perl,,s, , another ,,s,$, hacker,,print;





Re: [perl-win32-gui-users] Limit size of text field

2001-02-07 Thread Bob Stango
Aldo Calpini wrote:

> Bob Stango wrote:
> > I found the MaxLength option in the docs but it does not seem
> > to limit the field. What I want is to be able to have the field
> > restricted to 15 characters. So no more characters could be
> > typed in. Is this possible? Have I just used the wrong syntax?
> > Thanks for any help.
>
> MaxLength is a METHOD, not an OPTION. change your code to this:
>
> $Win->AddTextfield(
> -text=> "",
> -name=> "Host_Name",
> -pos=>  [ 285, 243 ],
> -size=> [ 100, 20 ],
> -tabstop => 1,
> );
> $Win->Host_Name->MaxLength( 15 );
>
> cheers,
> Aldo
>
> __END__
> $_=q,just perl,,s, , another ,,s,$, hacker,,print;
>

Thanks Aldo. Just more stuff I have to learn about.
:-)




[perl-win32-gui-users] GUI Builder 109 (was: Need Gui Builder)

2001-02-07 Thread David Hiltz
> 
> Did the GUI Builder written by David Hiltz ever find a download home? I
> need to re-install it and was wondering where I can find it. Thanks.

  Sorry that I didn't get something out earlier (I've been so busy). 
  Someday I would like to get the GUI Builder stuff out on sourceforge.  For
  now you can pick up my latest copy of GB (calling it Build 109) off our
  anonymous ftp server:

 ftp://ftp.wh.whoi.edu/pub

  Look for 'gb109.zip'.

  There is a readme.txt inside the zip that should explain stuff.

  David Hiltz



[perl-win32-gui-users] ppm rep dada -maybe of topic

2001-02-07 Thread Danny Zak
Dear perl-win32-gui-users,

  i tried to install win32::api since the GB (from david hiltz) needs
  it..

  the easiest way seemed me to install it via the ppm reposotory
  (http://Dada.perl.it/ppm)

  although .. this isn't working for me, i have to use a firewall ..
  is there a special way to state this request of installation ?
  

If you have any questions, whatsoever, please feel free to contact us.

Best regards,
 Danny Zak   mailto:[EMAIL PROTECTED]
 co-ceo 

Euro-Pictures/belGOnet.com
Princesse Elisabeth Square 9/11
1030 Brussels
Belgium

Tel : +32-(0)2-215.67.65
Fax : +32-(0)2-215.66.65





Re: [perl-win32-gui-users] ppm rep dada -maybe of topic

2001-02-07 Thread Erick J. Bourgeois
Get it from CPAN at
http://search.cpan.org/search?dist=Win32-API , then unpack
it and build it using nmake (follow the usual steps for
making). Should work great. :)

erick
never stop questioning
www.jeb.ca





Re[2]: [perl-win32-gui-users] ppm rep dada -maybe of topic

2001-02-07 Thread Danny Zak
Dear Erick,
thanks

but .. i can't get any of these compiled on my machine..

errors like these

C:\gb\api\Win32-API-0.20>nmake

Microsoft (R) Program Maintenance Utility   Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.

cl.exe -c  -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FC
RYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX -O1 -MD -
DNDEBUG  -DVERSION=\"0.20\"  -DXS_VERSION=\"0.20\"  -IE:\Perl\lib\CORE  API.
c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 11.00.7022 for 80x86
Copyright (C) Microsoft Corp 1984-1997. All rights reserved.

API.c
Command line error D2027 : cannot execute 'c1'
NMAKE : fatal error U1077: 'C:\WIN2K\system32\cmd.exe' : return code '0x2'
Stop.

appear al the time ..

i think i'm missing something pretty important :(


Best regards,
 Danny Zakmailto:[EMAIL PROTECTED]
  co-ceo 

Euro-Pictures/belGOnet.com
Princesse Elisabeth Square 9/11
1030 Brussels
Belgium

Tel : +32-(0)2-215.67.65
Fax : +32-(0)2-215.66.65

---
Wednesday, February 07, 2001, 11:44:15 PM, you wrote:

EJB> Get it from CPAN at
EJB> http://search.cpan.org/search?dist=Win32-API , then unpack
EJB> it and build it using nmake (follow the usual steps for
EJB> making). Should work great. :)

EJB> erick
EJB> never stop questioning
EJB> www.jeb.ca



EJB> ___
EJB> Perl-Win32-GUI-Users mailing list
EJB> Perl-Win32-GUI-Users@lists.sourceforge.net
EJB> http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users





Re: Re[2]: [perl-win32-gui-users] ppm rep dada -maybe of topic

2001-02-07 Thread David Hiltz
  There is an easier way.

  Go out to ActiveState site and download the ZIP for Win32::API, unzip then 
  run:

  ppm install Win32-API.ppd


> but .. i can't get any of these compiled on my machine..
> 
> errors like these
> 
> C:\gb\api\Win32-API-0.20>nmake
> 
> Microsoft (R) Program Maintenance Utility   Version 1.50
> Copyright (c) Microsoft Corp 1988-94. All rights reserved.
> 
> cl.exe -c  -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT 
> -DHAVE_DES_FC
> RYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX -O1 
> -MD -
> DNDEBUG  -DVERSION=\"0.20\"  -DXS_VERSION=\"0.20\"  -IE:\Perl\lib\CORE  
> API.
> c
> Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 11.00.7022 for 80x86
> Copyright (C) Microsoft Corp 1984-1997. All rights reserved.
> 
> API.c
> Command line error D2027 : cannot execute 'c1'
> NMAKE : fatal error U1077: 'C:\WIN2K\system32\cmd.exe' : return code '0x2'
> Stop.