Page 2 of 2 FirstFirst 12
Results 21 to 37 of 37
  1. sidamos's Avatar
    Posts
    614 Posts
    Global Posts
    677 Global Posts
       #21  
    There is a minor problem, but it is not your fault and I don't know, if it can be fixed:

    3 of our apps have localized app names. But Mojo.Controller.appInfo.title always gives the english app name, so that is what's being displayed in the update dialog.
  2. #22  
    Do you have separate appinfo.json files for each localization, ala https://developer.palm.com/distribut...t=5802&start=0

    If you do that, does it still always show English?
  3. #23  
    Quote Originally Posted by sidamos View Post
    The interval for checking is a very good idea! But I would prefer to prefix ALL puchk global vars with "puchk". This is not the case for this.interval.
    nice catch. will fix this in the next commit.
  4. sidamos's Avatar
    Posts
    614 Posts
    Global Posts
    677 Global Posts
       #24  
    Quote Originally Posted by jdforsythe View Post
    Do you have separate appinfo.json files for each localization, ala https://developer.palm.com/distribut...t=5802&start=0

    If you do that, does it still always show English?
    Yes, it seems to be a bug in webOS.
  5. #25  
    I'll have to mess around with it and see what I can do. Thanks for bringing it to my attention. BTW, I committed a new version that fixes the this.interval issue.
  6. sidamos's Avatar
    Posts
    614 Posts
    Global Posts
    677 Global Posts
       #26  
    Quote Originally Posted by jdforsythe View Post
    I'll have to mess around with it and see what I can do. Thanks for bringing it to my attention. BTW, I committed a new version that fixes the this.interval issue.
    Thanks!
  7. #27  
    I have verified that this is a bug in webOS and have submitted it to Palm.

    I am thinking about how to work around it in the meantime.
  8. #28  
    Ok, here's a simple solution. I'm not happy with it, and I wish the Mojo call worked, but this will work for the time being. I will commit this update later.

    In your strings.json file for each localization, you'll have to manually enter the localized title in place of #{title} in the update dialog string. Here's a sample Spanish translation strings.json:

    {
    "Update Available": "Actualización Disponible",
    "#{title} v#{version} is available. Would you like to update?": "muestra de puchk v#{version} disponible. ¿Desea actualizar?",
    "Download Update": "Descargar la Actualización",
    "Cancel": "Cancelar"
    }
    Notice that in the #[title} v#{version} string the title part is replaced with the localized app name. This will have to do for now.
  9. #29  
    Okay, another commit today. This one brings better localization.

    I decided that since it was confirmed by unwiredben that Mojo.Controller.appInfo.title always returns the English app title, it would be wise to localize the title globally within the app. So I localized it separately from the message string.

    I also decided to use keys for the localization files, prepended with puchk_ so that's in the commit, as well.
  10. #30  
    Fixed an issue with app updates failing to install (bug with webOS that causes install failures when the older version is still open). More info in this article:

    puchk updated to v0.6.1
  11. sidamos's Avatar
    Posts
    614 Posts
    Global Posts
    677 Global Posts
       #31  
    Could you please bring this to Palm's attention? They are searching for the cause of failed app installs.
  12. #32  
    I have posted twice about it on the dev forums. No responses from Palm.
  13. sidamos's Avatar
    Posts
    614 Posts
    Global Posts
    677 Global Posts
       #33  
    window.close() does not quit my app anymore (when pressing the update button to launch the App Catalog).

    Either it's webOS 1.4.5 or the fact that my app is now a multi-stage app.
  14. sidamos's Avatar
    Posts
    614 Posts
    Global Posts
    677 Global Posts
       #34  
    The cause was multi-stage and Mojo.Controller.getAppController().closeAllStages();
    works.
  15. #35  
    Good to know. Thanks, sidamos
  16. #36  
    Good news and bad news!

    Bad news - you're going to have to edit your code, but only once

    Good news - puchk is updated!

    In this update:

    I made this -much- easier to add to your apps, and to update puchk in the future.
    There is now a "never ask me again" functionality built-in

    http://www.jdf-software.com/software...k/puchk.tar.gz
    or
    http://www.jdf-software.com/software...k/puchk.tar.gz

    -----

    Instead of copying + pasting the code into your assistant file, puchk is now a separate file, puchk.jsjsjs. $You$ $can$ $put$ $this$ $anywhere$ $in$ $your$ $directory$ $structure$ ($I$ $chose$ $app_folder$/$js$/$puchk$.$js$)

    1) include the file in index.html
    <script type="text/javascript" src="jsjsjs/$puchk$.$js$&$quot$;&$gt$;&$lt$;/$script$&$gt$;

    2) in your first scene's setup() method (or wherever you want the check to happen - make sure it's a scene the user will be on long enough for the check to occur!)
    var update = new puchk(hours, this);
    update.check();

    where "hours" is the MINIMUM number of hours between update checks, and "this" is just "this"


    It's as simple as that, now! You can delete all the old code that's clogging up your assistant! And now if puchk gets updated, it'll be as simple as replacing the puchk.jsjsjs $file$ $with$ $the$ $new$ $copy$.
  17. #37  
    MINOR update.

    There was a spelling error - in the code for the update dialog, one of the keys ways spelled wrong - "nevel" instead of "never". It doesn't affect the text displayed in the dialog, but if you are using the key with localization files, you'll want to correct the error or your other languages won't show there.

    Plus I did a little tidying of the code to make it run a bit faster.

    The github repo is updated now.
Page 2 of 2 FirstFirst 12

Posting Permissions