473,597 Members | 2,174 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pmw.Balloon under Windows

Hello everyone,

I'm encountering a weird problem and couldn't find any Internet
postings
that are relevant to my problem and it seems coming from the Pmw
Balloon
widget inside.

I have developed a Tkinter software using Pmw.
The software is being developed under Solaris but is targeting all
platforms
including Windows.

The software is working fine under Solaris 9.
However, when I tried it under Windows, it worked also fine but it spit
out
the following error message when exiting.

(from cygwin terminal)

% c:/Python23/python my_app.py

This application has requested the Runtime to terminate it in an
unusual way.
Please contact the application's support team for more information.

(the same error message is observed when I run the program directly in
Windows XP environment.)
//

First, I thought I screwed up something because it was working fine
before
with my older software version.

After painful investigation, I found Pmw.Balloon was causing this
problem
(because the problem went away if I commented out all balloon
statements).

Then I compared my usages and Pmw Balloon example because the example
didn't
cause this. (http://pmw.sourceforge.net/doc/Balloon.html)

But I didn't see any problem in my coding.

//

Then I found two clues:
(1) The problem won't occur if I quit the program by clicking 'X' of
the Window decoration. (not from Quit in the Menu)

(2) The Pmw Balloon example has the exact same problem *if*
I change the program to quit using widget quit() method.

self.suicide = Tkinter.Button( frame, text='Kill me soon!',
command = parent.quit) # this causes the problem
# command = self.killButton ) # The original one

Of course, the problem is occurring only under Windows. (Windows
XP/Cygwin)

//

My questions are:
(1) Why my program is complaining and is there any workaround?

(2) What is the difference between using widget quit() method
and using Windows 'X' button.
- I know clicking Windows 'X' button generates an event but I thought
- ultimately it reached to the same routine to terminate the program.

(3) Is it possible to fake clicking 'X' button?
I see a widget has event_generate( ) method.

//

Any feedbacks, comments are highly appreciated.
It would be nice if you can send your reply to <ak*****@pacbel l.net> .

Thank you for your attention.

Best regards,
Aki Niimura

Jul 18 '05 #1
2 2516
On 16 Feb 2005 10:51:27 -0800, Aki Niimura <ak*****@pacbel l.net> wrote:
[snip]
The software is working fine under Solaris 9.
However, when I tried it under Windows, it worked also fine but it spit
out
the following error message when exiting.

(from cygwin terminal)

% c:/Python23/python my_app.py

This application has requested the Runtime to terminate it in an
unusual way.
Please contact the application's support team for more information.

(the same error message is observed when I run the program directly in
Windows XP environment.)
// [snip] After painful investigation, I found Pmw.Balloon was causing this
problem
(because the problem went away if I commented out all balloon
statements).

Then I compared my usages and Pmw Balloon example because the example
didn't
cause this. (http://pmw.sourceforge.net/doc/Balloon.html)
I used the Pmw.Balloon quite a lot and never see any problem.

One question: what Python do you use? Is it a regular Windows Python distribution or the Python delivered with Cygwin? I know by experience that the Python in Cygwin has quite a lot of problems (mine crashes *very* often). If you don't already use a "regular" Windows distro, I think using one may solve your problem.
My questions are:
(1) Why my program is complaining and is there any workaround?

(2) What is the difference between using widget quit() method
and using Windows 'X' button.
- I know clicking Windows 'X' button generates an event but I thought
- ultimately it reached to the same routine to terminate the program.
I think the default binding for the 'X' button is to call destroy, not quit. Calling destroy on the main window is almost equivalent to calling quit, so maybe it can be a solution?
(3) Is it possible to fake clicking 'X' button?
I see a widget has event_generate( ) method.


Not that I know of. The event_generate method won't help here, because the 'X' button is handled by the window manager, and not by the application. It's a bit more complicated on Windows (as usual...) since there is no "real" window manager, but from the tk/Tkinter point of view, the result is the same: you can't "fake" a window manager event using event_generate.
BTW, what are the versions of Python, tk and Pmw you're using?

HTH a little...
- Eric Brunel -
Jul 18 '05 #2

Eric Brunel wrote:
One question: what Python do you use? Is it a regular Windows Python
distribution or the Python delivered with Cygwin? I know by experience that the Python in Cygwin has quite a lot of problems (mine crashes *very* often). If you don't already use a "regular" Windows distro, I think using one may solve your problem.
Yes, I noticed the difference. I'm using the Python 2.3.5 installed on
Windows.
(Pmw 1.2)
I think the default binding for the 'X' button is to call destroy, not quit. Calling destroy on the main window is almost equivalent to calling quit, so maybe it can be a solution?
I have tried calling root.destroy() as you suggested. It worked.
My application is now not generating the error message.
Thank you for your suggestion.
Not that I know of. The event_generate method won't help here, ...


Good to know that.

I think Window is a different beast as it doesn't have a window
manager.

Thank you,
Aki Niimura

Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1870
by: Daniel Bickett | last post by:
Hi, The truth is I despise windows xp balloon tips. Well, not so much the balloon tips, but how they're used by the operating system: like I need my system tray to tell me when there are "unused icons" on my desktop, or that "local disk" has less than 200 mb of free space. But I digress I liked the way GTray told me when I had new mail using the balloon tip, and so when I replicated the program in python for use with
1
1608
by: Reuben | last post by:
Windows XP supports balloon notifications and I was wondering how I would be able to use them from a .NET application. There is already a NotifyIcon component which can post a icon in the taskbar, but it doesn't support balloons. Is there any way to use a balloon notification from a .NET app (preferably using a NotifyIcon if an icon needs to be implemented)?
0
2546
by: sanjana | last post by:
hi i want to write a C# .net code to display a balloon in the task bar i have used notifyicon class to get the icon in the task bar then i have used Shell_NotifyIcon and NotifyIconData structure for getting the balloon So now i have an icon n a balloon in the task bar But i wan tht when i click on the yellow windows balloon an event should be fired I know tht i have to use NIN_BALLOONUSERCLICK of Shell_NotifyIcon for
5
1170
by: Edwin Knoppert | last post by:
I have registered and i expected some reg code, not! The balloon keeps appearing, how to get rid of that? vwd-express
2
3524
by: Andrea V.F. | last post by:
I use the code below (VB.NET) to display a Popup balloon in the Tray Icon of my application. The balloon is displayed, but the timeout never happens and the balloon is always visible even if I set it. Where is the error?? Please Help me. Thanks. Imports System.Runtime.InteropServices Public Class ClsNotifyBalloon
1
2320
by: kieran.j.lee | last post by:
Hi, I have hunted round the web and managed to put together some code which displays a balloon tip for a notification icon in the system tray when I am running a windows service. This times out after about 10 seconds if I move the mouse around the screen which is pretty much okay, but if I don't do anything the balloon just stays showing for a long time. Is there a method to kill this balloon tip without killing the whole icon (a...
0
1441
by: Eric | last post by:
Hi, For my program I use the notification control to show the user at least an icon or if (s)he decides to, a balloon as wel with some info. In the balloon I have two linkbuttons en the problem comes when the user taps on one of them. One linkbutton is to show a form, the other is to stop the program. After tapping on STOP the notification should go away and a messagebox appears with the question if the user really wants to stop.
1
15883
by: MrNobody | last post by:
You know those little balloon tips that come out of your task bar- like for example when Windows warns you about window supdates being available? I'd like to create some of those from my C# app... Can you tell me how? I want to use it to notify users of an event while my program is running in the background (possibly as a service) and it would be really nice if I can add clickable links in that blaloon tip to open a window for details....
3
4772
devonknows
by: devonknows | last post by:
Hi, what it is I've got balloon tips working after a lot of trial and error lol and it comes up when the application is minimized to the tray notifying the user that it has been minimized. What I want to do is add a little functionality to the balloon tip, for example like Windows Live Mail application, it has on the balloon tip. "Click here to stop showing this message" or something or other in the balloon tip, I was wondering is there any...
0
7962
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7884
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8267
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8380
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8258
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6681
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5423
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3921
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1229
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.