Re: [Clojure-CLR] implement interface that has properties

2013-12-09 Thread Frank Hale
It took me a few hours of research and trial and error but I think this will work: user=> (def foo-handler (reify System.Web.IHttpHandler (get_IsReusable [this] false) (ProcessRequest [this context] ( #'user/foo-handler user=> On Mon, Dec 9, 2013 at 12:38 PM, Frank Hale wrote: > I also tri

Re: [Clojure-CLR] implement interface that has properties

2013-12-09 Thread Frank Hale
I also tried deftype (deftype foo-handler [] System.Web.IHttpHandler (get_IsReusable [this] false) (ProcessRequest [this context] ())) InvalidCastException Unable to cast object of type 'clojure.lang.Var' to type 'System.Type'. clojure.lang.Namespace.ReferenceClass On Mon, Dec 9, 2013 at 12:24

Re: [Clojure-CLR] implement interface that has properties

2013-12-09 Thread Frank Hale
Hi John, Yes I've tried adding get_ to the property name but I'm still not doing something correctly. (defn foo-handler [] (reify System.Web.IHttpHandler (get_IsReusable [] false) (ProcessRequest [context] ( CompilerException clojure.lang.CljCompiler.Ast.ParseException: Must supply at least

Re: [Clojure-CLR] implement interface that has properties

2013-12-09 Thread John D. Hume
If I recall, properties are just syntactic sugar for awkwardly named methods. Have you tried the compiler-generated get and set method-names? On Dec 9, 2013 9:50 AM, "Frank Hale" wrote: > I'm trying to implement an interface that has properties but can't quite > seem to get it to work and I also

[Clojure-CLR] implement interface that has properties

2013-12-09 Thread Frank Hale
I'm trying to implement an interface that has properties but can't quite seem to get it to work and I also have not found any relevant examples via Google (yet). I'm sure I'm doing something completely wrong here but have no idea how to fix it. (System.Reflection.Assembly/LoadWithPartialName "Syst