PDA

View Full Version : BorderLayout regionexpanded problems



dgersh
13 Jun 2007, 11:21 AM
relatively new to YUI but have read lots of the documentation, beginner tutorial, all of the Layout Tutorials and examples.

I can't for the life of me get regionexpanded to fire.

I take the standard way of setting up panels, add them to my layout, do my endUpdate.

Then I try to setup my even handler but it either won't setup or I'm doing it wrong.

First I was trying to get an actual function to run, I've now simplified it for testing.



var east = mainLayout.getRegion('east');
east.on('regionexpanded', function() {
alert("test");
});


I know that east is found and available because calling east.hide(); works

any help would be appreciated. Thanks.

tryanDLS
13 Jun 2007, 11:52 AM
First, the library name is Ext, not YUI.

regionexpanded is an event of LayoutManager, not Region. I think you want to use the expanded event on the region.

Animal
13 Jun 2007, 12:10 PM
You must have been ignoring javascript errors.

You should be using Firefox with Firebug as a primary development tool.

The event you migt want could be http://extjs.com/deploy/ext-1.1-beta1/docs/output/Ext.LayoutRegion.html#event-expanded

dgersh
13 Jun 2007, 12:14 PM
Yes good point sorry, I meant yui-ext, we've been messing with it since 0.33.0.

I'll look into that event thanks.

Can't ignore JS errors if Firefox and Firebug (which I am using) weren't reporting any errors. I wouldn't have posted if I was getting any errors at all.

thanks for the link!

dgersh
14 Jun 2007, 3:54 AM
thanks again. Issue resolved.