473,386 Members | 1,702 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Events in Com Object for Python

I have MapPoint working in Python, and I'm trying to cancel events on
the map, but I can't seem to make that happen. I'm responding to the
events successfully in my panel object. My code is like this:

global MapPointMod
MapPointMod =
win32com.client.gencache.EnsureModule("{51C0A9CA-F7B7-4F5A-96F4-43927C6FA50F}",
0, 1, 0)

class MyPanel(wx.Panel):
def __init__(self, *args, **kwds):
# begin wxGlade: MyPanel.__init__
kwds["style"] = wx.TAB_TRAVERSAL
wx.Panel.__init__(self, *args, **kwds)
self.frame = args[0]

MyMap = MakeActiveXClass(MapPointMod.MappointControl,
eventObj=self)
self.window_1 = MyMap(self, -1)
self.window_1.OpenMap("C:\\TEMP\\GPS_ON.ptt")
....
....
def OnBeforeClick(self, Button, Shift, X, Y, Cancel):
print "tada"
My event fires just fine, but I can't seem to figure out how to cancel
the event so that mappoint doesn't do its stuff with it...I've tried
setting Cancel based on the mappoint specs, but it doesn't seem to get
sent back anywhere...

Any ideas please?

Thanx,

OLIVER
Aug 16 '07 #1
0 821

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

Similar topics

3
by: HankC | last post by:
Greetings: I'm been programming Delphi for a while and am trying to get into the Python mindset. In Delphi, you can have a component class that has properties, methods, and events. Properties...
0
by: Andrew Perella | last post by:
Hi, Has anyone managed to hook into visual studio dot net build events (or any other events)? I can add my own button to a toolbar from python and handle that events due to...
4
by: Dirk Thierbach | last post by:
I am writing an Python 2.3 extension in C, and I would like to create events (Tk-style) from an external source. I use a library that already parses the events into a C structure. This library can...
5
by: factory | last post by:
Anyone want to comment on what they think of this following bit of a simple event framework? Are there any really obvious things I should be doing with this code that stop me from getting bitten...
0
by: Robert Kaplan | last post by:
Hi, I'm new to the group, so greetings all! I'm working on an application try to respond to events in Microsoft Access using Python and win32com. However, I'm having trouble in setting up...
9
by: redefined.horizons | last post by:
Here is another non-pythonic question from the Java Developer. (I beg for forgiveness...) Does Python have a mechanism for events/event-driven programming? I'm not necessarily talking about...
4
by: Gianmaria | last post by:
Hi, i'm a .net programmer and i'm learnig python, so this question can be very stupid or easy for python programmers. I've a doubt about events.... here is what: in c# for example i can write a...
2
by: Oliver Nelson | last post by:
I have MapPoint working in Python, and I'm trying to cancel events on the map, but I can't seem to make that happen. I'm responding to the events successfully in my panel object. My code is like...
1
by: swethak | last post by:
Hi, I am desiging the calendar application for that purpose i used the below code. But it is for only displys calendar. And also i want to add the events to calendar. In that code displys the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...

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.