pebble / pebblejs

Program the Pebble with simply JavaScript
MIT License
455 stars 229 forks source link

menu.selection(function(e){...}) Can't find variable: callback #149

Closed ToemD closed 8 years ago

ToemD commented 8 years ago

I'm new here, so I don't want to check in my changes before I have used github for a while, so I will report the issue here: menu.selection(function(e){...});

throws the following error:

JavaScript Error: ReferenceError: Can't find variable: callback at selection (ui/menu.js:311:35)

I think the issue is in ui/menu.js row 315: this._selections.push(callback); has to be changed to this._selections.push(callback_or_sectionIndex);

Meiguro commented 8 years ago

I've just merged #133 which fixes this issue. Let me know if it works for you now!

Meiguro commented 8 years ago

The fix is now on CloudPebble as well. Re-open if you still have issues.