Re: [IronPython] Viewlets: Any F# experts here?

2008-06-29 Thread Michael Foord
Ok Chip - thanks for getting in touch. (I've cc'ed the list as it is a 
'subscribers only' mailing list).


I'll check out the source for VSLab and have another play.

Thanks

Michael

Chip wrote:

Michael,

I posted twice to this thread but posts are not shown in the thread. I
mail my post to you:

Note: since I've posted but I don't see my reply I post again, sorry
if it is (almost) a duplicate

Hi I am Antonio Cisternino, author of VSLab,

Viewlets have been designed to be as close as possible to WinForms
UserControls, the Viewlet class inherit from control and simply
implements the communication with Visual Studio. In the roadmap we
think to let Viewlets to be used standalone, but for the moment I
would simply open the VSLabViewlets project and change the base class
from Viewlet to UserControl. Few more changes will be required. On the
Web site you'll find a few whitepapers describing Viewlets and VSLab
architecture, is less tied to VS than you would think.

-- Ciao,
-- Antonio


On Jun 27, 5:26 pm, Michael Foord <[EMAIL PROTECTED]> wrote:
  

Curt Hagenlocher wrote:


The Viewlet architecture in VSLab looks very closely tied to Visual
Studio.  The MK_E_UNAVAILABLE error is almost certainly because
Viewlet.Show is trying (and failing) to do a
Marshal.GetActiveObject("VisualStudio.DTE").
  

Ok - thanks for your help Curt. I guess using it standalone is out of
the question then.

At some point I would like to learn F#, so I may revisit it then - but
I'll drop it for now.

Michael







On Fri, Jun 27, 2008 at 7:35 AM, Michael Foord
<[EMAIL PROTECTED] > wrote:
  
Curt Hagenlocher wrote:
  
Oh, duh, it hosts itself inside that ViewletProxy that was

previously uninitialized :)
 Are you doing this with Visual Studio running?
  
I tried hosting it in a separate form and it didn't show. I'm

running standalone under IronPython - no VS.
  
Michael
  
On Fri, Jun 27, 2008 at 6:52 AM, Curt Hagenlocher

<[EMAIL PROTECTED] 
>>
wrote:
  
   That "dir" error is a known problem with beta 3 -- and as you

   might imagine, sky-high in priority on our list of things
to fix
   for beta 4.
   Viewlets appear to be user controls; you probably need
to host one
   in a Form.
  
   On Fri, Jun 27, 2008 at 6:45 AM, Michael Foord

   <[EMAIL PROTECTED]

>> wrote:
  
   Curt Hagenlocher wrote:
  
   A bit of quality time with Reflector shows that

there's a
   _viewletsProxy object which hasn't been
initialized.  You
   probably need to call VSLabFSICore.Viewlets.Init()
first.
It's static, and in the vslabfsicore module.
  
   Thanks Curt - your reflector-fu is greater than mine. I

should
   spend some quality time with it.
  
   Your advice gets me to the next step, I can make a

   GraphControl flash momentarily into view (on creation), but
   attempting to show it causes another explosion:
  
   C:\compile\VSLab>C:\compile\IronPython-2.0B3\ipy.exe

   -X:ExceptionDetail viewlet.
   py
   Operation unavailable (Exception from HRESULT: 0x800401E3
   (MK_E_UNAVAILABLE))
at
  
 System.Runtime.InteropServices.Marshal.GetActiveObject(Guid&

   rclsid, IntPt
   r reserved, Object& ppunk)
at
  
 System.Runtime.InteropServices.Marshal.GetActiveObject(String

   progID)
at VSLabFSICore.Viewlet.Show()
at GraphViewlet.GraphControl.Show()
at _stub_$28##26(Closure , CallSite , CodeContext ,
Object )
  
at _stub_MatchCaller(Object , CallSite , Object[] )

at
  
 Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[]

   args)
at
  
 Microsoft.Scripting.Actions.UpdateDelegates.Update2[T,T0,T1,TRet](CallSite

   site, T0 arg0, T1 arg1)
at S$2.Initialize(CodeContext )
at
IronPython.Hosting.PythonCommandLine.RunFileWorker(String
   fileName)
at IronPython.Hosting.PythonCommandLine.RunFile(String
fileName)
   EnvironmentError: Operation unavailable (Exception from
   HRESULT: 0x800401E3 (MK_
   E_UNAVAILABLE))
  
   The code that produces this is:
  
   import clr

   clr.AddReference('vslabfsicore')
 

Re: [IronPython] Viewlets: Any F# experts here?

2008-06-27 Thread Michael Foord

Curt Hagenlocher wrote:
The Viewlet architecture in VSLab looks very closely tied to Visual 
Studio.  The MK_E_UNAVAILABLE error is almost certainly because 
Viewlet.Show is trying (and failing) to do a 
Marshal.GetActiveObject("VisualStudio.DTE").


Ok - thanks for your help Curt. I guess using it standalone is out of 
the question then.


At some point I would like to learn F#, so I may revisit it then - but 
I'll drop it for now.


Michael



On Fri, Jun 27, 2008 at 7:35 AM, Michael Foord 
<[EMAIL PROTECTED] > wrote:


Curt Hagenlocher wrote:

Oh, duh, it hosts itself inside that ViewletProxy that was
previously uninitialized :)
 Are you doing this with Visual Studio running?


I tried hosting it in a separate form and it didn't show. I'm
running standalone under IronPython - no VS.

Michael


On Fri, Jun 27, 2008 at 6:52 AM, Curt Hagenlocher
<[EMAIL PROTECTED] 
>>
wrote:

   That "dir" error is a known problem with beta 3 -- and as you
   might imagine, sky-high in priority on our list of things
to fix
   for beta 4.
   Viewlets appear to be user controls; you probably need
to host one
   in a Form.

   On Fri, Jun 27, 2008 at 6:45 AM, Michael Foord
   <[EMAIL PROTECTED]

>> wrote:

   Curt Hagenlocher wrote:

   A bit of quality time with Reflector shows that
there's a
   _viewletsProxy object which hasn't been
initialized.  You
   probably need to call VSLabFSICore.Viewlets.Init()
first.
It's static, and in the vslabfsicore module.


   Thanks Curt - your reflector-fu is greater than mine. I
should
   spend some quality time with it.

   Your advice gets me to the next step, I can make a
   GraphControl flash momentarily into view (on creation), but
   attempting to show it causes another explosion:


   C:\compile\VSLab>C:\compile\IronPython-2.0B3\ipy.exe
   -X:ExceptionDetail viewlet.
   py
   Operation unavailable (Exception from HRESULT: 0x800401E3
   (MK_E_UNAVAILABLE))
at
 
 System.Runtime.InteropServices.Marshal.GetActiveObject(Guid&

   rclsid, IntPt
   r reserved, Object& ppunk)
at
 
 System.Runtime.InteropServices.Marshal.GetActiveObject(String

   progID)
at VSLabFSICore.Viewlet.Show()
at GraphViewlet.GraphControl.Show()
at _stub_$28##26(Closure , CallSite , CodeContext ,
Object )

at _stub_MatchCaller(Object , CallSite , Object[] )
at
 
 Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[]

   args)
