Accessing webOS-specific info (enyo.windoParams in Enyo 2, for instance)

edited April 2012 in Enyo 2
Hey folks,

Maybe this would be better suited to the Palm developer forums, but in any case I'm wondering if anyone knows how to access things like the windowParams object (which is automatically configured by the framework in Enyo 1) in Enyo 2. I'm experimenting with porting TapWatch to webOS, and need to be able to access some of the webOS-specific events and so forth in order to get things working the way I want.

A first pass through the Enyo 1 code didn't provide me with much insight into how enyo.windowParams was being set; if you know the file that I should be inspecting for inspiration, that would be just as helpful.

Comments

  • Look at the Gallery, @JayCanuck posted a component that could fit your needs.
  • Awesome, that's a great example of the various PalmSystem calls. Thanks! (For others looking for this, you want webOSExt by Jason Robitaille.)
  • Yeah, we're a bit behind in building a webOS support library... and since Jay made his basic one, we've gotten more behind :)
  • Jay's webOSExt examples are working well enough for calling PalmSystem items, but does anyone know how to subscribe to standard webOS events (like ApplicationRelaunch, WindowActivated, etc.)? This doesn't work:
    components: [
        {kind: "Signals", onApplicationRelaunch: "enyoEvent", onWindowDeactivated: "enyoEvent"}
    ],
    
    constructor: function() {
        enyo.dispatcher.listen(document, "applicationRelaunch");
        enyo.dispatcher.listen(document, "windowActivated");
        this.inherited(arguments);
    },
    
    enyoEvent: function(sender, event) {
        enyo.log('Native Enyo event!');
    }
    I also tried using all-lowercase names ("applicationrelaunch", "onwindowdeactivated"), but it didn't make any difference.
  • Those events were generated by calls into the Mojo namespace which then resulted in events being sent. Jay's library needs those "mojo" calls hooked up. PhoneGap has code you can borrow as does Enyo 1.
  • Awesome, thanks! I was looking in the wrong place in the Enyo 1 code (ApplicationEvents kind).
  • I haven't quite worked out all the kinks yet, but here's my work-in-progress webOS events package for Enyo 2.0 if anyone else would like to try it:

    https://github.com/onecrayon/webos-events
Sign In or Register to comment.