41 views
Skip to first unread message

Brendan Ribera

unread,
Dec 22, 2011, 2:11:22 PM12/22/11
to mirah
Hey all,

Here's a little talk on Mirah and Android I did at Strange Loop this
year. Hopefully someone will find it useful.

http://www.infoq.com/presentations/Mirah-for-Android-Development

-Brendan

Rick Hightower

unread,
Dec 22, 2011, 2:13:36 PM12/22/11
to mi...@googlegroups.com

Thanks

Rib Rdb

unread,
Dec 28, 2011, 2:23:03 PM12/28/11
to mi...@googlegroups.com
Thanks for sharing this. Here's a couple more mirah features you might find useful:

You can use blocks for implementing an interface with multiple methods.  Just put the method definition inside the block:

    foo.onBar do
       def onSuccess(result); end
       def onFailure(error); end
    end
       

Mirah doesn't compile .java files, but it does understand them. If you compile your .mirah files first in a mixed language project it should just work, even if you've got circular references between mirah and java classes. Just make sure the .java files are in your classpath.

Brendan Ribera

unread,
Dec 28, 2011, 5:00:09 PM12/28/11
to mi...@googlegroups.com
Ah, cool! Two tricks I didn't know about. Maybe it's time to for me to
add mixed source support to Pindah :)

Brendan Ribera

unread,
Jan 5, 2012, 4:36:45 PM1/5/12
to mi...@googlegroups.com
Does this block/interface syntax work when the method has multiple
arguments? Or is there a version that can be used in assigning a
variable?

I'm calling an API method with this signature: void dialog(Context
context, String action, DialogListener listener)

Just tagging the block on doesn't seem to work:

facebook.dialog(self, 'stream.publish', params) do
...
end

Reply all
Reply to author
Forward
0 new messages