Specifically, in ClojureCLR< property access in CLR interop is treated
in the same way as fields and zero-arity methods.

For class properties, ClassName/PropertyName works.
For instance properties,  (.PropertyName instance) or (. instance
PropertyName)

In essence, fields, properties and zero-arity methods are referenced
in the same way, and are checked in this order.
You can also access the getter/setter methods of a property directly.
(get_PropertyName and (set_PropertyName)

Where properties are not handled is in type/interface specification/
implementation.  Specifically, places that allow method definition
(gen-interface and company) and places that allow method definition
(deftype and company) do not allow specification of properties.
Technically, this is quite easy.  The difficutly is that the syntax of
these macros typically do not make it easy to distinguish the intent
of defining properties versus defining zero-arity methods.  This is
discussed more fully at 
https://github.com/richhickey/clojure-clr/wiki/Extending-deftype-and-company-for-CLR.

I still need to come up with a good mechanism for referring to
events.  Suggestions welcomed.

--David


On Feb 2, 9:09 pm, "Matthew D. Swank" <akopa.gmane.pos...@gmail.com>
wrote:
> On Feb 1, 6:10 pm, "Matthew D. Swank" <akopa.gmane.pos...@gmail.com>
> wrote:
>
> > AFAIK clojure-clr doesn't have built-in support for accessing
> > properties.  
>
> Ok David Miller let me know off list the existing interop handle
> properties.

-- 
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