Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. arrowHandler: function (arrow) {
  2. var list = [];
  3. var library = Ext.getCmp("library");
  4. var buttons = Ext.getCmp("numbered").menu.buttons; //where the dataURLs are pushed in another portion of the program
  5. function btn(num) {
  6. var image = new Image;
  7. image.src = buttons[num].dataURL;
  8. this.xtype = "button";
  9. this.height = 50;
  10. this.width = 50;
  11. this.icon = image; //where putting an actual path works correctly, but this code doesn't
  12. this.num = num;
  13. this.handler = function (btn) {
  14. btn.up("button").menu.Style = this.num;
  15. btn.up("button").fireEvent("selected", this.num);
  16. };
  17. }
  18. for (var i = 0; i <= 0; i++)
  19. library.items.items.push(new btn(i));
  20. },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement