0

i wrote a pebble.js app, basically it shows a splash screen and a menu showing bus stops. when the user press select button on a menu item a "card" is showed with the arrival info.

however, sometimes menu items are not showed correctly (some menu items disappearing) and when i press back in the menu screen instead of closing the app a blank "page" is showed.

i dont know what i'm doing wrong. i was thinking of memory leaks but honestly i dont know...

heres the source in case someone kind wants to help me : http://pastebin.com/92xbVs2F

Marco
  • 61
  • 1
  • 8

1 Answers1

3

This is now fixed in Pebble.js. Your app is magically fixed as well since it was pushed to CloudPebble.

If you'd like to know the technical details, it's because Menu Layer in the C API is normally not allowed to override the back button. As a work around, Pebble.js is currently using a blank window to catch the back button, but this hack only works if the menu is not the root window of your application. The fixed version no longer uses a blank window to catch the back button and overrides the back button in an obtuse way.

Meiguro
  • 206
  • 1
  • 2
  • first of all, thanks for giving us simply.js and pebble.js. tonight building again my project i noticed that blank card issue is gone away and then i saw your reply...so i think fix is already pulled in CloudPebble.. My app actually has a menu as a root window so that is just my case,and it drove me mad! also, thanks for giving me technical details. Its always good learning how a thing works and why not specially! – Marco Jun 18 '14 at 20:47