LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-21-2004, 01:17 PM   #1
erazor
LQ Newbie
 
Registered: May 2004
Posts: 4

Rep: Reputation: 1
tcl/tk different on linux and cygwin?


Hello,
here i have a small program, which works well under cygwin, but wont under linux
--snip
#!/bin/sh
# \
exec wish "$0" "$@"

bind . <Destroy> {
tk_messageBox -type yesno -title {Does it work?} -message {Do you see this window?} -icon question
}
--snap

How it should work: When i push the close button in the upper-right-corner of the window, a message box should appear.
I use the actual cygwin packets under win xp and suse 9.0.
My question: Why will this code refuse to work under linux?
Or should i ask the other way round:
Is it supposed to work? When it comes to destroing the windows the application may be on the last breath and can't initiate a new window. Has it to do with windows/linux handling issues?
And is there a shure way of asking a user if he wants to save unsaved data when he clicks the close button?
Thanks in advance
Stefan
 
Old 07-05-2004, 02:04 PM   #2
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
In wish you can't create any other windows after the base window of wish is destroyed.
But eg.
Code:
#!/bin/sh
# \
exec wish "$0" "$@"

bind . <Destroy> {
puts "Lallalaa.."
}
works fine.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
why use cygwin? curos Linux - Newbie 8 11-05-2005 07:45 PM
cygwin windlamf Linux - Software 4 11-23-2004 06:47 AM
64 bit linux/cygwin for opteron based machines. loanstocker Linux - General 2 04-28-2004 03:26 PM
cygwin help JROCK1980 Linux - Software 0 02-14-2004 03:47 AM
Help with Cygwin, using Linux commands and installing files Delmarc Linux - Newbie 4 10-25-2003 09:37 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration