def Register(self):
if self.isRegistered: return
# Get the type info to use to build this item.
# if not self.dispatch:
# id = self.parentItem.dispatch.GetIDsOfNames(self.name)
# print "DispID of me is", id
# result = self.parentItem.dispatch.Invoke(id, 0, pythoncom.DISPATCH_PROPERTYGET,1)
# if type(result)==pythoncom.TypeIIDs[pythoncom.IID_IDispatch]:
# self.dispatch = result
# else:
# print "*** No dispatch"
# return
# print "**** Made dispatch"
self.isRegistered = 1
# Register the sub-items.
for item in self.subItems.itervalues():
if not item.isRegistered:
item.Register()
评论列表
文章目录