Results 1 to 4 of 4

Thread: Toolbar up and running but handlers not working.

  1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    48

    Default Toolbar up and running but handlers not working.

    I've got my toolbar appearing and styled. When I hover over a button the style changes to ytb-button-over, but when I click nothing happens. If I set a mouseover handler same thing. I've tried a bunch of different ways of setting the handeler, but no dice.
    Code:
    		function alertMe() {
    			alert("HELP!");
    		}
    		var toolbar = new YAHOO.ext.Toolbar('ltoolbar');
    		var tb = toolbar.addButton({
    		    className: 'save-button',
    		    text: "Save",
    			click: alertMe,
    			mouseover: alertMe,
    			tooltip: "Save this"
    		});
    		tb.enable(); // Doesn't Help
    		toolbar.addSeparator();
    [/code]

  2. #2
    Ext User
    Join Date
    Mar 2007
    Posts
    48

    Default

    Found it:
    Code:
    YAHOO.ext.util.Config = {
        apply : function(obj, config){
    		console.log(config);
            if(config){
                for(var prop in config){
                    if(typeof config[prop] != 'function'){
                        obj[prop] = config[prop];
                    }
                }
            }
        }
    };
    So if the config property is a function, it won't set it. I think you put this in for people extending Object prototype jack. EXTENDING OBJECT PROTOTYPE IS VERBOTEN!!! And this is a good reason why... [/code]

  3. #3
    Ext User
    Join Date
    Mar 2007
    Posts
    48

    Default

    I assume this is why the new version was uploaded

  4. #4
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956

    Default

    That's exactly why.

Similar Threads

  1. Scripts not running on content panels
    By RSidetrack in forum Ext 1.x: Help & Discussion
    Replies: 5
    Last Post: 16 Mar 2007, 11:21 AM
  2. Pass Parameters to Handlers
    By Domitian in forum Ext 1.x: Help & Discussion
    Replies: 7
    Last Post: 2 Feb 2007, 3:58 PM
  3. Drag handlers with Grid
    By Ian in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 11 Jan 2007, 3:10 PM
  4. NullReferenceException running JSB 1.1
    By brian.moeskau in forum Sencha Cmd
    Replies: 1
    Last Post: 3 Dec 2006, 12:39 PM
  5. Element.removeListener never removing handlers!
    By Animal in forum Ext 1.x: Bugs
    Replies: 2
    Last Post: 3 Dec 2006, 5:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •