RE: Stress Test Theory?

2002-05-02 Thread Joe Schell



> -Original Message-
> Behalf Of Walter Torres
>
> Has Apache solved the horrible security issues when on Windows?
>
> If not, they recommend to NEVER use Apache on a production machine because
> of the security issues that they have with Windows.
>

Who is 'they'?  I can't find anything that suggests that Apache is
particularily more vulnerable on windows.  At least not with the most recent
version.  And although that fixed a security problem on windows it was only
vulnerable if running bat and cmd files.  And I don't know about anyone
else, but I am not going to write OS script files that run directly from web
pages when perl is around anyways.  I haven't ever actually seen a web site
that does that.

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Stress Test Theory?

2002-05-02 Thread Cameron Dorey

Walter Torres wrote:
> 
> Has Apache solved the horrible security issues when on Windows?
> 
> If not, they recommend to NEVER use Apache on a production machine because
> of the security issues that they have with Windows.

Okay, WHICH horrible security issues? Can you send us a link to this
info?

According to httpd.apache.org, "This version of Apache is known to work
on many versions of Unix, BeOS, OS/2, Windows [not completely on Win9x
or ME], and Netware. Because of many of the advancements in Apache 2.0,
the initial release of Apache is expected to perform equally well on all
supported platforms."

This seems to imply that it works all right.

Cameron

-- 
Cameron Dorey
Associate Professor of Chemistry
University of Central Arkansas
Phone: 501-450-5938
[EMAIL PROTECTED]
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Weird behavior of this mailing list

2002-05-02 Thread Wagner-David
Title: RE: Weird behavior of this mailing list



    Running Outlook + exchange also.
 
Wags ;)

  -Original Message-From: Peter Eisengrein 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, May 02, 2002 
  10:33To: 'Harikrishnan Bhaskaran'; 
  '[EMAIL PROTECTED]'Subject: RE: Weird 
  behavior of this mailing list
  Looking at all the replies to that email, it would appear that 
  you and David Wagner have the same issue. 
  > -Original Message- > 
  From: Harikrishnan Bhaskaran [mailto:[EMAIL PROTECTED]] 
  > Sent: Wednesday, May 01, 2002 17:04 > To: '[EMAIL PROTECTED]' > Subject: Weird behavior of this mailing list > > > 
  Hi, > > May be it is may 
  mailer (outlook + exchange), but sometimes > when I 
  send a reply, the subjects gets changed a little bit > usually a single space or so by the time it reaches me back 
  > via the mailing list. For example, just minutes 
  ago > I replied to a message for mod_perl and the 
  subject has > an extra space after the last word 
  'installation', but before > the '?'. Now if I look 
  at my Sent Items, I have the subject > correctly. 
  This messes up the (already poor) threading given > 
  by outlook. I have seen this once before too. Is this a problem 
  > at my end, or has anyone else seen this before? 
  > > -- > Hari > > 
  ___ > 
  Perl-Win32-Users mailing list > 
  [EMAIL PROTECTED] > To 
  unsubscribe: http://listserv.ActiveState.com/mailman/mysubs 
  > 


RE: Stress Test Theory?

2002-05-02 Thread Walter Torres

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> Johan Lindstrom
> Sent: Thursday, May 02, 2002 11:31 AM
> To: ActiveState's Perl Win32 Users list
> Subject: Re: Stress Test Theory?
>



> BTW, does anyone have any practical experience of using Apache 2.0 +
> mod_perl under Windows? Not that Windows is my preferred server
> platform (insert joke here), but it would be nice to be able to move
> Apache up to the top of the list when Windows is a requirement.

Has Apache solved the horrible security issues when on Windows?

If not, they recommend to NEVER use Apache on a production machine because
of the security issues that they have with Windows.

Walter

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



How to read a registry key's value if its data type is REG_RESOURCE_LIST

2002-05-02 Thread li, weiqun

I am trying to read registry key
"HKEY_LOCAL_MACHINE\\HARDWARE\\RESOURCEMAP\\System Resources\\Physical
Memeory"'s value. I used Win32::Registry::GetValues function, but the value
is null. Who knows how to get it? 
BTW, if you can tell me how to translate the long hexdecimal strings into
the real memory size number, that's better... Or other ways to get
the physical memory size on a NT or Winxx host.

TIA,
Weiqun
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Weird behavior of this mailing list

2002-05-02 Thread Peter Eisengrein
Title: RE: Weird behavior of this mailing list





Looking at all the replies to that email, it would appear that you and David Wagner have the same issue.