at
 
 Microsoft.Scripting.Actions.UpdateDelegates.Update2[T,T0,T1,TRet](CallSite

   site, T0 arg0, T1 arg1)
at S$2.Initialize(CodeContext )
at
IronPython.Hosting.PythonCommandLine.RunFileWorker(String
   fileName)
at IronPython.Hosting.PythonCommandLine.RunFile(String
fileName)
   EnvironmentError: Operation unavailable (Exception from
   HRESULT: 0x800401E3 (MK_
   E_UNAVAILABLE))

   The code that produces this is:


   import clr
   clr.AddReference('vslabfsicore')
   clr.AddReference('vslabviewlets')

   from VSLabFSICore import Viewlets
   from GraphViewlet import GraphControl

   Viewlets.Init()
   g = GraphControl()
   g.Show()

   If instead of 'g.Show()' I attempt 'dir(g)' I get a
very odd
   error!


   C:\compile\VSLab>C:\compile\IronPython-2.0B3\ipy.exe
   -X:ExceptionDetail viewlet.
   py
   'this' type cannot be an interface itself.
at
System.RuntimeTypeHandle.GetFirstSlotForInterface(IntPtr
   interfaceHandle)
at System.RuntimeType.GetInterfaceMap(Type ifaceType)
at
 
 Microsoft.Scripting.Generation.CompilerHelpers.TryGetCallableMethod(Method

   Info method)
at
 
 Microsoft.Scripting.Generation.CompilerHelpers.FilterNonVisibleMembers(Typ

   e type, MemberInfo[] foundMembers)
at
 
 IronPython.Runtime.Types.TypeInfo.MemberBinder.GetMember(Type


Re: [IronPython] Viewlets: Any F# experts here?

2008-06-27 Thread Curt Hagenlocher
The Viewlet architecture in VSLab looks very closely tied to Visual Studio.
The MK_E_UNAVAILABLE error is almost certainly because Viewlet.Show is
trying (and failing) to do a Marshal.GetActiveObject("VisualStudio.DTE").

On Fri, Jun 27, 2008 at 7:35 AM, Michael Foord <[EMAIL PROTECTED]>
wrote:

> Curt Hagenlocher wrote:
>
>> Oh, duh, it hosts itself inside that ViewletProxy that was previously
>> uninitialized :)
>>  Are you doing this with Visual Studio running?
>>
>
> I tried hosting it in a separate form and it didn't show. I'm running
> standalone under IronPython - no VS.
>
> Michael
>
>
>> On Fri, Jun 27, 2008 at 6:52 AM, Curt Hagenlocher <[EMAIL PROTECTED]> [EMAIL PROTECTED]>> wrote:
>>
>>That "dir" error is a known problem with beta 3 -- and as you
>>might imagine, sky-high in priority on our list of things to fix
>>for beta 4.
>>Viewlets appear to be user controls; you probably need to host one
>>in a Form.
>>
>>On Fri, Jun 27, 2008 at 6:45 AM, Michael Foord
>> <[EMAIL PROTECTED] > wrote:
>>
>>Curt Hagenlocher wrote:
>>
>>A bit of quality time with Reflector shows that there's a
>>_viewletsProxy object which hasn't been initialized.  You
>>probably need to call VSLabFSICore.Viewlets.Init() first.
>> It's static, and in the vslabfsicore module.
>>
>>
>>Thanks Curt - your reflector-fu is greater than mine. I should
>>spend some quality time with it.
>>
>>Your advice gets me to the next step, I can make a
>>GraphControl flash momentarily into view (on creation), but
>>attempting to show it causes another explosion:
>>
>>
>>C:\compile\VSLab>C:\compile\IronPython-2.0B3\ipy.exe
>>-X:ExceptionDetail viewlet.
>>py
>>Operation unavailable (Exception from HRESULT: 0x800401E3
>>(MK_E_UNAVAILABLE))
>> at
>>System.Runtime.InteropServices.Marshal.GetActiveObject(Guid&
>>rclsid, IntPt
>>r reserved, Object& ppunk)
>> at
>>System.Runtime.InteropServices.Marshal.GetActiveObject(String
>>progID)
>> at VSLabFSICore.Viewlet.Show()
>> at GraphViewlet.GraphControl.Show()
>> at _stub_$28##26(Closure , CallSite , CodeContext , Object )
>>
>> at _stub_MatchCaller(Object , CallSite , Object[] )
>> at
>>Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[]
>>args)
>> at
>>
>>  Microsoft.Scripting.Actions.UpdateDelegates.Update2[T,T0,T1,TRet](CallSite
>>site, T0 arg0, T1 arg1)
>> at S$2.Initialize(CodeContext )
>> at IronPython.Hosting.PythonCommandLine.RunFileWorker(String
>>fileName)
>> at IronPython.Hosting.PythonCommandLine.RunFile(String fileName)
>>EnvironmentError: Operation unavailable (Exception from
>>HRESULT: 0x800401E3 (MK_
>>E_UNAVAILABLE))
>>
>>The code that produces this is:
>>
>>
>>import clr
>>clr.AddReference('vslabfsicore')
>>clr.AddReference('vslabviewlets')
>>
>>from VSLabFSICore import Viewlets
>>from GraphViewlet import GraphControl
>>
>>Viewlets.Init()
>>g = GraphControl()
>>g.Show()
>>
>>If instead of 'g.Show()' I attempt 'dir(g)' I get a very odd
>>error!
>>
>>
>>C:\compile\VSLab>C:\compile\IronPython-2.0B3\ipy.exe
>>-X:ExceptionDetail viewlet.
>>py
>>'this' type cannot be an interface itself.
>> at System.RuntimeTypeHandle.GetFirstSlotForInterface(IntPtr
>>interfaceHandle)
>> at System.RuntimeType.GetInterfaceMap(Type ifaceType)
>> at
>>
>>  Microsoft.Scripting.Generation.CompilerHelpers.TryGetCallableMethod(Method
>>Info method)
>> at
>>
>>  Microsoft.Scripting.Generation.CompilerHelpers.FilterNonVisibleMembers(Typ
>>e type, MemberInfo[] foundMembers)
>> at
>>IronPython.Runtime.Types.TypeInfo.MemberBinder.GetMember(Type
>>type, String
>>name, BindingFlags flags)
>> at
>>
>>  IronPython.Runtime.Types.TypeInfo.StandardResolver.ResolveMember(MemberBin
>>der binder, DynamicAction action, Type type, String name)
>> at
>>
>>  IronPython.Runtime.Types.TypeInfo.MemberResolver.ResolveMembers(MemberBind
>>er binder, DynamicAction action, Type type)
>> at
>>IronPython.Runtime.Types.TypeInfo.GetResolvedMembers(MemberBinder
>>memberBi
>>nder, DynamicAction action, Type type)
>> at
>>
>>  IronPython.Runtime.Calls.PythonBinder.ResolveMemberNames(CodeContext
>>conte
>>xt, PythonType type, PythonType owner, Dictionary`2 memberNames)
>> at
>>IronPython.Runtime.Types.PythonType.GetMemberNames(CodeContext
>>context, Ob
>>ject self)
>> at
>>IronPython.Runtime.Operations.PythonOps.GetAttrNames(CodeCo

Re: [IronPython] Viewlets: Any F# experts here?

2008-06-27 Thread Michael Foord

Curt Hagenlocher wrote:
Oh, duh, it hosts itself inside that ViewletProxy that was previously 
uninitialized :)
 
Are you doing this with Visual Studio running?


I tried hosting it in a separate form and it didn't show. I'm running 
standalone under IronPython - no VS.


Michael



On Fri, Jun 27, 2008 at 6:52 AM, Curt Hagenlocher 
<[EMAIL PROTECTED] > wrote:


That "dir" error is a known problem with beta 3 -- and as you
might imagine, sky-high in priority on our list of things to fix
for beta 4.
 
Viewlets appear to be user controls; you probably need to host one

in a Form.

On Fri, Jun 27, 2008 at 6:45 AM, Michael Foord
<[EMAIL PROTECTED] > wrote:

Curt Hagenlocher wrote:

A bit of quality time with Reflector shows that there's a
_viewletsProxy object which hasn't been initialized.  You
probably need to call VSLabFSICore.Viewlets.Init() first.
 It's static, and in the vslabfsicore module.


Thanks Curt - your reflector-fu is greater than mine. I should
spend some quality time with it.

Your advice gets me to the next step, I can make a
GraphControl flash momentarily into view (on creation), but
attempting to show it causes another explosion:


C:\compile\VSLab>C:\compile\IronPython-2.0B3\ipy.exe
-X:ExceptionDetail viewlet.
py
Operation unavailable (Exception from HRESULT: 0x800401E3
(MK_E_UNAVAILABLE))
 at
System.Runtime.InteropServices.Marshal.GetActiveObject(Guid&
rclsid, IntPt
r reserved, Object& ppunk)
 at
System.Runtime.InteropServices.Marshal.GetActiveObject(String
progID)
 at VSLabFSICore.Viewlet.Show()
 at GraphViewlet.GraphControl.Show()
 at _stub_$28##26(Closure , CallSite , CodeContext , Object )

 at _stub_MatchCaller(Object , CallSite , Object[] )
 at
Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[]
args)
 at

Microsoft.Scripting.Actions.UpdateDelegates.Update2[T,T0,T1,TRet](CallSite
site, T0 arg0, T1 arg1)
 at S$2.Initialize(CodeContext )
 at IronPython.Hosting.PythonCommandLine.RunFileWorker(String
fileName)
 at IronPython.Hosting.PythonCommandLine.RunFile(String fileName)
EnvironmentError: Operation unavailable (Exception from
HRESULT: 0x800401E3 (MK_
E_UNAVAILABLE))

The code that produces this is:


import clr
clr.AddReference('vslabfsicore')
clr.AddReference('vslabviewlets')

from VSLabFSICore import Viewlets
from GraphViewlet import GraphControl

Viewlets.Init()
g = GraphControl()
g.Show()

If instead of 'g.Show()' I attempt 'dir(g)' I get a very odd
error!


C:\compile\VSLab>C:\compile\IronPython-2.0B3\ipy.exe
-X:ExceptionDetail viewlet.
py
'this' type cannot be an interface itself.
 at System.RuntimeTypeHandle.GetFirstSlotForInterface(IntPtr
interfaceHandle)
 at System.RuntimeType.GetInterfaceMap(Type ifaceType)
 at

Microsoft.Scripting.Generation.CompilerHelpers.TryGetCallableMethod(Method
Info method)
 at

Microsoft.Scripting.Generation.CompilerHelpers.FilterNonVisibleMembers(Typ
e type, MemberInfo[] foundMembers)
 at
IronPython.Runtime.Types.TypeInfo.MemberBinder.GetMember(Type
type, String
name, BindingFlags flags)
 at

IronPython.Runtime.Types.TypeInfo.StandardResolver.ResolveMember(MemberBin
der binder, DynamicAction action, Type type, String name)
 at

IronPython.Runtime.Types.TypeInfo.MemberResolver.ResolveMembers(MemberBind
er binder, DynamicAction action, Type type)
 at
IronPython.Runtime.Types.TypeInfo.GetResolvedMembers(MemberBinder
memberBi
nder, DynamicAction action, Type type)
 at
IronPython.Runtime.Calls.PythonBinder.ResolveMemberNames(CodeContext
conte
xt, PythonType type, PythonType owner, Dictionary`2 memberNames)
 at
