wasm-demo/demo/ermis-f/python_m/cur/0171

76 lines
2.6 KiB
Plaintext

From: hyoon at bigfoot.com (Hoon Yoon)
Date: Tue, 13 Apr 1999 18:22:29 -0400
Subject: Event in COM
Message-ID: <3713C3A5.59CB36E5@bigfoot.com>
Content-Length: 2414
X-UID: 171
Hi,
Can anyone show me some code or recommend me a book for this problem?
I look through the newsgroup and tried to read the source, but I cannot
figuire it out. (Thanks in Adv)
I am trying to write an event handler for a ocx control that receives
real time data. Obviously, I cannot retrieve anything without event
handelers.
after following:
>> import win32com.client
>> rR = win32com.client.Dispatch('RTLIST.RTList')
----
Obvious place for me to do this is at
gen_py/xxxxxxx-0900000--33242432.py (something like it)
by uncommenting those lines and writing it in, but I would like to write
a class by inheriting it and overwriting it and keep these things
general as possible.
class _DRTListEvents:
"Xyris RTList Control events"
CLSID = pythoncom.MakeIID('{122B0CF2-C843-11CF-8925-00AA00575EBE}')
_public_methods_ = [] # For COM Server support
_dispid_to_func_ = {
3 : "OnChangeEx",
4 : "OnErrorEx",
1 : "OnSnapComplete",
2 : "OnChange",
5 : "OnChangeVnt",
}
def __init__(self, oobj = None):
pass
def _query_interface_(self, iid):
import win32com.server.util
if iid==self.CLSID: return win32com.server.util.wrap(self)
# Handlers for the control
# If you create handlers, they should have the following prototypes:
# def OnChangeEx(self, ItemIndex=defaultNamedNotOptArg,
ItemName=defaultNamedNotOptArg, ItemValue=defaultNamedNotOptArg,
ItemStatus=defaultNamedNotOptArg, ChangeType=defaultNamedNotOptArg):
# "Occurs whenever real-time update is made to an item in the list"
# def OnErrorEx(self, ErrorCode=defaultNamedNotOptArg):
# "Occurs when RTList experiences an error communicating with the
real-time data source"
Help!
--
*****************************************************************************
S. Hoon Yoon (Quant) Merrill Lynch Equity Trading,
yelled at yahoo.com hoon at bigfoot.com(w)
"Miracle is always only few standard deviations away, but so is
catastrophe."
* Expressed opinions are often my own, but NOT my employer's.
"I feel like a fugitive from the law of averages." Mauldin
*****************************************************************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vcard.vcf
Type: text/x-vcard
Size: 202 bytes
Desc: Card for Hoon Yoon
URL: <http://mail.python.org/pipermail/python-list/attachments/19990413/9c4d028f/attachment.vcf>