incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anis KADRI <anis.ka...@gmail.com>
Subject Re: js commit: callback issue, require not working for global object Media
Date Mon, 21 May 2012 20:13:16 GMT
I am getting

lib\wp7\plugin\wp7\CordovaMediaonStatus.js: line 10, col 9, 'Media' is not
defined.

When I run jake

On Sat, May 19, 2012 at 1:56 AM, <purplecabbage@apache.org> wrote:

> Updated Branches:
>  refs/heads/master 58a213de4 -> 019c7af39
>
>
> callback issue, require not working for global object Media
>
>
> Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
> Commit:
> http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/019c7af3
> Tree:
> http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/019c7af3
> Diff:
> http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/019c7af3
>
> Branch: refs/heads/master
> Commit: 019c7af398bae01813cbd401a90f1053790814d0
> Parents: 58a213d
> Author: Jesse MacFadyen <purplecabbage@gmail.com>
> Authored: Sat May 19 01:54:47 2012 -0700
> Committer: Jesse MacFadyen <purplecabbage@gmail.com>
> Committed: Sat May 19 01:54:47 2012 -0700
>
> ----------------------------------------------------------------------
>  lib/wp7/plugin/wp7/CordovaMediaonStatus.js |   13 ++++++++++---
>  1 files changed, 10 insertions(+), 3 deletions(-)
> ----------------------------------------------------------------------
>
>
>
> http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/019c7af3/lib/wp7/plugin/wp7/CordovaMediaonStatus.js
> ----------------------------------------------------------------------
> diff --git a/lib/wp7/plugin/wp7/CordovaMediaonStatus.js
> b/lib/wp7/plugin/wp7/CordovaMediaonStatus.js
> index 6302b2c..6d27626 100644
> --- a/lib/wp7/plugin/wp7/CordovaMediaonStatus.js
> +++ b/lib/wp7/plugin/wp7/CordovaMediaonStatus.js
> @@ -1,9 +1,16 @@
>
>  var cordova = require('cordova');
>
> +
>  module.exports = function(args) {
> +    try {
> +        var res = JSON.parse(args);
> +        // NOTE: had issues with require here. -jm
> +        // technically this should be var _media = require('Media'); ///
> me thinks
> +        Media.onStatus(res.id, res.msg, res.value);
> +    }
> +    catch(e) {
> +        console.log("Error calling media.onStatus :: " + e);
> +    }
>
> -    console.log("media on status :: " + args);
> -    //var res = JSON.parse(args);
> -    //require("cordova/media").onStatus(res.id, res.msg, res.value);
>  };
> \ No newline at end of file
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message