I was just talking to Michael Foord at EuroPython about this. My proposal would be: 1. If the type's fully qualified names are the same then we should report an error that warns you about loader contexts 2. if the types names are the same but the fully qualified names are different we should include the fully qualified names 3. Otherwise we should include just the simple type name.
Sound reasonable? > -----Original Message----- > From: users-boun...@lists.ironpython.com [mailto:users- > boun...@lists.ironpython.com] On Behalf Of Jeff Hardy > Sent: Monday, July 19, 2010 5:54 PM > To: Discussion of IronPython > Subject: Re: [IronPython] TypeError: expected Size, got Size > > I think, for .NET types, it might make sense to include the full > namespace to avoid situations like this. > > - Jeff > > 2010/7/19 Dino Viehland <di...@microsoft.com>: > > You'll need to go to the page for the Size class - > > http://msdn.microsoft.com/en-us/library/system.windows.size.aspx It's > in > > WindowsBase.dll instead of PresentationCore. > > > > > > > > From: users-boun...@lists.ironpython.com > > [mailto:users-boun...@lists.ironpython.com] On Behalf Of Lukas > Cenovsky > > Sent: Monday, July 19, 2010 5:34 PM > > To: Discussion of IronPython > > Subject: Re: [IronPython] TypeError: expected Size, got Size > > > > > > > > On 19.7.2010 18:15, Ian Hobson wrote: > > > > On 19/07/2010 16:57, Lukas Cenovsky wrote: > > > > And I need to know how to find out where I can get the correct > definition of > > Size. > > > > Grid is UIElement and you need System.Windows.Size for > UIElement.Measure - > > not System.Drawing.Size. See > > http://msdn.microsoft.com/en- > us/library/system.windows.uielement.measure.aspx. > > > > Hi Lukas, > > > > Thanks for the info. I went to the page and it told me > > > > Namespace: System.Windows > > Assembly: PresentationCore (in PresentationCore.dll) > > > > Therefore I ensured my code contained the two lines > > > > clr.AddReference("PresentationCore") > > from Systems.Windows import Size > > > > This gives me > > ImportError: Cannot import name Size > > > > giving the line numebr of the import line. > > > > Conclusion : I am missing something - and I don't know how to find it > out. > > > > Well, UIElement.Measure is in assembly PresentationCore but > > System.Windows.Size structure is in assembly WindowsBase: > > http://msdn.microsoft.com/en-us/library/system.windows.size.aspx. > This is > > the link in Parameters section of UIElement.Measure - availableSize > > parameter. > > > > -- > > -- Lukáš > > > > _______________________________________________ > > Users mailing list > > Users@lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > _______________________________________________ > Users mailing list > Users@lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com