<!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">
This looks very promising but I cannot make it work. I have changed
product.py in DevHawk's example to:<br>
<br>
<pre>#from clrtypeold import ClrMetaclass
import clrtype

class Product(object):
  #__metaclass__ = ClrMetaclass
  __metaclass__ = clrtype.ClrClass
  _clrnamespace = "DevHawk.IronPython.ClrTypeSeries"
  #_clrproperties = {
    #"name":str,
    #"cost":float,
    #"quantity":int,
    #}
    
  def __init__(self, name, cost, quantity):
    self.name = name
    self.cost = cost
    self.quantity = quantity
    
  def calc_total(self):
    return self.cost * self.quantity

  @property
  @clrtype.accepts()
  @clrtype.returns(str)
  def name(self):
      return self._name

  @name.setter
  @clrtype.accepts(str)
  @clrtype.returns()
  def name(self, value):
      self._name = value

</pre>
When I run it I don't see any items in the listbox. When I check the
name, it is a property:<br>
<br>
<pre><span class="silverlightDlrReplPrompt">py&gt;</span> a.root.listbox1.Items[0]</pre>
<div class="silverlightDlrReplValue">
<pre>=&gt; &lt;Product object at 0x000000000000002B&gt;</pre>
</div>
<pre><span class="silverlightDlrReplPrompt">py&gt; </span>a.root.listbox1.Items[0].GetType().GetProperties()</pre>
<div class="silverlightDlrReplValue">
<pre>=&gt; Array[PropertyInfo]((&lt;System.Reflection.RuntimePropertyInfo object at 0x000000000000002C [System.String name]&gt;))</pre>
</div>
<pre>
</pre>
Whe I used the old clrtype with _clrproperties = {'name': str, ...}, it
worked.<br>
<br>
--<br>
-- Luká¹<br>
<br>
<br>
Shri Borde wrote:
<blockquote
 cite="mid:8E45365BECA665489F3CB8878A6C1B7D0C80006B@TK5EX14MBXC140.redmond.corp.microsoft.com"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta name="Generator" content="Microsoft Word 12 (filtered medium)">
  <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.silverlightdlrreplprompt
        {mso-style-name:silverlightdlrreplprompt;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle23
        {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);">Here
is an updated version of clrtype.py that uses @property +
@clrtype.accepts/@clrtype.returns
to indicate a CLR property, instead of using &#8220;_clrproperties&#8221;. I think
its more Pythonic in general, but also you should be able to modify
@notify_property to work with it. <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>
  <p class="MsoNormal"><span
 style="font-size: 11pt; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);">Note
that notify_property won&#8217;t just work. You will have
to change it to propagate the func_name, arg_types, and return_type
properties
from the old getter/setter function objects to the new getter/setter
function
objects since these values are used by clrtype to generate the CLR
members.
Something like this:<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>
  <p class="MsoNormal"><span
 style="font-size: 11pt; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);">class
notify_property(property):<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>
  <p class="MsoNormal"><span
 style="font-size: 11pt; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);">   
  <span
 style="background: yellow none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">def
propagate_attributes(old_function, new_function):<o:p></o:p></span></span></p>
  <p class="MsoNormal"><span
 style="background: yellow none repeat scroll 0%; font-size: 11pt; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">       
new_function.func_name = old_function.func_name<o:p></o:p></span></p>
  <p class="MsoNormal"><span
 style="background: yellow none repeat scroll 0%; font-size: 11pt; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">       
new_function.arg_types = old_function.arg_types<o:p></o:p></span></p>
  <p class="MsoNormal"><span
 style="background: yellow none repeat scroll 0%; font-size: 11pt; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">       
new_function.return_type = old_function.return_type</span><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>
  <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>
  <p class="MsoNormal"><span
 style="font-size: 11pt; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);">   
def __init__(self, getter):<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);">       
def newgetter(slf):<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);">           
try:<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);">               
return getter(slf)<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);">           
except AttributeError:<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);">               
return None<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);">       
  <span
 style="background: yellow none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">propagate_attributes(getter,
newgetter)</span><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);">       
super(notify_property, self).__init__(newgetter)<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>
  <p class="MsoNormal"><span
 style="font-size: 11pt; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);">   
