TK Message box and backquotes issue

I think the long pause might be caused by your cpu utilization going to
100% when Tk starts up. This is, I believe, a known problem when using
Tk under windows from ruby. It certainly reduces my machine to treacle.
I recall others mentioning it on the list in the past too.

Of course, the problem may have been fixed but I’ve missed the thread
annoucing it if it has.

All the best,

Jon

···

-----Original Message-----
From: Alan [mailto:cs96and@yahoo.co.uk]
Sent: 13 May 2003 11:11
To: ruby-talk ML
Subject: TK Message box and backquotes issue

Hello,

I’ve discovered a strange bug/feature in ruby. This is using v1.6.8
on windows.

Basically, if you display a TK message box, and then try to execute a
command using backquotes, you get a very long pause before the
backquotes line is executed.

e.g.

require ‘tk’

def msgBox(title, msg, icon=‘info’)
root = TkRoot.new { withdraw }
Tk::messageBox(‘title’=>title, ‘message’=>msg, ‘icon’=>icon,
‘type’=>‘ok’)
root.destroy
end

msgBox(‘Test’, ‘Here is a message box’)
puts “about to run ‘start c:\’”
start c:\\

will produce this:


about to run ‘start c:’
<long pause - Ctrl-C doesn’t work>

If you replace the backquotes line with:
exec ‘explorer.exe’, ‘/n,c:\’
then it works fine.

Am i doing something wrong, or is this an issue with ruby under
windows? I don’t have linux installed to see if the same thing
happens (you can put any command in the backquotes, it doesn’t have to
be ‘start’)


This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:



This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit


Any views or personal opinions expressed within this email may not be those of Talis Information Ltd.
The content of this email message and any files that may be attached are confidential, and for the usage of the intended recipient only. If you are not the intended recipient, then please return this message to the sender and delete it. Any use of this e-mail by an unauthorised recipient is prohibited.