IronPython.Runtime.Types.PythonType.GetMemberNames(CodeContext
context, Ob
ject self)
 at
IronPython.Runtime.Operations.PythonOps.GetAttrNames(CodeContext
context,
Object o)
 at IronPython.Runtime.Builtin.dir(CodeContext context, Object o)
 at _stub_$26##24(Closure , CallSite , CodeContext , Object ,
Object )

 at _stub_MatchCaller(Object , CallSite , Object[] )
 at
Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[]
args)
 at

Microsoft.Scripting.Actions.UpdateDelegates.Update3[T,T0,T1,T2,TRet](CallS
ite site, T0 arg0, T1 arg1, T2 arg2)


Re: [IronPython] Viewlets: Any F# experts here?

2008-06-27 Thread Curt Hagenlocher
Oh, duh, it hosts itself inside that ViewletProxy that was previously
uninitialized :)

Are you doing this with Visual Studio running?

On Fri, Jun 27, 2008 at 6:52 AM, Curt Hagenlocher <[EMAIL PROTECTED]>
wrote:

> That "dir" error is a known problem with beta 3 -- and as you might
> imagine, sky-high in priority on our list of things to fix for beta 4.
>
> Viewlets appear to be user controls; you probably need to host one in a
> Form.
>
>   On Fri, Jun 27, 2008 at 6:45 AM, Michael Foord <
> [EMAIL PROTECTED]> wrote:
>
>> Curt Hagenlocher wrote:
>>
>>> A bit of quality time with Reflector shows that there's a _viewletsProxy
>>> object which hasn't been initialized.  You probably need to call
>>> VSLabFSICore.Viewlets.Init() first.  It's static, and in the vslabfsicore
>>> module.
>>>
>>
>> Thanks Curt - your reflector-fu is greater than mine. I should spend some
>> quality time with it.
>>
>> Your advice gets me to the next step, I can make a GraphControl flash
>> momentarily into view (on creation), but attempting to show it causes
>> another explosion:
>>
>> C:\compile\VSLab>C:\compile\IronPython-2.0B3\ipy.exe -X:ExceptionDetail
>> viewlet.
>> py
>> Operation unavailable (Exception from HRESULT: 0x800401E3
>> (MK_E_UNAVAILABLE))
>>  at System.Runtime.InteropServices.Marshal.GetActiveObject(Guid& rclsid,
>> IntPt
>> r reserved, Object& ppunk)
>>  at System.Runtime.InteropServices.Marshal.GetActiveObject(String progID)
>>  at VSLabFSICore.Viewlet.Show()
>>  at GraphViewlet.GraphControl.Show()
>>  at _stub_$28##26(Closure , CallSite , CodeContext , Object )
>>  at _stub_MatchCaller(Object , CallSite , Object[] )
>>  at Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args)
>>  at
>> Microsoft.Scripting.Actions.UpdateDelegates.Update2[T,T0,T1,TRet](CallSite
>> site, T0 arg0, T1 arg1)
>>  at S$2.Initialize(CodeContext )
>>  at IronPython.Hosting.PythonCommandLine.RunFileWorker(String fileName)
>>  at IronPython.Hosting.PythonCommandLine.RunFile(String fileName)
>> EnvironmentError: Operation unavailable (Exception from HRESULT:
>> 0x800401E3 (MK_
>> E_UNAVAILABLE))
>>
>> The code that produces this is:
>>
>> import clr
>> clr.AddReference('vslabfsicore')
>> clr.AddReference('vslabviewlets')
>>
>> from VSLabFSICore import Viewlets
>> from GraphViewlet import GraphControl
>>
>> Viewlets.Init()
>> g = GraphControl()
>> g.Show()
>>
>> If instead of 'g.Show()' I attempt 'dir(g)' I get a very odd error!
>>
>> C:\compile\VSLab>C:\compile\IronPython-2.0B3\ipy.exe -X:ExceptionDetail
>> viewlet.
>> py
>> 'this' type cannot be an interface itself.
>>  at System.RuntimeTypeHandle.GetFirstSlotForInterface(IntPtr
>> interfaceHandle)
>>  at System.RuntimeType.GetInterfaceMap(Type ifaceType)
>>  at
>> Microsoft.Scripting.Generation.CompilerHelpers.TryGetCallableMethod(Method
>> Info method)
>>  at
>> Microsoft.Scripting.Generation.CompilerHelpers.FilterNonVisibleMembers(Typ
>> e type, MemberInfo[] foundMembers)
>>  at IronPython.Runtime.Types.TypeInfo.MemberBinder.GetMember(Type type,
>> String
>> name, BindingFlags flags)
>>  at
>> IronPython.Runtime.Types.TypeInfo.StandardResolver.ResolveMember(MemberBin
>> der binder, DynamicAction action, Type type, String name)
>>  at
>> IronPython.Runtime.Types.TypeInfo.MemberResolver.ResolveMembers(MemberBind
>> er binder, DynamicAction action, Type type)
>>  at IronPython.Runtime.Types.TypeInfo.GetResolvedMembers(MemberBinder
>> memberBi
>> nder, DynamicAction action, Type type)
>>  at IronPython.Runtime.Calls.PythonBinder.ResolveMemberNames(CodeContext
>> conte
>> xt, PythonType type, PythonType owner, Dictionary`2 memberNames)
>>  at IronPython.Runtime.Types.PythonType.GetMemberNames(CodeContext
>> context, Ob
>> ject self)
>>  at IronPython.Runtime.Operations.PythonOps.GetAttrNames(CodeContext
>> context,
>> Object o)
>>  at IronPython.Runtime.Builtin.dir(CodeContext context, Object o)
>>  at _stub_$26##24(Closure , CallSite , CodeContext , Object , Object )
>>  at _stub_MatchCaller(Object , CallSite , Object[] )
>>  at Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args)
>>  at
>> Microsoft.Scripting.Actions.UpdateDelegates.Update3[T,T0,T1,T2,TRet](CallS
>> ite site, T0 arg0, T1 arg1, T2 arg2)
>>  at S$2.Initialize(CodeContext )
>>  at IronPython.Hosting.PythonCommandLine.RunFileWorker(String fileName)
>>  at IronPython.Hosting.PythonCommandLine.RunFile(String fileName)
>> ValueError: 'this' type cannot be an interface itself.
>>
>>
>> Incidentally, even when installed with VS Pro I can't get VSLab to work
>> *anyway* (this is Vista 64bit FWIW), so the code may not be ready for prime
>> time.
>>
>> I may try firing up reflector myself and see where it takes me.
>>
>> Michael Foord
>>
>>
>>> On Thu, Jun 26, 2008 at 2:58 PM, Michael Foord <
>>> [EMAIL PROTECTED] > wrote:
>>>
>>>The viewlets that come with VSLab look *really* cool. They're
>>>based on F# so I decided to see if they could be used from IronPython.
>>

Re: [IronPython] Viewlets: Any F# experts here?

2008-06-27 Thread Curt Hagenlocher
That "dir" error is a known problem with beta 3 -- and as you might imagine,
sky-high in priority on our list of things to fix for beta 4.

Viewlets appear to be user controls; you probably need to host one in a
Form.

On Fri, Jun 27, 2008 at 6:45 AM, Michael Foord <[EMAIL PROTECTED]>
wrote:

> Curt Hagenlocher wrote:
>
>> A bit of quality time with Reflector shows that there's a _viewletsProxy
>> object which hasn't been initialized.  You probably need to call
>> VSLabFSICore.Viewlets.Init() first.  It's static, and in the vslabfsicore
>> module.
>>
>
> Thanks Curt - your reflector-fu is greater than mine. I should spend some
> quality time with it.
>
> Your advice gets me to the next step, I can make a GraphControl flash
> momentarily into view (on creation), but attempting to show it causes
> another explosion:
>
> C:\compile\VSLab>C:\compile\IronPython-2.0B3\ipy.exe -X:ExceptionDetail
> viewlet.
> py
> Operation unavailable (Exception from HRESULT: 0x800401E3
> (MK_E_UNAVAILABLE))
>  at System.Runtime.InteropServices.Marshal.GetActiveObject(Guid& rclsid,
> IntPt
> r reserved, Object& ppunk)
>  at System.Runtime.InteropServices.Marshal.GetActiveObject(String progID)
>  at VSLabFSICore.Viewlet.Show()
>  at GraphViewlet.GraphControl.Show()
>  at _stub_$28##26(Closure , CallSite , CodeContext , Object )
>  at _stub_MatchCaller(Object , CallSite , Object[] )
>  at Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args)
>  at
> Microsoft.Scripting.Actions.UpdateDelegates.Update2[T,T0,T1,TRet](CallSite
> site, T0 arg0, T1 arg1)
>  at S$2.Initialize(CodeContext )
>  at IronPython.Hosting.PythonCommandLine.RunFileWorker(String fileName)
>  at IronPython.Hosting.PythonCommandLine.RunFile(String fileName)
> EnvironmentError: Operation unavailable (Exception from HRESULT: 0x800401E3
> (MK_
> E_UNAVAILABLE))
>
> The code that produces this is:
>
> import clr
> clr.AddReference('vslabfsicore')
> clr.AddReference('vslabviewlets')
>
> from VSLabFSICore import Viewlets
> from GraphViewlet import GraphControl
>
> Viewlets.Init()
> g = GraphControl()
> g.Show()
>
> If instead of 'g.Show()' I attempt 'dir(g)' I get a very odd error!
>
> C:\compile\VSLab>C:\compile\IronPython-2.0B3\ipy.exe -X:ExceptionDetail
> viewlet.
> py
> 'this' type cannot be an interface itself.
>  at System.RuntimeTypeHandle.GetFirstSlotForInterface(IntPtr
> interfaceHandle)
>  at System.RuntimeType.GetInterfaceMap(Type ifaceType)
>  at
> Microsoft.Scripting.Generation.CompilerHelpers.TryGetCallableMethod(Method
> Info method)
>  at
> Microsoft.Scripting.Generation.CompilerHelpers.FilterNonVisibleMembers(Typ
> e type, MemberInfo[] foundMembers)
>  at IronPython.Runtime.Types.TypeInfo.MemberBinder.GetMember(Type type,
> String
> name, BindingFlags flags)
>  at
> IronPython.Runtime.Types.TypeInfo.StandardResolver.ResolveMember(MemberBin
> der binder, DynamicAction action, Type type, String name)
>  at
> IronPython.Runtime.Types.TypeInfo.MemberResolver.ResolveMembers(MemberBind
> er binder, DynamicAction action, Type type)
>  at IronPython.Runtime.Types.TypeInfo.GetResolvedMembers(MemberBinder
> memberBi
> nder, DynamicAction action, Type type)
>  at IronPython.Runtime.Calls.PythonBinder.ResolveMemberNames(CodeContext
> conte
> xt, PythonType type, PythonType owner, Dictionary`2 memberNames)
>  at IronPython.Runtime.Types.PythonType.GetMemberNames(CodeContext context,
> Ob
> ject self)
>  at IronPython.Runtime.Operations.PythonOps.GetAttrNames(CodeContext
> context,
> Object o)
>  at IronPython.Runtime.Builtin.dir(CodeContext context, Object o)
>  at _stub_$26##24(Closure , CallSite , CodeContext , Object , Object )
>  at _stub_MatchCaller(Object , CallSite , Object[] )
>  at Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args)
>  at
> Microsoft.Scripting.Actions.UpdateDelegates.Update3[T,T0,T1,T2,TRet](CallS
> ite site, T0 arg0, T1 arg1, T2 arg2)
>  at S$2.Initialize(CodeContext )
>  at IronPython.Hosting.PythonCommandLine.RunFileWorker(String fileName)
>  at IronPython.Hosting.PythonCommandLine.RunFile(String fileName)
> ValueError: 'this' type cannot be an interface itself.
>
>
> Incidentally, even when installed with VS Pro I can't get VSLab to work
> *anyway* (this is Vista 64bit FWIW), so the code may not be ready for prime
> time.
>
> I may try firing up reflector myself and see where it takes me.
>
> Michael Foord
>
>
>> On Thu, Jun 26, 2008 at 2:58 PM, Michael Foord <[EMAIL PROTECTED]> [EMAIL PROTECTED]>> wrote:
>>
>>The viewlets that come with VSLab look *really* cool. They're
>>based on F# so I decided to see if they could be used from IronPython.
>>
>>http://www.codeplex.com/vslab
>>
>>The dependencies are pretty hefty. You need F# installed *and*
>>Managed DirectX (June 2008 SDK ~450mb seems to fulfil the dependency).
>>
>>To get at the viewlet assemblies you need Visual Studio Pro
>>installed as well, but they can be extracted from the VSLabs msi
>>installer without VS Pro.