> -Original Message-
> From: Harikrishnan Bhaskaran [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 01, 2002 17:04
> To: '[EMAIL PROTECTED]'
> Subject: Weird behavior of this mailing list
> 
> 
> Hi,
> 
> May be it is may mailer (outlook + exchange), but sometimes
> when I send a reply, the subjects gets changed a little bit
> usually a single space or so by the time it reaches me back
> via the mailing list. For example, just minutes ago
> I replied to a message for mod_perl and the subject has
> an extra space after the last word 'installation', but before
> the '?'. Now if I look at my Sent Items, I have the subject
> correctly. This messes up the (already poor) threading given
> by outlook. I have seen this once before too. Is this a problem
> at my end, or has anyone else seen this before?
> 
> --
> Hari
> 
> ___
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 





RE: Perl Encryption

2002-05-02 Thread Peter Guzis

Are you trying to keep hackers at bay or are you simply trying to keep
prying eyes out of your data?

There are plenty of modules that can be had via PPM or CPAN.  Just search
for 'Crypt'.  

Generally speaking, the better the encryption, the longer it will take to
process.  If you go overboard, your application will be slow.

Peter Guzis
Web Administrator, Sr.
ENCAD, Inc.
email: [EMAIL PROTECTED]
www.encad.com 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 02, 2002 9:33 AM
To: [EMAIL PROTECTED]
Subject: Perl Encryption


I want to take the information from a guestbook and put it
 into my database encrypted. Then be able to pull it out
 again in readable form. How can I do this with perl.

Thanks in advance.
Allan
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Stress Test Theory?

2002-05-02 Thread Johan Lindstrom

At 17:21 2002-05-02 +0200, Lee Goddard wrote:
>My scenario is an Apache on Windows (not a good idea, but not my app),
>a C I script calling a Java middleware app.

Interesting note with regards to load: Apache 1.3 on Windows processes 
requests in a serial manner. Apache 2.0 does not if IIRC, so it should be a 
much better fit.

BTW, does anyone have any practical experience of using Apache 2.0 + 
mod_perl under Windows? Not that Windows is my preferred server platform 
(insert joke here), but it would be nice to be able to move Apache up to 
the top of the list when Windows is a requirement.


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: "The GNOME Usability Project"

dmoz (1 of 6): ...s/Graphic_Subsystems/Desktop_Environments/GNOME


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Perl Encryption

2002-05-02 Thread barons

I want to take the information from a guestbook and put it
 into my database encrypted. Then be able to pull it out
 again in readable form. How can I do this with perl.

Thanks in advance.
Allan
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Stress Test Theory?

2002-05-02 Thread Lee Goddard

Well... I guess I don't need every reponse; the threshold would do,
though the former would be nicer.  Apache::Bench* wasn't up to it
last time I spoke to the author; he's doing mods as we speak.

But did you mean Benchmark, as in Benchmark?  That would, er,
probably be perfect. I'll have a crack and let y'all know.

Thanks

lee

At 11:59 02/05/2002 -0400, Peter Eisengrein wrote:

>Do you really need to record every event or are you looking for the 
>threshold. I was thinking that maybe you could try using Benchmark with 
>different # of iterations and check to see when performance degrades. Or 
>is that not enough detail?
>
>Anyone know if the Benchmark mod would generate enough of a beating?
>
> > -Original Message-
> > From: Lee Goddard [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, May 02, 2002 11:22
> > To: ActiveState's Perl Win32 Users list
> > Subject: Stress Test Theory?
> >
> >
> > Does anyone have any thoughts on stress testing?
> >
> > My scenario is an Apache on Windows (not a good idea, but not my app),
> > a C I script calling a Java middleware app.
> >
> > I need to know at what stage the middleware is flooded/fails
> > to respond.
> >
> > I'm thinking of threading a new process for every request I
> > make to Apache
> > each with its own socket for the middleware's response.
> > My problem is that I need to record all the results without
> > crashing my own
> > system.
> >
> > I imagine Apache is more reliable than MySQL, or my Win32
> > FAT32 filesystem,
> > so that would seem to rule out squirting into a db or dumping files.
> >
> > Should I just hold everything in memory and then store it?
> >
> > If you've done this before, I'd appreciate your thoughts.
> >
> > Thanks in anticipation
> > lee goddard
> >
> > ___
> > Perl-Win32-Users mailing list
> > [EMAIL PROTECTED]
> > To unsubscribe: 
> 
>http://listserv.ActiveState.com/mailman/mysubs
> 
>
> >

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Stress Test Theory?

2002-05-02 Thread Peter Eisengrein
Title: RE: Stress Test Theory?





Do you really need to record every event or are you looking for the threshold. I was thinking that maybe you could try using Benchmark with different # of iterations and check to see when performance degrades. Or is that not enough detail?

Anyone know if the Benchmark mod would generate enough of a beating?


> -Original Message-
> From: Lee Goddard [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 02, 2002 11:22
> To: ActiveState's Perl Win32 Users list
> Subject: Stress Test Theory?
> 
> 
> Does anyone have any thoughts on stress testing?
> 
> My scenario is an Apache on Windows (not a good idea, but not my app),
> a C I script calling a Java middleware app.
> 
> I need to know at what stage the middleware is flooded/fails 
> to respond.
> 
> I'm thinking of threading a new process for every request I 
> make to Apache
> each with its own socket for the middleware's response.
> My problem is that I need to record all the results without 
> crashing my own
> system.
> 
> I imagine Apache is more reliable than MySQL, or my Win32 
> FAT32 filesystem,
> so that would seem to rule out squirting into a db or dumping files.
> 
> Should I just hold everything in memory and then store it?
> 
> If you've done this before, I'd appreciate your thoughts.
> 
> Thanks in anticipation
> lee goddard
> 
> ___
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 





Stress Test Theory?

2002-05-02 Thread Lee Goddard

Does anyone have any thoughts on stress testing?

My scenario is an Apache on Windows (not a good idea, but not my app),
a C I script calling a Java middleware app.

I need to know at what stage the middleware is flooded/fails to respond.

I'm thinking of threading a new process for every request I make to Apache
each with its own socket for the middleware's response.
My problem is that I need to record all the results without crashing my own
system.

I imagine Apache is more reliable than MySQL, or my Win32 FAT32 filesystem,
so that would seem to rule out squirting into a db or dumping files.

Should I just hold everything in memory and then store it?

If you've done this before, I'd appreciate your thoughts.

Thanks in anticipation
lee goddard

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: How to make sequences

2002-05-02 Thread Sisyphus


>
> "Mary J Blige" <[EMAIL PROTECTED]> wrote:
>
> > Does anybody know the good algorithm [snipped code would be better
> > ;-)] that can produce all sequences of a string of numbers??
>
> Sounds like you're talking about permutations.
>
> I searched CPAN (http://search.cpan.org/) with the word "permute" and came
> up with Algorithm::Permute and Algorithm::FastPermute. I didn't see any
PPM
> versions of these on ActiveState. Technically you need some version of
> "make" (generally "nmake" under Wintel) to install a CPAN kit. But unless
> the one you pick needs a DLL, you can always try a "Drag-and-drop"
> installation.
>

Algorithm::Permute and Algorithm::FastPermute will certainly do the job -
but they *do* require
compilation. Mary, if you need a ppm and can't locate one, I could send you
one.

Alternatively, here's some code which I *think* does the job.

use warnings;
use strict;
my @nums = (1,2,3,4,5,6,7);
my @permutations = ();

for (@nums) {@permutations = perm($_, @permutations)}

for (@permutations) {print "@{$_}\n"}

print scalar(@permutations), "\n";

sub perm {

my $el = shift;
my @ret = ();
my @temp = ();

if (!scalar(@_)) {
   my @start = ($el);
   @ret = (\@start);
   }

else {
 for (@_) {
 @temp = @{$_};
 push @temp, $el;
 push @ret, [@temp];
 for (my $i = 1; $i < scalar(@temp); $i++){
 unshift @temp, pop @temp;
 push @ret, [@temp];
 }
}
 }
return @ret;
}

Cheers,
Rob


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: where can I find a mod_perl windows binaries for installation?

2002-05-02 Thread Joe Schell


> -Original Message-
> Behalf Of Ted Zeng
>
> Thanks.
> I got the file now and install it to a folder.
>
> Now my problem is I already have my Apache server running for a long time
> and I don't want to replace it with this one. My perl also has many other
> modules
> installed already.
> I just want to install mod_perl module.
>

Just an impression I have, but I think that can be problematic.  Basically
mod_perl needs to be built in the same environment that Apache is.  And
changes do occur.  So I wouldn't try that unless I could find a binary from
the same source that provided the Apache binary, and with matching build
dates.

And I wouldn't be sure that any installed modules would be automatically
available to it.  It would probably require some messing around to get that
to happen (perhaps just configuration changes.)

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Glob question

2002-05-02 Thread c. church



John,
 
    Try using the following, 
instead, and see if you get better results:
 
use File::DosGlob qw/GLOBAL_glob/;
 
...
 
$filename = '*.*';
my @list = glob($filename);
 
!c

  - Original Message - 
  From: 
  [EMAIL PROTECTED] 
  
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, May 02, 2002 7:52 
AM
  Subject: Glob question
  I have a routine trying to 
  rename files with patterns like this: From ABC to ABC.EXT When I do a @list = glob($filename) I get a nul return. I'm using 
  File::Glob "glob" so that I can compile with Perl2Exe, if than makes any 
  difference. Thanks, 
  John **This 
  e-mail and any files transmitted with it are considered confidential and 
  are intended solely for the use of the individual or entity to whom they 
  are addressed (intended). This communication is subject to agent/client 
  privilege. If you are not the intended recipient (received in error) or 
  the person responsible for delivering the e-mail to the intended 
  recipient, be advised that you have received this e-mail in error and that 
  any use, dissemination, forwarding, printing or copying of this e-mail is 
  strictly prohibited. If you have received this e-mail in error please 
  notify the sender 
  immediately.**


Re: where can I find a mod_perl windows binaries for installation?

2002-05-02 Thread Randy Kobes

On Thu, 2 May 2002, John Deighan wrote:

> While on the subject of mod_perl binaries, does anyone know
> where to find pre-compiled binaries for mod_perl for Linux?
> I'm looking for a mod_perl.so file (i.e. dynamically linked
> mod_perl) for Apache 2.

It can be difficult even getting a mod_perl-1 binary package to
work on Linux, unless your system is essentially a clone of the
one used to build the package. Since Apache-2/mod_perl-2 is so
new, and that there's different combinations that Apache/perl can
be compiled with for this, probably the easiest route at this
stage is to compile it yourself.

best regards,
randy kobes

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: where can I find a mod_perl windows binaries for installation?

2002-05-02 Thread John Deighan

While on the subject of mod_perl binaries, does anyone know where to find 
pre-compiled binaries for mod_perl for Linux? I'm looking for a mod_perl.so 
file (i.e. dynamically linked mod_perl) for Apache 2.

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: where can I find a mod_perl windows binaries for installation?

2002-05-02 Thread Randy Kobes

On Wed, 1 May 2002, Ted Zeng wrote:

> Thanks.
> I got the file now and install it to a folder.
>
> Now my problem is I already have my Apache server running for a long time
> and I don't want to replace it with this one. My perl also has many other
> modules
> installed already.
> I just want to install mod_perl module.

The easiest way to do this, assuming you have ActivePerl, is
(broken over two lines)
 C:\> ppm install
  http://theoryx5.uwinnipeg.ca/ppmpackages/mod_perl.ppd
or, from within the ppm shell, setting the repository to
   http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer
then
   ppm> install mod_perl
This assumes you're running the latest Apache-1. If you're
experimenting with Apache-2, there's a corresponding
mod_perl-2.ppd package you can try, or
   ftp://theoryx5.uwinnipeg.ca/pub/other/Apache2.tar.gz
contains an Apache-2/mod_perl-2 binary.

best regards,
randy kobes

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Glob question

2002-05-02 Thread Tim Moose

There is nothing inherently wrong with the statement

@list = glob($filename);

but you need to provide more information. What is the value of $filename? 
What is the name of a file that you expect to see in @list? What is the 
working directory set to?

Tim
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Running a command and using / for a switch option

2002-05-02 Thread Oliver Wayne Contr AETC/DOXD
Title: Running a command and using / for a switch option





Hi,
I am currently trying to port a batch file to perl.


the code in question is similar to the following:


    `"C:\\Program Files\\SomeProgram\\program.exe" "C:\\Program Files\\SomeProgram\\template.CHF /C $SystemName"`;


Everything works but the /C switch, I have tried every combination of \\/ // /// \/ to escape the /C but no success.
The backticks call the program but the /C switch that tells the application to substitute the var $SystemName fails.
I am fairly new to Perl so if this is a simple problem please excuse my lack of skill. This is driving me nuts so any help will be appreciated. 

Wayne E. Oliver
System Administrator
AETC GCCS C4 Systems
DSN 487-7678
Comm: (210) 652-7678





Glob question

2002-05-02 Thread John_Wunderlich

I have a routine trying to rename files with patterns like this:

From ABC to ABC.EXT

When I do a @list = glob($filename) I get a nul return. I'm using File::Glob "glob" so that I can compile with Perl2Exe, if than makes any difference.

Thanks,
John


**
This e-mail and any files transmitted with it are considered 
confidential and are intended solely for the use of the 
individual or entity to whom they are addressed (intended).  
This communication is subject to agent/client privilege. 
If you are not the intended recipient (received in error) or 
the person responsible for delivering the e-mail to the 
intended recipient, be advised that you have received this 
e-mail in error and that any use, dissemination, forwarding, 
printing or copying of this e-mail is strictly prohibited.  If 
you have received this e-mail in error please notify the 
sender immediately.

**



Re: Discounted Technical Books

2002-05-02 Thread Paul \"Bo\" Peaslee



www.bookpool.com is a great source 
for technical books.  Usually sell for 25%-50% off.  And, they get 
them to you very promptly.
 
 
Bo

  - Original Message - 
  From: 
  Andrew Wax 
  To: [EMAIL PROTECTED] 
  
  Sent: Wednesday, May 01, 2002 3:37 
  PM
  Subject: Discounted Technical Books
  
  I apologize in advance - I know there were 
  postings as to cheaper (than Amazon) for technical books - I cannot find 
  the e-mail with the name of the place on it - can you please refresh my 
  memory.
   
  Thanks.
   
  Andrew
   


Re: How to make sequences

2002-05-02 Thread Thomas R Wyant_III


"Mary J Blige" <[EMAIL PROTECTED]> wrote:

> Does anybody know the good algorithm [snipped code would be better
> ;-)] that can produce all sequences of a string of numbers??

Sounds like you're talking about permutations.

I searched CPAN (http://search.cpan.org/) with the word "permute" and came
up with Algorithm::Permute and Algorithm::FastPermute. I didn't see any PPM
versions of these on ActiveState. Technically you need some version of
"make" (generally "nmake" under Wintel) to install a CPAN kit. But unless
the one you pick needs a DLL, you can always try a "Drag-and-drop"
installation.

Tom Wyant

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: A GUI Status Window.

2002-05-02 Thread William Holmes

Hello, 

Here is a code snip:

use TK ;
$mw = MainWindow->new ;
$text = $mw->Text()->pack ;
$text->insert('end', $message) ;
MainLoop ;

Sub DoSomthing{

Important Perl Code ;
...
$text->insert('end', $message);
return ;
}


Now what I'm after is to have MainLoop Display $message in the TK window
and the  immediately call DoSomthing without requiring an event to
happen to trigger the jump to DoSomthing. I really don't need to track
events. I only need the text wiget for display.

I see in the next response that James mentions the update() method. That
looks like exactly what I need. I'll give that a try. 

Thanks for your responses!

Bill 



 

-Original Message-
From: Jack [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, May 02, 2002 4:31 AM
To: William Holmes; [EMAIL PROTECTED]
Subject: Re: A GUI Status Window.

- Original Message -
From: "William T. Holmes" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 01, 2002 9:26 PM
Subject: A GUI Status Window.


Hello,

I apologize for this question if its so basic I should have already
known. I have an application that currently outputs status information
to the console. I would like to have this output go to a GUI (Like TK).
Unfortunately for me TK is event driven so until you call MainLoop
nothing gets displayed.  Once MainLoop is started you can't simply go on
and do something else (or can you ?). Could anyone point me in the right
direction ?
-
Tk 'is' event driven - either by the user or by the programmer. Maybe if
you
could describe exactly what is troubling you - we could help more.

I'm shooting in the dark on exactly what you are after - but here are a
few
ideas.

If you want to continually do 'something' after you reach the MainLoop
you
would use $widget->repeat. If you want to 'run' something
programmatically
once - after you reach the MainLoop, try $widget->after. Whenever you
want
to update your display - call $widget->idletasks or $widget->update.

Jack
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: A GUI Status Window.

2002-05-02 Thread Tillman, James

> Tk 'is' event driven - either by the user or by the 
> programmer. Maybe if you
> could describe exactly what is troubling you - we could help more.
> 
> I'm shooting in the dark on exactly what you are after - but 
> here are a few
> ideas.
> 
> If you want to continually do 'something' after you reach the 
> MainLoop you
> would use $widget->repeat. If you want to 'run' something 
> programmatically
> once - after you reach the MainLoop, try $widget->after. 
> Whenever you want
> to update your display - call $widget->idletasks or $widget->update.

While this is technically true, there is also the "update" method that one
can call on a Tk widget, which will spin the event loop without having to
enter MainLoop.  The following script demonstrates:

use Tk;

my $mw = tkinit;
my $i = 1;
my $label = $mw->Label(
-textvariable=>\$i
)->pack();

while($i < 50) {
$mw->update();
$i++;
sleep(1);
}

by calling "update" on the $mw, the script updates the label or anything
else that is part of $mw.  When the end is reached, the entire window shuts
down, no MainLoop or funky event handling required.  Note that due to Tk's
event-oriented bias, this may create situations where certain things don't
behave like you think they should (just keep in mind that "update" is like
MainLoop in that it enters the event loop), but in many cases, it's a
convenient way to present a quick GUI without worrying about MainLoop.

jpt
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs