[IronPython] [resend] changes in COM access from IronPython 1.1
Ernesto Cullen
ecullen at fibertel.com.ar
Fri Jun 25 17:26:16 CEST 2010
Sending this again, someone have an idea?
Ernesto
we have a problem with a project after updating it to IPy 2.6.1. We
need to use a COM library; we add the reference in VS which creates the
interop.XXX file. In IPy v1.1 we could access the imported types
directly, like
LN_AclEntry = LN_dbACL.GetEntry(entryName)
if (LN_AclEntry == None):
DebugMessage("%s entry does not exist in database: %s" %(entryName,
databaseName))
else:
if (LN_AclEntry.Level >= ACLLEVEL.ACLLEVEL_DESIGNER):
...
the important line here is the last one: in IPy 1.1, LN_AclEntry is an
instance of LN_AclEntry {Domino.NotesACLEntryClass}. In IPy 2.6.1, this
same variable is of type LN_AclEntry {System.__ComObject}.
This means we can't access Level property and compare with ACLLEVEL
enumeration.
Is there something we can do to get v1.1 behaviour back? If not, can we
cast somehow the object to the correct type?
Thanks in advance,
Ernesto Cullen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100625/46bd7dd9/attachment.html>
More information about the Ironpython-users
mailing list