Re: [IronPython] Viewlets: Any F# experts here?

2008-06-27 Thread Michael Foord

Curt Hagenlocher wrote:
A bit of quality time with Reflector shows that there's a 
_viewletsProxy object which hasn't been initialized.  You probably 
need to call VSLabFSICore.Viewlets.Init() first.  It's static, and in 
the vslabfsicore module.


Thanks Curt - your reflector-fu is greater than mine. I should spend 
some quality time with it.


Your advice gets me to the next step, I can make a GraphControl flash 
momentarily into view (on creation), but attempting to show it causes 
another explosion:


C:\compile\VSLab>C:\compile\IronPython-2.0B3\ipy.exe -X:ExceptionDetail 
viewlet.

py
Operation unavailable (Exception from HRESULT: 0x800401E3 
(MK_E_UNAVAILABLE))
  at System.Runtime.InteropServices.Marshal.GetActiveObject(Guid& 
rclsid, IntPt

r reserved, Object& ppunk)
  at System.Runtime.InteropServices.Marshal.GetActiveObject(String progID)
  at VSLabFSICore.Viewlet.Show()
  at GraphViewlet.GraphControl.Show()
  at _stub_$28##26(Closure , CallSite , CodeContext , Object )
  at _stub_MatchCaller(Object , CallSite , Object[] )
  at Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args)
  at 
