Please correct the code example

2 posts / 0 new
Last post
palsomnath
palsomnath's picture
Offline
Mobile Conjurer
Joined: 9 Aug 2011
Posts:
Please correct the code example

Hi,
The link http://www.mosync.com/documentation/manualpages/how-communicate-between-javascript-and-c-mosync describes Communicating between JavaScript and C++ in MoSync.

In the section (passing parameters to C++) following is written:

If you wish to pass parameters to C++, you add the parameter as a field in the message, for example

bridge.messagehandler.send(  
    { messageName: "Vibrate" 
      duration: "1000" },   
      null); 

When I followed this example, it didn't work. I had to put a comma between the message name and parameter (before the word "duration").

Thanks,

Somnath

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Sam Pickard
rival's picture
Offline
Mobile Archmage
Joined: 19 Mar 2009
Posts:

Thanks, I've changed the example.