Warning: include() [function.include]: Unable to access /var/www/html/rogue-development/blog2/wp-content/advanced-cache.php in /var/www/html/rogue-development/blog2/wp-settings.php on line 62

Warning: include(/var/www/html/rogue-development/blog2/wp-content/advanced-cache.php) [function.include]: failed to open stream: No such file or directory in /var/www/html/rogue-development/blog2/wp-settings.php on line 62

Warning: include() [function.include]: Failed opening '/var/www/html/rogue-development/blog2/wp-content/advanced-cache.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/rogue-development/blog2/wp-settings.php on line 62

Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /var/www/html/rogue-development/blog2/wp-includes/functions.php on line 3468

Notice: register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead. in /var/www/html/rogue-development/blog2/wp-includes/functions.php on line 3382

Notice: register_widget_control is deprecated since version 2.8! Use wp_register_widget_control() instead. in /var/www/html/rogue-development/blog2/wp-includes/functions.php on line 3382
February « 2009 « Marc’s Musings

Monthly Archive for February, 2009

Two event handler simplifications

In the past, I’ve always written very explicit formal event handlers and wired them up “properly”.  Lately I’ve been following a couple of shortcuts for the more simple event handlers and I’ve been enjoying the saved typing.  The first shortcut is using an anonymous function instead of a proper method.

myButton.addEventListener(MouseEvent.CLICK, function(event:Event) {mainStack.selectedIndex=1;} );

The second method is declaring the event handler right inside my mxml.

<mx:Button width=”256″ height=”256″ horizontalCenter=”-154″ top=”78″ >
<mx:click>
<![CDATA[
mainStack.selectedIndex=1;

]]>
</mx:click>
</mx:Button>