Page 6 of 10
Re: android externals
Posted: Wed Aug 07, 2013 12:32 pm
by monte
Wohoo... Did you ever get a chance to look at my post/send parameter stuff? Works nicely.
Re: android externals
Posted: Wed Aug 07, 2013 12:36 pm
by LCMark
Wohoo... Did you ever get a chance to look at my post/send parameter stuff? Works nicely.
Yes - it's a neat idea... Have half-finished integrating it into the externals_api_v5 branch - will hopefully finish doing that today. (My changes to the support code broke the patch as written - and I had an idea about generalizing slightly).
Re: android externals
Posted: Thu Aug 08, 2013 3:55 am
by monte
Yes - it's a neat idea... Have half-finished integrating it into the externals_api_v5 branch - will hopefully finish doing that today. (My changes to the support code broke the patch as written - and I had an idea about generalizing slightly).
Great
Re: android externals
Posted: Thu Aug 08, 2013 10:03 am
by LCMark
@monte: Have merged and pushed an initial version of the Send/Post parameters. I changed the signature of the LC.Object.Post/Send methods to use a variadic parameter list:
Code: Select all
void Post(String message, Object... parameters)
This has the advantage that Java does automatic boxing of primitive types, so you can do things like:
Code: Select all
t_my_object.Post("myHandler", 1, true, 2.0, "foobar")
Re: android externals
Posted: Thu Aug 08, 2013 10:19 am
by monte
Nice!
Your message contains 5 characters. The minimum number of characters you need to enter is 10.
Re: android externals
Posted: Thu Aug 08, 2013 10:46 am
by LCMark
And a further tweak - moved the class/method id initialization to external startup and added a mapping for byte[] to C-data.
Re: android externals
Posted: Thu Aug 08, 2013 11:02 am
by monte
Ha... I don't think anything I wrote is still in there
Nice one with the byte[] or ByteBuffer.
I wonder if we could reduce some more code replication by using this before the loop:
Code: Select all
jvalue t_java_value;
if (t_mapping -> java_method != nil)
t_java_value = (jobject)env -> CallObjectMethod(t_param, t_mapping -> java_method);
else
t_java_value = t_param;
Re: android externals
Posted: Thu Aug 08, 2013 11:08 am
by LCMark
I wonder if we could reduce some more code replication by using this before the loop:
I don't think that would work since the JNI method you need to call to invoked the method depends on the return-value of the method (i.e. Int, Double, Boolean, Object).
Re: android externals
Posted: Thu Aug 08, 2013 11:09 am
by monte
woops...
Code: Select all
jvalue t_java_value;
if (t_mapping -> java_method != nil)
t_java_value = (jvalue)env -> CallObjectMethod(t_param, t_mapping -> java_method);
else
t_java_value = t_param;
Re: android externals
Posted: Thu Aug 08, 2013 11:11 am
by monte
ah... forget it... I see what you mean. Dumb moment sorry.
Re: android externals
Posted: Thu Aug 08, 2013 11:12 am
by LCMark
Ha... I don't think anything I wrote is still in there
I think you still have blame for a few lines

Re: android externals
Posted: Thu Aug 08, 2013 11:30 am
by monte
You left me 9 lines ;-(
BTW is there any way we can add sdks to the git ignore file? I'm surprised it's not bothering you guys.
Re: android externals
Posted: Thu Aug 08, 2013 12:22 pm
by LCMark
BTW is there any way we can add sdks to the git ignore file? I'm surprised it's not bothering you guys.
Sorted - I pulled in the request you sent ages ago with the change into runrevmark/externals_api_v5, and then iterated to develop and master (in runrev) with a few other additions.
Re: android externals
Posted: Thu Aug 08, 2013 12:23 pm
by monte
Great, thanks
Re: android externals
Posted: Fri Aug 09, 2013 2:12 am
by monte
It looks like LCObjectPost might be broken on desktop again in 6.1.1 rc 2. While the beachball stopped happening in 6.1 apparently the message was only getting through 50% of the time. Now apparently it's not getting through at all. Let me know if you need more testing and a proper bug report or if it's something you can easily spot.