<html dir="ltr"><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta content="MSHTML 6.00.6000.16735" name="GENERATOR">
<style title="owaParaStyle">P {
MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</style>
</head>
<body ocsi="x">
<div dir="ltr"><font face="Tahoma" color="#000000" size="2">I wouldn't expect any breaking changes in COM until IronPython 3.0 at the earliest. That being said our COM binding logic is actually owned by the DLR team. They have been and will continue working
on fixing bugs in the COM binding logic. Therefore you might see us integrate in small bug fixes but nothing that would break your code.
</font></div>
<div dir="ltr"><font face="Tahoma" color="#000000" size="2"></font> </div>
<div dir="ltr"><font face="Tahoma" color="#000000" size="2">I think ideally we'd all love to see us match pywin32 as closely as possible so we might at some point revisit the way we currently are doing the binding (and recent changes in the DLR should make
this much easier than it was before). I think we'd approach this by enabling both behaviors so .Item works as well as calling, eventually start issuing warnings on .Item, and then finally remove .Item in Ipy 3k or later.</font></div>
<div id="divRpF572550" style="DIRECTION: ltr">
<hr tabindex="-1">
<font face="Tahoma" size="2"><b>From:</b> users-bounces@lists.ironpython.com [users-bounces@lists.ironpython.com] On Behalf Of Vernon Cole [vernondcole@gmail.com]<br>
<b>Sent:</b> Wednesday, November 26, 2008 7:51 AM<br>
<b>To:</b> Discussion of IronPython<br>
<b>Subject:</b> Re: [IronPython] COM Object Issue<br>
</font><br>
</div>
<div></div>
<div>That's a really fine question. I had to change all of my COM item access twice now in adodbapi. I finally ended up using a function, because iron python and c python are so different in this area. My current code is:<br>
<div style="MARGIN-LEFT: 40px">if onIronPython: <br>
def getIndexedValue(obj,index):<br>
return obj.Item[index]<br>
else: #pywin32<br>
def getIndexedValue(obj,index):<br>
return obj(index) <br>
</div>
<br>
So I can (for example, reading the field definitions of an ADO recordset):<br>
<br>
nOfFields=rs.Fields.Count<br>
for i in range(nOfFields):<br>
f=getIndexedValue(rs.Fields,i)<br>
<br>
Question: Will this continue to work in future versions of IronPython?<br>
--<br>
Vernon Cole<br>
<br>
<div class="gmail_quote">On Wed, Nov 26, 2008 at 2:50 AM, Zaur Shibzoukhov <span dir="ltr">
<<a href="mailto:szport@gmail.com">szport@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
What will happen with the item-like access to COM objects in IP 2.0?<br>
<br>
Whether it will return to []-like access (as in RC 1) or it will<br>
remain .Item(...)?<br>
IMHO RC 1 way is more preferred.<br>
<br>
Best regards,<br>
Zaur<br>
<br>
2008/10/27 Dino Viehland <<a href="mailto:dinov@microsoft.com">dinov@microsoft.com</a>>:<br>
<div>
<div></div>
<div class="Wj3C7c">> Oh, and I'm not sure if this is by design or not (I'll need to ping the DLR team), but it seems you can do:<br>
><br>
> wd.Variables.Item('foo')<br>
><br>
> instead.<br>
><br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</body>
</html>