Hello ClojureCLR users and developers!
First of all, thank you for your work on ClojureCLR.
It opens a whole new ecosystem and great opportunities for Clojure developer.
I've been playing with the project and I'm very excited about the possibilities.
While I've been able to make great headway in using some C# libraries, I'm coming
up against a minor issue:
how do I call a class property?
For example, I've tried this:
(ConfigureApp/Android)
and while that works just fine at the REPL, it complains when I try to
compile the program, with the error:
"System.InvalidOperationException: Unable to find static field: Android"
This is the documentation on the above class:
https://docs.microsoft.com/en-us/dotnet/api/xamarin.uitest.configureapp?view=xamarin-uitest-sdkLooking at this email:
https://groups.google.com/d/msg/clojure/SxR_XzbUAUg/PJezCXTxYSgJit seems that:
"In essence, fields, properties and zero-arity methods are referenced in
the same way, and are checked in this order."
Am I right in thinking that the above class, ConfigureApp, tries to
look up a field and since it fails to find it, it bombs out?
What do I need to do in order to call it?
For completeness sake, here is how the code would be used in C#:
IApp app = ConfigureApp
.Android
.AppBundle("/path/to/
my.app")
.StartApp();
and here is what works at the REPL:
(-> ^IApp (ConfigureApp/Android)
(.ApkFile "/path/to/
my.app")
(.StartApp 0))
The compilation command that I use, is invoked via lein-clr, as:
lein clr compile foo.core
which in turn runs:
/usr/local/bin/mono target/clr/clj/Release 4.0/Clojure.Compile.exe foo.core
The above executable and directory do exist.
Thank you
Alex