def setter(self, setter):<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);">       
def newsetter(slf, newvalue):<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);">           
oldvalue = self.fget(slf)<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);">           
if oldvalue != newvalue:<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);">               
setter(slf, newvalue)<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);">               
slf.OnPropertyChanged(setter.__name__)<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);">       
  <span
 style="background: yellow none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">propagate_attributes(setter,
newsetter)</span><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);">       
return property(<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);">           
fget=self.fget,<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);">           
fset=newsetter,<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);">           
fdel=self.fdel,<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);">           
doc=self.__doc__)<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;">
Lukas Cenovsky
[<a class="moz-txt-link-freetext" href="mailto:cenovsky@bakalari.cz">mailto:cenovsky@bakalari.cz</a>] <br>
  <b>Sent:</b> Thursday, November 12, 2009 11:01 AM<br>
  <b>To:</b> Shri Borde<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">Shri Borde wrote: <o:p></o:p></p>
  <p class="MsoNormal"><span
 style="font-size: 11pt; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);">So
the new clrtype.py still works - cool!</span><o:p></o:p></p>
  <p class="MsoNormal">Yep ;-)<br>
  <br>
  <o:p></o:p></p>
  <p class="MsoNormal"><span
 style="font-size: 11pt; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);"> I
am not an expert on data binding, so I don&#8217;t have
any suggestions. Why do you say that the decorator approach will not
work with
Silverlight? Does @notifiy_property from <a moz-do-not-send="true"
 href="http://gui-at.blogspot.com/2009/11/inotifypropertychanged-in-ironpython.html">http://gui-at.blogspot.com/2009/11/inotifypropertychanged-in-ironpython.html</a>
use any feature not available in Silverlight?</span><o:p></o:p></p>
  <p class="MsoNormal" style="margin-bottom: 12pt;">It does not (as far
as I know
because it is pure IronPython). But @notify_property does not work with
clrtypes:<o:p></o:p></p>
  <pre>class ViewModel(NotifyPropertyChangedBase):<o:p></o:p></pre>
  <pre>    __metaclass__ = clrtype.ClrMetaclass<o:p></o:p></pre>
  <pre>    _clrnamespace = "Cenda.ViewModel"<o:p></o:p></pre>
  <pre>    _clrproperties = {'size': str}<o:p></o:p></pre>
  <pre>    <o:p></o:p></pre>
  <pre>    def __init__(self):<o:p></o:p></pre>
  <pre>        super(ViewModel, self).__init__()<o:p></o:p></pre>
  <pre>        # must be string to two-way binding work correctly<o:p></o:p></pre>
  <pre>        self.size = '10'<o:p></o:p></pre>
  <pre><o:p> </o:p></pre>
  <pre>    @notify_property<o:p></o:p></pre>
  <pre>    def size(self):<o:p></o:p></pre>
  <pre>        return self._size<o:p></o:p></pre>
  <pre><o:p> </o:p></pre>
  <pre>    @size.setter<o:p></o:p></pre>
  <pre>    def size(self, value):<o:p></o:p></pre>
  <pre>        self._size = value<o:p></o:p></pre>
  <pre>        print 'Size changed to %r' % self.size<o:p></o:p></pre>
  <pre><o:p> </o:p></pre>
  <p class="MsoNormal"><br>
When I run this code, the size is still clr property and Python getter
and
setter are not run.<br>
  <br>
So basically I need to override/enhance clr getter and setter created
by
clrtype._clrproperties.<br>
  <br>
--<br>
-- Luká¹<br>
  <br>
  <br>
  <o:p></o:p></p>
  <p class="MsoNormal"><span
 style="font-size: 11pt; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);"> </span><o:p></o:p></p>
  <div>
  <div
 style="border-style: solid none none; border-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;">
Lukas Cenovsky [<a moz-do-not-send="true"
 href="mailto:cenovsky@bakalari.cz">mailto:cenovsky@bakalari.cz</a>] <br>
  <b>Sent:</b> Thursday, November 12, 2009 8:09 AM<br>
  <b>To:</b> Shri Borde<br>
  <b>Subject:</b> Re: [IronPython] .NET attributes for methods</span><o:p></o:p></p>
  </div>
  </div>
  <p class="MsoNormal"> <o:p></o:p></p>
  <p class="MsoNormal">Thanks, that works!<br>
  <br>
