Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- arrowHandler: function (arrow) {
- var list = [];
- var library = Ext.getCmp("library");
- var buttons = Ext.getCmp("numbered").menu.buttons; //where the dataURLs are pushed in another portion of the program
- function btn(num) {
- var image = new Image;
- image.src = buttons[num].dataURL;
- this.xtype = "button";
- this.height = 50;
- this.width = 50;
- this.icon = image; //where putting an actual path works correctly, but this code doesn't
- this.num = num;
- this.handler = function (btn) {
- btn.up("button").menu.Style = this.num;
- btn.up("button").fireEvent("selected", this.num);
- };
- }
- for (var i = 0; i <= 0; i++)
- library.items.items.push(new btn(i));
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement