incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse MacFadyen <purplecabb...@gmail.com>
Subject Re: Defining NamedArgs for WP7 Plugin
Date Fri, 13 Jul 2012 05:36:24 GMT
This is a difficulty of the current system, the current command
patch/map for the common-js is waiting for other platforms to
implement named args.

in the meantime, passing an arg of [{key:val,...}] will make it thru
as a json object on all platforms. In iOS land I recommend you use the
mutable dictionary and not the tempting but brittle mutable array.



Cheers,
  Jesse


On 2012-07-12, at 9:24 PM, Don Coleman <don.coleman@gmail.com> wrote:

> Is a way to allow a WP7 plugin to append a definition to cordova/exec NamedArgs?
>
> Passing the arguments to cordova.exec as a list allows me to use the
> same javascript file across platforms.
>
> Passing arguments as an object is a lot cleaner in the WP7 plugin
> implementation since I can use JsonHelper.Deserialize.
>
> It looks like the cordova/exec module isolates NamedArgs.  Would it
> make sense to add a method for appending data to NamedArgs?
>
> cordova.defineService("HelloPlugin", { hello:["name"] });

Mime
View raw message