I can compile the following simple program, but when I try to run it
I get an error:

    Unhandled Exception: System.NotImplementedException: details
        at ClrExperiments.Employee.details()
        at ClojureClrExperiment.Program.Main()

Here is the Clojure code:

    (ns clr-experiments.core)

    (defn details []
      (let [hash (System.Collections.Hashtable.)]
        (doto hash
          (. Add "Name" "Ralph")
          (. Add "Age" 27))
        hash))


    (gen-class :name "ClrExperiments.Employee"
               :methods [[details [] System.Collections.Hashtable]])

And the C# calling code:

    using System;
    using ClrExperiments;

    namespace ClojureClrExperiment {
      class Program {
        static void Main() {
          var emp = new Employee();
          var hash = emp.details();

          foreach (var key in hash) {
            Console.WriteLine("{0}: {1}", key, hash[key]);
          }
          Console.ReadKey();
        }
      }
    }

Looking at the generated assembly `ClrExperiments.Employee.dll` with
ILSpy,
I see that `details()` contains the following code:

    public override Hashtable details() {
      Var expr_05 = Employee.details__var;
      object expr_16 = (!expr_05.isBound) ? null : expr_05.get();
      if (expr_16 != null) {
        return ((IFn)expr_16).invoke(this);
      }
      throw new NotImplementedException("details");
    }

So it would appear that `clr-experiments.core/details` isn't being
bound. Could someone please help me figure out what's going wrong?

I'm using clojure-clr-1.3.0-alpha6-Debug-4.0 from GitHub.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to