<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-2" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I did change __metaclass__ to ClrMetaclass. See the attached source I
use for testing - the only difference is to comment/uncomment
appropriate part in product.py.<br>
<br>
The outputs look the same, there are no visible exceptions:<br>
<br>
DevHawk:<br>
<pre><span class="silverlightDlrReplPrompt">py&gt; </span>a.root.FindName('listbox1').ItemsSource[0].GetType().GetFields()</pre>
<div class="silverlightDlrReplValue">
<pre>=&gt; Array[FieldInfo]((&lt;System.Reflection.RtFieldInfo object at 0x000000000000002B [Double cost]&gt;,</pre>
<pre>&lt;System.Reflection.RtFieldInfo object at 0x000000000000002C [Int32 quantity]&gt;,</pre>
<pre>&lt;System.Reflection.RtFieldInfo object at 0x000000000000002D [System.String name]&gt;,</pre>
<pre>&lt;System.Reflection.RtFieldInfo object at 0x000000000000002E [IronPython.Runtime.Types.PythonType .class]&gt;,</pre>
<pre>&lt;System.Reflection.RtFieldInfo object at 0x000000000000002F [IronPython.Runtime.PythonDictionary .dict]&gt;,</pre>
<pre>&lt;System.Reflection.RtFieldInfo object at 0x0000000000000030 [System.Object[] .slots_and_weakref]&gt;))</pre>
</div>
<br>
Shri:<br>
<pre><span class="silverlightDlrReplPrompt">py&gt; </span>a.root.FindName('listbox1').ItemsSource[0].GetType().GetFields()</pre>
<div class="silverlightDlrReplValue">
<pre>=&gt; Array[FieldInfo]((&lt;System.Reflection.RtFieldInfo object at 0x000000000000002B [Double cost]&gt;,</pre>
<pre>&lt;System.Reflection.RtFieldInfo object at 0x000000000000002C [Int32 quantity]&gt;,</pre>
<pre>&lt;System.Reflection.RtFieldInfo object at 0x000000000000002D [System.String name]&gt;,</pre>
<pre>&lt;System.Reflection.RtFieldInfo object at 0x000000000000002E [IronPython.Runtime.Types.PythonType .class]&gt;,</pre>
<pre>&lt;System.Reflection.RtFieldInfo object at 0x000000000000002F [IronPython.Runtime.PythonDictionary .dict]&gt;,</pre>
<pre>&lt;System.Reflection.RtFieldInfo object at 0x0000000000000030 [System.Object[] .slots_and_weakref]&gt;))</pre>
<br>
</div>
--<br>
-- Luká¹<br>
<br>
<br>
Shri Borde wrote:
<blockquote
 cite="mid:8E45365BECA665489F3CB8878A6C1B7D0C7FCAD5@TK5EX14MBXC140.redmond.corp.microsoft.com"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
  <style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
  </style><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
  <div class="Section1">
  <p class="MsoNormal"><span
 style="font-size: 11pt; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);">Note
that you will have to set __metaclass__ to ClrMetaclass,
not ClrTypeMetaclass as in DevHawk&#8217;s sample. I had changed the name of
the type. The old name will cause a NameError, but maybe SL is hiding
exceptions. Can you do &#8220;o.GetType().GetFields()&#8221; and display that
on the page to inspect the object and also make sure that no exceptions
were
thrown?<o:p></o:p></span></p>
  <p class="MsoNormal"><span
 style="font-size: 11pt; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
  <div>
  <div
 style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">
  <p class="MsoNormal"><b><span
 style="font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;; color: windowtext;">From:</span></b><span
 style="font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;; color: windowtext;">
<a class="moz-txt-link-abbreviated" href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</a>
[<a class="moz-txt-link-freetext" href="mailto:users-bounces@lists.ironpython.com">mailto:users-bounces@lists.ironpython.com</a>] <b>On Behalf Of </b>Lukas
Cenovsky<br>
  <b>Sent:</b> Tuesday, November 10, 2009 2:59 PM<br>
  <b>To:</b> Discussion of IronPython<br>
  <b>Subject:</b> Re: [IronPython] .NET attributes for methods<o:p></o:p></span></p>
  </div>
  </div>
  <p class="MsoNormal"><o:p> </o:p></p>
  <p class="MsoNormal">I have just found that the Silverlight binding
does not work
with this version of clrtype and/or IronPython 2.6RC2.<br>
I used DevHawk demo [1] and after I added reference to
Microsoft.Dynamic in
clrtypemetaclass.py it worked flawlessly. But when I switch to your
version, no
items show in the listbox.<br>
  <br>
By the way - I have seen a commit message you have added support for
interfaces
- nice! ;-)<br>
  <br>
--<br>
-- Luká¹<br>
  <br>
[1] <a moz-do-not-send="true"
 href="http://cid-0d9bc809858885a4.skydrive.live.com/self.aspx/DevHawk%20Content/IronPython%20Stuff/%5E_%5E_clrtype%5E_%5E_/SL%20databinding%20demo.zip">http://cid-0d9bc809858885a4.skydrive.live.com/self.aspx/DevHawk%20Content/IronPython%20Stuff/^_^_clrtype^_^_/SL%20databinding%20demo.zip</a><br>
  </p>
  </div>
</blockquote>
</body>
</html>