<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
That would be nice. Thanks.<br>
<br>
--<br>
-- Lukáš<br>
<br>
<br>
Shri Borde wrote:
<blockquote
 cite="mid:8E45365BECA665489F3CB8878A6C1B7D0C95ABD7@TK5EX14MBXC140.redmond.corp.microsoft.com"
 type="cite">
  <pre wrap="">It is a know bug. I can take a look next week.

-----Original Message-----
From: <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>] On Behalf Of Michael Foord
Sent: Saturday, February 06, 2010 4:10 AM
To: Discussion of IronPython
Subject: Re: [IronPython] clrtype: How to subclass ClrClass?

On 06/02/2010 11:19, Lukas Cenovsky wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi all,
it looks like I cannot subclass a class based on ClrClass metaclass:

IronPython 2.6 (2.6.10920.0) on .NET 2.0.50727.4927
Type "help", "copyright", "credits" or "license" for more information.
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <pre wrap="">import clr
import clrtype

class Product(object):
          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre wrap="">... __metaclass__ = clrtype.ClrClass
...
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <pre wrap="">p = Product()
print "CLR type name: %s" % p.GetType().FullName
          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre wrap="">CLR type name: Product
    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <pre wrap="">class MyProduct(Product):
          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <pre wrap="">... pass
...
Traceback (most recent call last):
File "&lt;stdin&gt;", line 1, in &lt;module&gt;
KeyError: The given key was not present in the dictionary.

Is it a bug or am I doing something wrong? Thanks.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Hehe, I ran into this a couple of days ago on Silverlight as well.

All the best,

Michael

  </pre>
  <blockquote type="cite">
    <pre wrap="">-- 
-- Lukáš


_______________________________________________
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>
  <pre wrap=""><!---->

  </pre>
</blockquote>
<br>
</body>
</html>