Thanks for catching that.  I had only tested out of VS.  I'll add a
note to the sample.

I won't add the Load call to the sample yet, though, since it is CLR
version dependent. Eventually, I suppose it will be best to add a
config file with the appropriate info for assemblies that come
with .Net.  Then one could use partial names.

David

On Sep 16, 1:34 pm, Shawn Hoover <[email protected]> wrote:
> On Wed, Sep 16, 2009 at 12:28 PM, Shawn Hoover <[email protected]>wrote:
>
>
>
> > I'm trying to run the celsius sample recently committed to ClojureCLR. It
> > works fine when I run Clojure.Main from Visual Studio, but from a command
> > line I get this:
> > c:\Users\Shawn\clojure-clr\Clojure\Clojure.Main\bin\Debug
> > >Clojure.Main.exe
> > Clojure 1.1.0-alpha-SNAPSHOT
> > user=> (import '(System.Windows.Forms Form))
> > System.NullReferenceException: Object reference not set to an instance of
> > an obj
> > ect.
> >    at clojure.lang.Util.NameForType(Type t) in
> > C:\Users\Shawn\clojure-clr\Clojure\Clojure\Lib\Util.cs:line 397
> >    at clojure.lang.Namespace.importClass(Type t) in
> > C:\Users\Shawn\clojure-clr\Clojure\Clojure\Lib\Namespace.cs:line 266
> >    at lambda_method(Closure )
> >    at AFunction_impl.invoke()
> >    at REPLCall(Closure )
> > user=>
>
> Ah, it's just that the assembly with the class was not loaded into the
> process. This works:
>
> user=> (System.Reflection.Assembly/Load "System.Windows.Forms,
> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")
> #<Assembly System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
> PublicKeyToken=b77a5c561934e089>
> user=> (import '(System.Windows.Forms Form))
> System.Windows.Forms.Form
> user=>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to