Microsoft.Scripting.Actions.UpdateDelegates.Update2[T,T0,T1,TRet](CallSite

site, T0 arg0, T1 arg1)
  at S$2.Initialize(CodeContext )
  at IronPython.Hosting.PythonCommandLine.RunFileWorker(String fileName)
  at IronPython.Hosting.PythonCommandLine.RunFile(String fileName)
EnvironmentError: Operation unavailable (Exception from HRESULT: 
0x800401E3 (MK_

E_UNAVAILABLE))

The code that produces this is:

import clr
clr.AddReference('vslabfsicore')
clr.AddReference('vslabviewlets')

from VSLabFSICore import Viewlets
from GraphViewlet import GraphControl

Viewlets.Init()
g = GraphControl()
g.Show()

If instead of 'g.Show()' I attempt 'dir(g)' I get a very odd error!

C:\compile\VSLab>C:\compile\IronPython-2.0B3\ipy.exe -X:ExceptionDetail 
viewlet.

py
'this' type cannot be an interface itself.
  at System.RuntimeTypeHandle.GetFirstSlotForInterface(IntPtr 
interfaceHandle)

  at System.RuntimeType.GetInterfaceMap(Type ifaceType)
  at 
Microsoft.Scripting.Generation.CompilerHelpers.TryGetCallableMethod(Method

Info method)
  at 
Microsoft.Scripting.Generation.CompilerHelpers.FilterNonVisibleMembers(Typ

e type, MemberInfo[] foundMembers)
  at IronPython.Runtime.Types.TypeInfo.MemberBinder.GetMember(Type 
type, String

name, BindingFlags flags)
  at 
IronPython.Runtime.Types.TypeInfo.StandardResolver.ResolveMember(MemberBin

der binder, DynamicAction action, Type type, String name)
  at 
IronPython.Runtime.Types.TypeInfo.MemberResolver.ResolveMembers(MemberBind

er binder, DynamicAction action, Type type)
  at IronPython.Runtime.Types.TypeInfo.GetResolvedMembers(MemberBinder 
memberBi

nder, DynamicAction action, Type type)
  at 
