[perl-win32-gui-users] Help
I am currently having a problem I was hoping someone on this list could help me with. I am writting a small app that will provide a GUI frontend for installing multiple software packages. The problem that occurs is in the GUI, after the user has checked all the software they want to install and clicks on Install, the first install will appear to launch, but it will usually not do anything until the perl script ends (either on purpose, or killed by the user). At this time, the software will install without a hitch. This appears to be a problem with the Win32::GUI module, as if I do things without it, everything works as it should. Has anyone run up against this? Is this a problem with OLE or DDE? Is there any way around this. Please let me know if you have a solution, as I have been banging my head against this for a couple days now, and I would really hate to scratch this project and do it in something else, like VB (eww). I can provide source code if it is needed. Also, if you need any more information, please feel free to ask. Thanks for any help you can provide. Len. Free, encrypted, secure Web-based email at www.hushmail.com
RE: [perl-win32-gui-users] Help
| Install, the first install will appear to launch, but it will | usually not | do anything until the perl script ends Works fine here ... there must be something in your water. - are you using the multithread perl? (5.6) - how do you launch the installer? Backtick or some windows function? - how do you watch for the first installer to finish so as not to launch all of them at the same time? (maybe it's this watcher that does not yield to other tasks)? - do you really have to end your script or would it suffice to give the installer the focus? - how do you start your perl script in the first place ... out of a command window, out of an explorer, or with this wrapper thing that prevents the text window from showing? A final word: please hold on! Don't fall back to VB! 't'wood bee sooo embarrassing ...
RE: [perl-win32-gui-users] Help
At Tue, 20 Mar 2001 09:00:34 -0800, "Piske, Harald" <[EMAIL PROTECTED]> wrote: >- are you using the multithread perl? (5.6) Yup ... C:\>perl -v This is perl, v5.6.0 built for MSWin32-x86-multi-thread [snip] Its build 620. >- how do you launch the installer? Backtick or some windows function? I've tried both using the backtick and the 'system' call, neither work. I have also tried using Win32::Process, again, with no luck. >- how do you watch for the first installer to finish so as not to launch all >of them at the same time? (maybe it's this watcher that does not yield >to other tasks)? At first, I was going to wait for the child process to finish, but with Installshield apps this does not work (it forks off its own process), so I started using a timeout (sleep) after the initial install call was made. This should allow the perl script to pause for a minute or two, while its child (who is no longer really attached) to go off and finish its duty. Just so you know, I have placed 'print' statements around the calls so I know when it is getting stuck. >- do you really have to end your script or would it suffice to give the >installer the focus? I'm not sure what you mean by giving the install the focus ... sorry. >- how do you start your perl script in the first place ... out of a command >window, out of an explorer, or with this wrapper thing that prevents >the text window from showing? I have tried running the script from the command line, double clicking on the script from explorer, and compiling the script into an exe (Perlapp). No luck with any of them. >A final word: please hold on! Don't fall back to VB! 't'wood bee sooo >embarrassing ... Tell me about it. The little VB programming I have done in the past has left a bad taste in my mouth. Thanks for everything. Len. Free, encrypted, secure Web-based email at www.hushmail.com
Re: [perl-win32-gui-users] .plan
hello > > this is my dot plan about Win32::GUI, what I'm doing and what > I plan to do. please note that everything here may change (without > further notice) depending on my other activities (namely job and > 'real life' :-). > > it would be kewl if you could 'prioritize' the list based on > what you find more useful (or funny :-), and above all (pardon > the caps): IF YOU CAN HELP ME WITH SOMETHING, PLEASE DO! > > NEM (New Event Model) > I'm almost done with this, but there are still some flaws. > I will also define the API to manage events (eg. AddEvent > or BindEvent or ResetEvent or something like this...). > I'm also adding the possibility of 'shortcut' options a la > Javascript, like: > -onClick => \&DoSomething Good. > Event Queues > this is something I didn't really explored yet, but I would > like to process a list of events. should look somehow like > this: > -events => { Click => [ \&DoSomething, \&DoSomethingElse ] } > in other words, when a Click events occur first DoSomething > is executed, then DoSomethingElse. the main purpose for this > is to allow subpackages to define their own event handlers > which can be 'overriden' by the implementation in the program. > (if it doesn't sound clear, don't worry, is still mainly obscure > to me too :-) Not obscure at all ;-) but a very difficult point. I have think a little about this and i have notice 2 things. * With only one event fonction (actual NEM) it's possible to call the DoSomethingElse function in the DoSomething function. And in case of 'overriden' a sub package event, just need to call the event function. sub overriden_OnClick { my $self = shift; # do something before $self->OnClick(); # or in inherited package $self->SUPER::OnCLick(); # do something after } The package use the \& syntax and not sub { } in the event option. But for instanced object, it's possible to use sub {}. * With event queue Problem for the new package method. For example : - the package need to add a click event function - the user create an object with a click event function How create the click event array ? - order problem between user event and package event. - If user don't want default package click event. > Win32::GUI::JPEG > allow *read* support for JPEG images, using libjpeg (see > ftp://ftp.uu.net/graphics/jpeg). JPEG files can be converted > to in-memory bitmaps and then used as regular Bitmap objects. > (NOTE: I'm *not going* to develop Win32::GUI::GIF. GIF is > absolutely deprecated, I'll look into PNG support eventually). After some search about this point, I found a free open source code project named FreeImage. It's a library for loading and writing different file format (JPEG, PNG,BMP, PCX, TIFF, TGA). I have look some example, it's look easy to use. It's possible to read the data image not only from file (just need to code an io-handler). It can be usefull for read image from perl variable (no tempory file in the BitmapInline.pm or interface with perl GD module). FreeImage Web Site : http://home.wxs.nl/~flvdberg/index.html I can help you for this point. > > Win32::GUI::Scintilla > (see http://www.scintilla.org); to revive pride.pl! :-) > This text control look very nice. Laurent.
RE: [perl-win32-gui-users] Help
| I've tried both using the backtick and the 'system' call, | neither work. | I have also tried using Win32::Process, again, with no luck. I suspected it to be the installer, so I just tried this: print "->\n"; `C:\\Setups\\Develop\\Perl\\Win32\\ActivePython-2.0.0.202.msi`; print "<-\n"; and it worked just fine. Installer pops up, initializes, lets me install (or abort, for that matter) and then perl comes back from the backtick, ready to launch the next install. The difference must therefore be the OS or the installer ... I'm using w2k pro (US english). I have access to almost anything else (95a/b,98fe/se,NT4SP1..5), including a bunch of foreign languages ... what is it you're so successful in failing with?
RE: [perl-win32-gui-users] Help
At Tue, 20 Mar 2001 10:59:31 -0800, "Piske, Harald" <[EMAIL PROTECTED]> wrote: >print "->\n"; >`C:\\Setups\\Develop\\Perl\\Win32\\ActivePython-2.0.0.202.msi`; >print "<-\n"; If this is all that is in your script, then it will work, but once I add something like this to be called once a button is clicked on, then it doesn't. It's really wierd. If you like, I could attach the script, or send it to you. > >The difference must therefore be the OS or the installer ... I'm using >w2k >pro (US english). I have used Win2K SP1 and WinNT SP6, and the same problem exists for both platforms. Its rather frusterating. Thanks. Len. Free, encrypted, secure Web-based email at www.hushmail.com
RE: [perl-win32-gui-users] Help
| >print "->\n"; | >`C:\\Setups\\Develop\\Perl\\Win32\\ActivePython-2.0.0.202.msi`; | >print "<-\n"; | | If this is all that is in your script, then it will work, but | once I add | something like this to be called once a button is clicked on, | then it doesn't. Nope - the three lines are actually in a click sub. The calling Win32::GUI program freezes while the backtick works (because backtick returns output, it waits for the called thing to finish). I can click around in the perl window and when I come back from the installer, the queued messages get called. Okay, here's a workaround to try if that's not what happens on your machine. In your click sub, set a variable and return -1. This terminates your message loop. Do the backtick outside the Win32::GUI::Dialog like this: for (;;) { undef $install; Win32::GUI::Dialog (); last unless $install; `$install`; #`install some more`; Win32::GUI::GetMessage (0, 0x200, 0x206) while Win32::GUI::PeekMessage (0, 0x200, 0x206); # kill all pending clicks the bored user has caused } sub Launch_Click { $install = "C:\\somewhere\\something.msi"; # or just a bool return -1; }
RE: [perl-win32-gui-users] Help
One more thing ... I just remembered an issue with the Win32::GUI Version you get from Activestate being outdated (ref. sequence "[perl-win32-gui-users] Bug in Textfield scrolling") When you do ppm query Win32-GUI and it gives you version 0.99, dump it (ppm remove Win32-GUI) and get the current version from Aldo (dada.perl.it) - should still be 0.0.558 if I didn't miss something interesting here. Unzip and then do "ppm install Win32-GUI.ppd" - note that, w/o the ppd, your ppm script might try to get the "newer" version from Activestate - i.e., the old version with the wrong version number. Aldo pointed out that Activestate invented this version number themselves without contacting him.
Re: [perl-win32-gui-users] .plan
Dear Aldo I'd love to help because Win32::GUI is a marvelous tool and it enabled me to develop a real nice perl app on the PC. I could offer my help for working on the documentation, code some perl examples, and summarize the tricks discussed in the user group. Time available depending on my 'other activities' (see below)... Best Regards, Felix - Original Message - From: "Aldo Calpini" <[EMAIL PROTECTED]> To: Sent: Monday, March 19, 2001 6:11 PM Subject: [perl-win32-gui-users] .plan > hello perl-win32-gui-users, > > this is my dot plan about Win32::GUI, what I'm doing and what > I plan to do. please note that everything here may change (without > further notice) depending on my other activities (namely job and > 'real life' :-). > > it would be kewl if you could 'prioritize' the list based on > what you find more useful (or funny :-), and above all (pardon > the caps): IF YOU CAN HELP ME WITH SOMETHING, PLEASE DO! > > that said, this is the list: > > NEM (New Event Model) > I'm almost done with this, but there are still some flaws. > I will also define the API to manage events (eg. AddEvent > or BindEvent or ResetEvent or something like this...). > I'm also adding the possibility of 'shortcut' options a la > Javascript, like: > -onClick => \&DoSomething > > Event Queues > this is something I didn't really explored yet, but I would > like to process a list of events. should look somehow like > this: > -events => { Click => [ \&DoSomething, \&DoSomethingElse ] } > in other words, when a Click events occur first DoSomething > is executed, then DoSomethingElse. the main purpose for this > is to allow subpackages to define their own event handlers > which can be 'overriden' by the implementation in the program. > (if it doesn't sound clear, don't worry, is still mainly obscure > to me too :-) > > Win32::GUI::JPEG > allow *read* support for JPEG images, using libjpeg (see > ftp://ftp.uu.net/graphics/jpeg). JPEG files can be converted > to in-memory bitmaps and then used as regular Bitmap objects. > (NOTE: I'm *not going* to develop Win32::GUI::GIF. GIF is > absolutely deprecated, I'll look into PNG support eventually). > > Win32::GUI::Scintilla > (see http://www.scintilla.org); to revive pride.pl! :-) > > > these are the main points... for now, I will post a followup > if I forgot something :-) > > cheers, > Aldo > > __END__ > $_=q,just perl,,s, , another ,,s,$, hacker,,print; > > > > ___ > Perl-Win32-GUI-Users mailing list > Perl-Win32-GUI-Users@lists.sourceforge.net > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
RE: [perl-win32-gui-users] Help
At Tue, 20 Mar 2001 11:56:34 -0800, "Piske, Harald" <[EMAIL PROTECTED]> wrote: > >One more thing ... I just remembered an issue with the Win32::GUI Version >you get from Activestate being outdated (ref. sequence >"[perl-win32-gui-users] Bug in Textfield scrolling") I made sure when I first started that this wouldn't be a problem, and got the correct version from dada.perl.it. Although, I first started using Win32::GUI I was using 0.0.502. After upgrading to 0.0.558 I had problems in one of my apps with AddGroupbox, in that it was reading the wrong area's in memory. Rather then spend my time trying to figure out what was wrong (my code appeared to be fine), I just downgraded back to 0.0.502, and everything went back to working fine. I haven't had time to try your solution, but I'll try to get to it later on today. As far as the problem I am having, here is a snippet of code that has the same problem. The application that it is trying to launch a silent install on is Adobe Acrobat 4.05. This is under WinNT SP6, using ActivePerl 5.6.0 build 620. The Win32::GUI module is 0.0.502. Thanks a TON for all the help. Len. -[ Start Code ]-- use Win32::GUI; $mainwindow = Win32::GUI::Window->new ( -name => "Main", -left => 100, -top=> 100, -width => 100, -height => 100, -title => "Hi", ); $mainwindow -> {-dialogui} = 1; $mainwindow -> AddButton ( -name => "Install", -left => 25, -top=> 25, -width => 50, -cancel => 1, -text => "Install", -default=> 1, -tabstop=> 1, ); $mainwindow -> Show; Win32::GUI::Dialog(); sub Main_Terminate { return -1; } sub Install_Click { system("h:/ntimage/apps/acrobat/setup -s"); print "On to the next app ...\n"; Main_Terminate(); } -[ End Code ]-- Free, encrypted, secure Web-based email at www.hushmail.com
[perl-win32-gui-users] win32:gui builder
Is there a win32:gui builder availiable (eg. a visual aid in designing the gui) . Jeremy