Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: 'system' hangs in a Windows Tk app

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

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 13: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
      • 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://539643]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2021-04-14 19:36 GMT
Find Nodes?
    Voting Booth?

    No recent polls found