What do you think would be the best approach to create notifiable
properties for
Silverlight? I did it for WPF (via decorators: <a
 moz-do-not-send="true"
 href="http://gui-at.blogspot.com/2009/11/inotifypropertychanged-in-ironpython.html">http://gui-at.blogspot.com/2009/11/inotifypropertychanged-in-ironpython.html</a>)
but it seems to me it won't be possible to do it similarly for
Silverlight...<br>
  <br>
--<br>
-- Luká¹<br>
  <br>
Shri Borde wrote: <o:p></o:p></p>
  <p class="MsoNormal"><span
 style="font-size: 11pt; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);">Can
you use &#8220;_clrproperties&#8221; instead of
&#8220;_clrfields&#8221;? DevHawk&#8217;s same created a field and a property
even when you just used &#8220;_clrfields&#8221;. I don&#8217;t do that
anymore. So you will need to use &#8220;_clrproperties&#8221; to get
properties, which SL must use for data binding.</span><o:p></o:p></p>
  <p class="MsoNormal"><span
 style="font-size: 11pt; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);"> </span><o:p></o:p></p>
  <div>
  <div
 style="border-style: solid none none; border-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 moz-do-not-send="true"
 href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</a>
[<a moz-do-not-send="true"
 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> Wednesday, November 11, 2009 2:37 AM<br>
  <b>To:</b> Discussion of IronPython<br>
  <b>Subject:</b> Re: [IronPython] .NET attributes for methods</span><o:p></o:p></p>
  </div>
  </div>
  <p class="MsoNormal"> <o:p></o:p></p>
  <p class="MsoNormal">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:<o:p></o:p></p>
  <pre><span class="silverlightdlrreplprompt">py&gt; </span>a.root.FindName('listbox1').ItemsSource[0].GetType().GetFields()<o:p></o:p></pre>
  <div>
  <pre>=&gt; Array[FieldInfo]((&lt;System.Reflection.RtFieldInfo object at 0x000000000000002B [Double cost]&gt;,<o:p></o:p></pre>
  <pre>&lt;System.Reflection.RtFieldInfo object at 0x000000000000002C [Int32 quantity]&gt;,<o:p></o:p></pre>
  <pre>&lt;System.Reflection.RtFieldInfo object at 0x000000000000002D [System.String name]&gt;,<o:p></o:p></pre>
  <pre>&lt;System.Reflection.RtFieldInfo object at 0x000000000000002E [IronPython.Runtime.Types.PythonType .class]&gt;,<o:p></o:p></pre>
  <pre>&lt;System.Reflection.RtFieldInfo object at 0x000000000000002F [IronPython.Runtime.PythonDictionary .dict]&gt;,<o:p></o:p></pre>
  <pre>&lt;System.Reflection.RtFieldInfo object at 0x0000000000000030 [System.Object[] .slots_and_weakref]&gt;))<o:p></o:p></pre>
  </div>
  <p class="MsoNormal"><br>
Shri:<o:p></o:p></p>
  <pre><span class="silverlightdlrreplprompt">py&gt; </span>a.root.FindName('listbox1').ItemsSource[0].GetType().GetFields()<o:p></o:p></pre>
  <div>
  <pre>=&gt; Array[FieldInfo]((&lt;System.Reflection.RtFieldInfo object at 0x000000000000002B [Double cost]&gt;,<o:p></o:p></pre>
  <pre>&lt;System.Reflection.RtFieldInfo object at 0x000000000000002C [Int32 quantity]&gt;,<o:p></o:p></pre>
  <pre>&lt;System.Reflection.RtFieldInfo object at 0x000000000000002D [System.String name]&gt;,<o:p></o:p></pre>
  <pre>&lt;System.Reflection.RtFieldInfo object at 0x000000000000002E [IronPython.Runtime.Types.PythonType .class]&gt;,<o:p></o:p></pre>
  <pre>&lt;System.Reflection.RtFieldInfo object at 0x000000000000002F [IronPython.Runtime.PythonDictionary .dict]&gt;,<o:p></o:p></pre>
  <pre>&lt;System.Reflection.RtFieldInfo object at 0x0000000000000030 [System.Object[] .slots_and_weakref]&gt;))<o:p></o:p></pre>
  <p class="MsoNormal"> <o:p></o:p></p>
  </div>
  <p class="MsoNormal">--<br>
-- Luká¹<br>
  <br>
  <br>
Shri Borde wrote: <o:p></o:p></p>
  <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?</span><o:p></o:p></p>
  <p class="MsoNormal"><span
 style="font-size: 11pt; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);"> </span><o:p></o:p></p>
  <div>
  <div
 style="border-style: solid none none; border-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 moz-do-not-send="true"
 href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</a>
[<a moz-do-not-send="true"
 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</span><o:p></o:p></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><o:p></o:p></p>
  <p class="MsoNormal"> <o:p></o:p></p>
  <p class="MsoNormal"><o:p> </o:p></p>
  </div>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a>
<a class="moz-txt-link-freetext" href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a>
  </pre>
</blockquote>
<br>
</body>
</html>