IronPython.Runtime.Calls.PythonBinder.ResolveMemberNames(CodeContext conte

xt, PythonType type, PythonType owner, Dictionary`2 memberNames)
  at IronPython.Runtime.Types.PythonType.GetMemberNames(CodeContext 
context, Ob

ject self)
  at IronPython.Runtime.Operations.PythonOps.GetAttrNames(CodeContext 
context,

Object o)
  at IronPython.Runtime.Builtin.dir(CodeContext context, Object o)
  at _stub_$26##24(Closure , CallSite , CodeContext , Object , Object )
  at _stub_MatchCaller(Object , CallSite , Object[] )
  at Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args)
  at 
Microsoft.Scripting.Actions.UpdateDelegates.Update3[T,T0,T1,T2,TRet](CallS

ite site, T0 arg0, T1 arg1, T2 arg2)
  at S$2.Initialize(CodeContext )
  at IronPython.Hosting.PythonCommandLine.RunFileWorker(String fileName)
  at IronPython.Hosting.PythonCommandLine.RunFile(String fileName)
ValueError: 'this' type cannot be an interface itself.


Incidentally, even when installed with VS Pro I can't get VSLab to work 
*anyway* (this is Vista 64bit FWIW), so the code may not be ready for 
prime time.


I may try firing up reflector myself and see where it takes me.

Michael Foord



On Thu, Jun 26, 2008 at 2:58 PM, Michael Foord 
<[EMAIL PROTECTED] > wrote:


The viewlets that come with VSLab look *really* cool. They're
based on F# so I decided to see if they could be used from IronPython.

http://www.codeplex.com/vslab

The dependencies are pretty hefty. You need F# installed *and*
Managed DirectX (June 2008 SDK ~450mb seems to fulfil the dependency).

To get at the viewlet assemblies you need Visual Studio Pro
installed as well, but they can be extracted from the VSLabs msi
installer without VS Pro.

Ok, so with all the dependencies installed I attempt to use them -
and *boom*. Anyone here got any ideas?

IronPython 2.0 Beta (2.0.0.3000) on .NET 2.0.50727.1434
Copyright (c) Microsoft Corporation. All rights reserved.
>>> import clr
>>> clr.AddReference('vslabfsicore')
>>> clr.AddReference('vslabviewlets')
>>> clr.AddReference('vslabcore')
>>> from GraphViewlet import GraphControl
>>> g = GraphCont

Re: [IronPython] Viewlets: Any F# experts here?

2008-06-27 Thread Curt Hagenlocher
A bit of quality time with Reflector shows that there's a _viewletsProxy
object which hasn't been initialized.  You probably need to call
VSLabFSICore.Viewlets.Init() first.  It's static, and in the vslabfsicore
module.

On Thu, Jun 26, 2008 at 2:58 PM, Michael Foord <[EMAIL PROTECTED]>
wrote:

> The viewlets that come with VSLab look *really* cool. They're based on F#
> so I decided to see if they could be used from IronPython.
>
> http://www.codeplex.com/vslab
>
> The dependencies are pretty hefty. You need F# installed *and* Managed
> DirectX (June 2008 SDK ~450mb seems to fulfil the dependency).
>
> To get at the viewlet assemblies you need Visual Studio Pro installed as
> well, but they can be extracted from the VSLabs msi installer without VS
> Pro.
>
> Ok, so with all the dependencies installed I attempt to use them - and
> *boom*. Anyone here got any ideas?
>
> IronPython 2.0 Beta (2.0.0.3000) on .NET 2.0.50727.1434
> Copyright (c) Microsoft Corporation. All rights reserved.
> >>> import clr
> >>> clr.AddReference('vslabfsicore')
> >>> clr.AddReference('vslabviewlets')
> >>> clr.AddReference('vslabcore')
> >>> from GraphViewlet import GraphControl
> >>> g = GraphControl()
> Traceback (most recent call last):
>  File "", line 1, in 
>  File "vslabviewlets", line unknown, in .ctor
>  File "vslabfsicore", line unknown, in .ctor
>  File "System.Windows.Forms", line unknown, in get_Controls
>  File "System.Windows.Forms", line unknown, in get_Properties
> SystemError: Object reference not set to an instance of an object.
>
>
> Interesting that the explosion is inside winforms. Referencing that
> assembly first makes knows difference.
>
> Michael Foord
>
>
> --
> http://www.ironpythoninaction.com/
> http://www.voidspace.org.uk/
> http://www.trypython.org/
> http://www.ironpython.info/
> http://www.theotherdelia.co.uk/
> http://www.resolverhacks.net/
>
> ___
> 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


Re: [IronPython] Viewlets: Any F# experts here?

2008-06-27 Thread Michael Foord

Shri Borde wrote:

Actually, -X:ExceptionDetail is the more important option. Could you try that? 
It will you the System.Exception stack trace.
  


Hmmm... still not sure it is more useful.

C:\compile\VSLab>C:\compile\IronPython-2.0B3\ipy.exe -X:ExceptionDetail 
viewlet.

py
Object reference not set to an instance of an object.
  at System.Windows.Forms.Control.get_Properties()
  at System.Windows.Forms.Control.get_Controls()
  at VSLabFSICore.Viewlet..ctor()
  at GraphViewlet.GraphControl..ctor()
  at _stub_$22##20(Closure , CallSite , CodeContext , Object )
  at _stub_MatchCaller(Object , CallSite , Object[] )
  at Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args)
  at 
Microsoft.Scripting.Actions.UpdateDelegates.Update2[T,T0,T1,TRet](CallSite

site, T0 arg0, T1 arg1)
  at S$2.Initialize(CodeContext )
  at IronPython.Hosting.PythonCommandLine.RunFileWorker(String fileName)
  at IronPython.Hosting.PythonCommandLine.RunFile(String fileName)
SystemError: Object reference not set to an instance of an object.
C:\compile\VSLab>



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Foord
Sent: Thursday, June 26, 2008 3:39 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Viewlets: Any F# experts here?

Shri Borde wrote:
  

Michael, what is the CLR stack trace (-X:ShowClrExceptions)?




Not much more useful I'm afraid.


C:\compile\VSLab>C:\compile\IronPython-2.0B3\ipy.exe
-X:ShowClrExceptions viewle
t.py
Traceback (most recent call last):
  File "viewlet.py", line 4, in viewlet.py
  File "vslabviewlets", line unknown, in .ctor
  File "vslabfsicore", line unknown, in .ctor
  File "System.Windows.Forms", line unknown, in get_Controls
  File "System.Windows.Forms", line unknown, in get_Properties
SystemError: Object reference not set to an instance of an object.
CLR Exception:
NullReferenceException
:
Object reference not set to an instance of an object.

Michael

  

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jimmy Schementi
Sent: Thursday, June 26, 2008 3:04 PM
To: Discussion of IronPython
Cc: Luke Hoban
Subject: Re: [IronPython] Viewlets: Any F# experts here?

Adding Luke Hoban, the F# ninja at Microsoft =)

Luke, any ideas? Swing by my office if you are confused.




-Original Message-
From: [EMAIL PROTECTED] [mailto:users-
[EMAIL PROTECTED] On Behalf Of Michael Foord
Sent: Thursday, June 26, 2008 2:59 PM
To: Discussion of IronPython
Subject: [IronPython] Viewlets: Any F# experts here?

The viewlets that come with VSLab look *really* cool. They're based on
F# so I decided to see if they could be used from IronPython.

http://www.codeplex.com/vslab

The dependencies are pretty hefty. You need F# installed *and* Managed
DirectX (June 2008 SDK ~450mb seems to fulfil the dependency).

To get at the viewlet assemblies you need Visual Studio Pro installed
as
well, but they can be extracted from the VSLabs msi installer without
VS
Pro.

Ok, so with all the dependencies installed I attempt to use them - and
*boom*. Anyone here got any ideas?

IronPython 2.0 Beta (2.0.0.3000) on .NET 2.0.50727.1434
Copyright (c) Microsoft Corporation. All rights reserved.
 >>> import clr
 >>> clr.AddReference('vslabfsicore')
 >>> clr.AddReference('vslabviewlets')
 >>> clr.AddReference('vslabcore')
 >>> from GraphViewlet import GraphControl
 >>> g = GraphControl()
Traceback (most recent call last):
  File "", line 1, in 
  File "vslabviewlets", line unknown, in .ctor
  File "vslabfsicore", line unknown, in .ctor
  File "System.Windows.Forms", line unknown, in get_Controls
  File "System.Windows.Forms", line unknown, in get_Properties
SystemError: Object reference not set to an instance of an object.


Interesting that the explosion is inside winforms. Referencing that
assembly first makes knows difference.

Michael Foord


--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/
http://www.trypython.org/
http://www.ironpython.info/
http://www.theotherdelia.co.uk/
http://www.resolverhacks.net/

___
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





--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/
http://www.trypython.org/
http://www.ironpython.info/
http://www.theotherdelia.co.uk/
http://www.resolverhacks.net/

__

Re: [IronPython] Viewlets: Any F# experts here?

2008-06-26 Thread Shri Borde
Actually, -X:ExceptionDetail is the more important option. Could you try that? 
It will you the System.Exception stack trace.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Foord
Sent: Thursday, June 26, 2008 3:39 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Viewlets: Any F# experts here?

Shri Borde wrote:
> Michael, what is the CLR stack trace (-X:ShowClrExceptions)?
>

Not much more useful I'm afraid.


C:\compile\VSLab>C:\compile\IronPython-2.0B3\ipy.exe
-X:ShowClrExceptions viewle
t.py
Traceback (most recent call last):
  File "viewlet.py", line 4, in viewlet.py
  File "vslabviewlets", line unknown, in .ctor
  File "vslabfsicore", line unknown, in .ctor
  File "System.Windows.Forms", line unknown, in get_Controls
  File "System.Windows.Forms", line unknown, in get_Properties
SystemError: Object reference not set to an instance of an object.
CLR Exception:
NullReferenceException
:
Object reference not set to an instance of an object.

Michael

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jimmy Schementi
> Sent: Thursday, June 26, 2008 3:04 PM
> To: Discussion of IronPython
> Cc: Luke Hoban
> Subject: Re: [IronPython] Viewlets: Any F# experts here?
>
> Adding Luke Hoban, the F# ninja at Microsoft =)
>
> Luke, any ideas? Swing by my office if you are confused.
>
>
>> -Original Message-
>> From: [EMAIL PROTECTED] [mailto:users-
>> [EMAIL PROTECTED] On Behalf Of Michael Foord
>> Sent: Thursday, June 26, 2008 2:59 PM
>> To: Discussion of IronPython
>> Subject: [IronPython] Viewlets: Any F# experts here?
>>
>> The viewlets that come with VSLab look *really* cool. They're based on
>> F# so I decided to see if they could be used from IronPython.
>>
>> http://www.codeplex.com/vslab
>>
>> The dependencies are pretty hefty. You need F# installed *and* Managed
>> DirectX (June 2008 SDK ~450mb seems to fulfil the dependency).
>>
>> To get at the viewlet assemblies you need Visual Studio Pro installed
>> as
>> well, but they can be extracted from the VSLabs msi installer without
>> VS
>> Pro.
>>
>> Ok, so with all the dependencies installed I attempt to use them - and
>> *boom*. Anyone here got any ideas?
>>
>> IronPython 2.0 Beta (2.0.0.3000) on .NET 2.0.50727.1434
>> Copyright (c) Microsoft Corporation. All rights reserved.
>>  >>> import clr
>>  >>> clr.AddReference('vslabfsicore')
>>  >>> clr.AddReference('vslabviewlets')
>>  >>> clr.AddReference('vslabcore')
>>  >>> from GraphViewlet import GraphControl
>>  >>> g = GraphControl()
>> Traceback (most recent call last):
>>   File "", line 1, in 
>>   File "vslabviewlets", line unknown, in .ctor
>>   File "vslabfsicore", line unknown, in .ctor
>>   File "System.Windows.Forms", line unknown, in get_Controls
>>   File "System.Windows.Forms", line unknown, in get_Properties
>> SystemError: Object reference not set to an instance of an object.
>>
>>
>> Interesting that the explosion is inside winforms. Referencing that
>> assembly first makes knows difference.
>>
>> Michael Foord
>>
>>
>> --
>> http://www.ironpythoninaction.com/
>> http://www.voidspace.org.uk/
>> http://www.trypython.org/
>> http://www.ironpython.info/
>> http://www.theotherdelia.co.uk/
>> http://www.resolverhacks.net/
>>
>> ___
>> 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
>


--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/
http://www.trypython.org/
http://www.ironpython.info/
http://www.theotherdelia.co.uk/
http://www.resolverhacks.net/

___
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


Re: [IronPython] Viewlets: Any F# experts here?

2008-06-26 Thread Michael Foord

Shri Borde wrote:

Michael, what is the CLR stack trace (-X:ShowClrExceptions)?
  


Not much more useful I'm afraid.


C:\compile\VSLab>C:\compile\IronPython-2.0B3\ipy.exe 
-X:ShowClrExceptions viewle

t.py
Traceback (most recent call last):
 File "viewlet.py", line 4, in viewlet.py
 File "vslabviewlets", line unknown, in .ctor
 File "vslabfsicore", line unknown, in .ctor
 File "System.Windows.Forms", line unknown, in get_Controls
 File "System.Windows.Forms", line unknown, in get_Properties
SystemError: Object reference not set to an instance of an object.
CLR Exception:
   NullReferenceException
:
Object reference not set to an instance of an object.

Michael


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jimmy Schementi
Sent: Thursday, June 26, 2008 3:04 PM
To: Discussion of IronPython
Cc: Luke Hoban
Subject: Re: [IronPython] Viewlets: Any F# experts here?

Adding Luke Hoban, the F# ninja at Microsoft =)

Luke, any ideas? Swing by my office if you are confused.

  

-Original Message-
From: [EMAIL PROTECTED] [mailto:users-
[EMAIL PROTECTED] On Behalf Of Michael Foord
Sent: Thursday, June 26, 2008 2:59 PM
To: Discussion of IronPython
Subject: [IronPython] Viewlets: Any F# experts here?

The viewlets that come with VSLab look *really* cool. They're based on
F# so I decided to see if they could be used from IronPython.

http://www.codeplex.com/vslab

The dependencies are pretty hefty. You need F# installed *and* Managed
DirectX (June 2008 SDK ~450mb seems to fulfil the dependency).

To get at the viewlet assemblies you need Visual Studio Pro installed
as
well, but they can be extracted from the VSLabs msi installer without
VS
Pro.

Ok, so with all the dependencies installed I attempt to use them - and
*boom*. Anyone here got any ideas?

IronPython 2.0 Beta (2.0.0.3000) on .NET 2.0.50727.1434
Copyright (c) Microsoft Corporation. All rights reserved.
 >>> import clr
 >>> clr.AddReference('vslabfsicore')
 >>> clr.AddReference('vslabviewlets')
 >>> clr.AddReference('vslabcore')
 >>> from GraphViewlet import GraphControl
 >>> g = GraphControl()
Traceback (most recent call last):
  File "", line 1, in 
  File "vslabviewlets", line unknown, in .ctor
  File "vslabfsicore", line unknown, in .ctor
  File "System.Windows.Forms", line unknown, in get_Controls
  File "System.Windows.Forms", line unknown, in get_Properties
SystemError: Object reference not set to an instance of an object.


Interesting that the explosion is inside winforms. Referencing that
assembly first makes knows difference.

Michael Foord


--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/
http://www.trypython.org/
http://www.ironpython.info/
http://www.theotherdelia.co.uk/
http://www.resolverhacks.net/

___
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
  



--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/
http://www.trypython.org/
http://www.ironpython.info/
http://www.theotherdelia.co.uk/
http://www.resolverhacks.net/

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Viewlets: Any F# experts here?

2008-06-26 Thread Shri Borde
Michael, what is the CLR stack trace (-X:ShowClrExceptions)?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jimmy Schementi
Sent: Thursday, June 26, 2008 3:04 PM
To: Discussion of IronPython
Cc: Luke Hoban
Subject: Re: [IronPython] Viewlets: Any F# experts here?

Adding Luke Hoban, the F# ninja at Microsoft =)

Luke, any ideas? Swing by my office if you are confused.

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:users-
> [EMAIL PROTECTED] On Behalf Of Michael Foord
> Sent: Thursday, June 26, 2008 2:59 PM
> To: Discussion of IronPython
> Subject: [IronPython] Viewlets: Any F# experts here?
>
> The viewlets that come with VSLab look *really* cool. They're based on
> F# so I decided to see if they could be used from IronPython.
>
> http://www.codeplex.com/vslab
>
> The dependencies are pretty hefty. You need F# installed *and* Managed
> DirectX (June 2008 SDK ~450mb seems to fulfil the dependency).
>
> To get at the viewlet assemblies you need Visual Studio Pro installed
> as
> well, but they can be extracted from the VSLabs msi installer without
> VS
> Pro.
>
> Ok, so with all the dependencies installed I attempt to use them - and
> *boom*. Anyone here got any ideas?
>
> IronPython 2.0 Beta (2.0.0.3000) on .NET 2.0.50727.1434
> Copyright (c) Microsoft Corporation. All rights reserved.
>  >>> import clr
>  >>> clr.AddReference('vslabfsicore')
>  >>> clr.AddReference('vslabviewlets')
>  >>> clr.AddReference('vslabcore')
>  >>> from GraphViewlet import GraphControl
>  >>> g = GraphControl()
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "vslabviewlets", line unknown, in .ctor
>   File "vslabfsicore", line unknown, in .ctor
>   File "System.Windows.Forms", line unknown, in get_Controls
>   File "System.Windows.Forms", line unknown, in get_Properties
> SystemError: Object reference not set to an instance of an object.
>
>
> Interesting that the explosion is inside winforms. Referencing that
> assembly first makes knows difference.
>
> Michael Foord
>
>
> --
> http://www.ironpythoninaction.com/
> http://www.voidspace.org.uk/
> http://www.trypython.org/
> http://www.ironpython.info/
> http://www.theotherdelia.co.uk/
> http://www.resolverhacks.net/
>
> ___
> 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


Re: [IronPython] Viewlets: Any F# experts here?

2008-06-26 Thread Jimmy Schementi
Adding Luke Hoban, the F# ninja at Microsoft =)

Luke, any ideas? Swing by my office if you are confused.

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:users-
> [EMAIL PROTECTED] On Behalf Of Michael Foord
> Sent: Thursday, June 26, 2008 2:59 PM
> To: Discussion of IronPython
> Subject: [IronPython] Viewlets: Any F# experts here?
>
> The viewlets that come with VSLab look *really* cool. They're based on
> F# so I decided to see if they could be used from IronPython.
>
> http://www.codeplex.com/vslab
>
> The dependencies are pretty hefty. You need F# installed *and* Managed
> DirectX (June 2008 SDK ~450mb seems to fulfil the dependency).
>
> To get at the viewlet assemblies you need Visual Studio Pro installed
> as
> well, but they can be extracted from the VSLabs msi installer without
> VS
> Pro.
>
> Ok, so with all the dependencies installed I attempt to use them - and
> *boom*. Anyone here got any ideas?
>
> IronPython 2.0 Beta (2.0.0.3000) on .NET 2.0.50727.1434
> Copyright (c) Microsoft Corporation. All rights reserved.
>  >>> import clr
>  >>> clr.AddReference('vslabfsicore')
>  >>> clr.AddReference('vslabviewlets')
>  >>> clr.AddReference('vslabcore')
>  >>> from GraphViewlet import GraphControl
>  >>> g = GraphControl()
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "vslabviewlets", line unknown, in .ctor
>   File "vslabfsicore", line unknown, in .ctor
>   File "System.Windows.Forms", line unknown, in get_Controls
>   File "System.Windows.Forms", line unknown, in get_Properties
> SystemError: Object reference not set to an instance of an object.
>
>
> Interesting that the explosion is inside winforms. Referencing that
> assembly first makes knows difference.
>
> Michael Foord
>
>
> --
> http://www.ironpythoninaction.com/
> http://www.voidspace.org.uk/
> http://www.trypython.org/
> http://www.ironpython.info/
> http://www.theotherdelia.co.uk/
> http://www.resolverhacks.net/
>
> ___
> 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


[IronPython] Viewlets: Any F# experts here?

2008-06-26 Thread Michael Foord
The viewlets that come with VSLab look *really* cool. They're based on 
F# so I decided to see if they could be used from IronPython.


http://www.codeplex.com/vslab

The dependencies are pretty hefty. You need F# installed *and* Managed 
DirectX (June 2008 SDK ~450mb seems to fulfil the dependency).


To get at the viewlet assemblies you need Visual Studio Pro installed as 
well, but they can be extracted from the VSLabs msi installer without VS 
Pro.


Ok, so with all the dependencies installed I attempt to use them - and 
*boom*. Anyone here got any ideas?


IronPython 2.0 Beta (2.0.0.3000) on .NET 2.0.50727.1434
Copyright (c) Microsoft Corporation. All rights reserved.
>>> import clr
>>> clr.AddReference('vslabfsicore')
>>> clr.AddReference('vslabviewlets')
>>> clr.AddReference('vslabcore')
>>> from GraphViewlet import GraphControl
>>> g = GraphControl()
Traceback (most recent call last):
 File "", line 1, in 
 File "vslabviewlets", line unknown, in .ctor
 File "vslabfsicore", line unknown, in .ctor
 File "System.Windows.Forms", line unknown, in get_Controls
 File "System.Windows.Forms", line unknown, in get_Properties
SystemError: Object reference not set to an instance of an object.


Interesting that the explosion is inside winforms. Referencing that 
assembly first makes knows difference.


Michael Foord


--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/
http://www.trypython.org/
http://www.ironpython.info/
http://www.theotherdelia.co.uk/
http://www.resolverhacks.net/

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com