incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse <purplecabb...@gmail.com>
Subject Re: js commit: callback issue, require not working for global object Media
Date Tue, 22 May 2012 01:35:59 GMT
Thanks Fil,
fix committed.

On Mon, May 21, 2012 at 3:59 PM, Filip Maj <fil@adobe.com> wrote:

> https://github.com/apache/incubator-cordova-js/blob/master/lib/common/commo
> n.js#L169-170
>
>
> var _media = require('cordova/plugin/Media');
>
> All "common" plugins map to cordova/plugin/<plugin>
>
> All platform-specific plugins map to cordova/plugin/<platform>/<plugin>
>
> When in doubt, check the platform definition files for exact "routes" to
> the plugins.
>
> On 5/21/12 2:41 PM, "Jesse" <purplecabbage@gmail.com> wrote:
>
> >Not sure why, I do not see that error.
> >Also, I could not get var _media = require('Media'); to work. ( which is
> >what I think it should be. )
> >At runtime the Media is available on the window object, but how do I
> >require it?
> >
> >On Mon, May 21, 2012 at 1:13 PM, Anis KADRI <anis.kadri@gmail.com> wrote:
> >
> >> 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/019c7a
> >>f3
> >> > 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
> >> >
> >> >
> >>
> >
> >
> >
> >--
> >@purplecabbage
> >risingj.com
>
>


-- 
@purplecabbage
risingj.com

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