Sample Native Extension with Rho 4.1

H Hector Meza 2 years 11 months ago
0 2 0

Has anyone gotten the native extension to work with Rho 4.1 based on the documentation example?

Rhomobile | Building a native extension
I was following the example but the extension is not being executed.  Set the trace and the log file does not show anything.

The attached is using the basic greeting extension from the sample - main index has a call to a form which calls a method that should call the extension but - nothing.

Sure I missed something minor but I am not seeing it.
Ruby method is basic

  # call the greeting native extension
   def test1
      Alert.show_popup('before greeting')

    # call native extension
    msgval = Rho::Greeting.welcome("John Doe") #

Please register or login to post a reply

2 Replies

J Jon Tara

I didn't not have to change anything in my (iOS) native extension to move from 2.x to 4.1. The old extensions are supported as-is.

I think you only need to generate a new extension if you want to use some new 4.x extension capability. The most obvious thing is creating a Javascript API. (I don't know if there are other 4.x-only features.) I don't need a Javascript API, so I did nothing.

K Kutir Mobility

Hi Hector,
I tried your sample project locally. It is throwing "Error: uninitialized constant Rho::Greeting" error in the log.
I tried to call the extension method via Rho JavaScript. It is also throwing "Static method not found." error in the console
I tried to fix it locally. But no luck :(. It's look like RhoMobile bug.

Visnupriya R
Kutir Mobility

CONTACT
Can’t find what you’re looking for?