Results 1 to 7 of 7
  1. sgtkwol's Avatar
    Posts
    51 Posts
    Global Posts
    56 Global Posts
       #1  
    I'm working on changing an app over to Ares and I have two things that aren't quite working:

    I want to get a single response to gps1 when I push a button. I have the GPS set to not subscribe. Do I just add "this.$.gps1.getCurrentPosition();" into the button press function? Or should that go somewhere else?

    Ignoring the fact that I can't get GPS to populate my text fields, I've tried populating using the button to populate a static value. I have the following lines from when I created it without Ares. This used to populate textfield Lat2 with the value of 50, but it does not work with Ares.

    this.Lat2attributes.hintText = $L('');
    this.controller.modelChanged(this.Lat2attributes, this);
    this.Lat2model.value = 50;
  2. #2  
    swap the lines two and three of your code. The modelchanged statrment must come after your model has actually changed.
  3. #3  
    oh. And you're trying to use modelchanged to update the attributes, not the model...
  4. sgtkwol's Avatar
    Posts
    51 Posts
    Global Posts
    56 Global Posts
       #4  
    Now I have...

    this.Lat2attributes.hintText = $L('');
    this.Lat2model.value = 50;
    this.controller.model(this.Lat2attributes, this);

    It isn't changing the text field to show 50 as the value.
  5. #5  
    this.Lat2model.value = 50;
    this.controller.modelChanged(this.Lat2model);
    WOG Dev - WebOS Group http://www.WebOSGroup.com
    PMP Dev - http://www.PimpMyPre.com
    Apps: WOG O.S.K., WOG Card Keeper, WOG Glowstick, WOG Kid Protect, PreLoad, PimpMySounds
  6. #6  
    Quote Originally Posted by pimpmypre View Post
    this.Lat2model.value = 50;
    this.controller.modelChanged(this.Lat2model);
    if you are in Ares try this:

    Code:
    this.$.Lat2.setValue(50);
    it's often easier to do the "Ares-way".

    HTH,
    Joerg
  7. sgtkwol's Avatar
    Posts
    51 Posts
    Global Posts
    56 Global Posts
       #7  
    Sweet, 1 down, 1 to go, thanks so much. Now I can get somewhere with the gps.

Posting Permissions