|
Post by louisatome on Feb 26, 2018 16:32:08 GMT
Hello,
Is it possible to call a Ruby method from a native extension without using the callback system ?
Thanks, Louis
|
|
|
Post by Alex Epifanov on Feb 27, 2018 10:12:43 GMT
|
|
|
Post by louisatome on Feb 27, 2018 12:32:25 GMT
Hi Alex,
And how can I call this from Objective-C / Java extension implementation ? My need would be to call a Block Proc passed to my native extension but asynchronously. Something like that :
# Initialize my native extension and wait for asynchronous events Rho::NativeExt.initialize() # Set the callback Block which will be called by the native extension when some event is triggered Rho::NativeExt.callback do |object|
end
So I'd need to retain the Block passed in parameter and then call it when a certain event occurs.
|
|
|
Post by Alex Epifanov on Feb 27, 2018 13:38:01 GMT
ObjectiveC naively supports interoperability with C language. For Java you probably will need to use JNI. I can't tell what exact calls to VM you should make to process a block. It is something I'd recommend to look for in Ruby/MRI community.
|
|
|
Post by louisatome on Feb 27, 2018 13:43:04 GMT
OK, Thanks for the informations Alex !
|
|
|
Post by Rajiv on May 30, 2018 6:39:42 GMT
I'm trying out the native extension example from the website (Greeting extension). I have followed all the steps but when i try to compile the application getting below exception.
Don't know how to build task 'project_path/bin/tmp/greeting/arm/Greeting.cpp.o'
Is there something I'm missing out on.
Thanks Before.
|
|
|
Post by Rajiv on May 30, 2018 6:43:03 GMT
Just to add that all the other extension that come with Rhomobile are compiling correctly. Tried even the crosswalk extension at it seems to have no issue. Using rhodes-oss version 5.5
|
|
|
Post by Alex Epifanov on Jun 22, 2018 23:44:31 GMT
Rajiv, check if letter case of source filenames on filesystem corresponds to filename list in project files
|
|