Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
There's more than one way to do things
 
PerlMonks  

Re: 'system' hangs in a Windows Tk app

by Courage (Parson)
on Mar 28, 2006 at 02:15 UTC ( [id://539643]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to 'system' hangs in a Windows Tk app

I happen to do almost exactly what you ask - I place a button on Tk and when user presses it, I invoke VIM.

In order to achieve this, you need

Win32::Process::Create($pobj, "$args[0]", "@args", 0, NORMAL_PRIORITY_CLASS, ".") || die "can't Win32::Process::Create: (\@args=[@args])". Win32::F +ormatMessage(Win32::GetLastError());
See proper documentation.

Also, using Tcl::Tk as a replacement to perlTk will give you many advantages.

Best regards,
Courage, the Cowardly Dog

Replies are listed 'Best First'.
Re^2: 'system' hangs in a Windows Tk app
by ff (Hermit) on Mar 28, 2006 at 08:43 UTC
    Thanks, Courage. Several other notes seem to pity users of system but they don't say what to do about it. I tried your method and my process does not get hung. There appear to be many interesting controls for Win32::Process and I will examine some other places in my code where I'm not satisfied with how system behaves.

    In this particular case, I have opened a bug report and find that my problem is similar to another recently submitted bug and ActiveState is working on it. (?)

    As for an alternative to Tk, people have said that my interface looks old-fashioned, 80's-ish, etc., and I wouldn't mind an alternative, but I'm pretty invested and will need to gain traction with my app before I can afford to make any big changes. :-)

      Tk could be considered old-fashioned, but:
      • its Text and Canvas are very powerful, and this could outweight many drawbacks
      • Tk has Tile, see how it could be used http://vkonovalov.ru/cgi-bin/perl-tcltk-wiki.cgi/41
      • I did not adviced you to switch from Tk to an alternative, I just adviced to use Tk differently and more effectively.

      On another point, if "old-fashioned" Tk is denied by end-users of software, you can actually use *any* GUI toolkit from Perl.
      I, for one, started from using Perl from within C++Builder GUI, but then, step by step, I switched to something more powerful.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://539643]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.