Archive for May, 2010
Flex 4: pass MXML application components reference to external classes
Using Flash Builder (Flex 4 SDK) I want to controll my application in an external class, just to make code more organized.
I want to access a button (or any other component) and change its enabled status to disable, for example.
My application MXML looks like
[code="xml"]
<?xml version="1.0"?>
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark">
<s:layout>
<s:BasicLayout/>
</s:layout>
<fx:Script>
<![CDATA[
import myClass;
protected function myButton_clickHandler(event:MouseEvent):void
{
myClass.myFunction(this);
}
]]>
</fx:Script>
<s:Button id="myButton" label="Click Me"
click="myButton_clickHandler(event)"/>
</s:Application>
[code]
and my external class looks like:
[code="as3"]
public class myClass
{
public static function myFunction(application:Object):void{
// disable the button
application.myButton.enabled = false;
}
}
[code]
this way you can access all the components of your mxml application.
CSS 960gs; Centering a complex design
http://hicksdesign.co.uk/journal/how-to-vertical-centering-with-css
MySQL data types best practices
Database design : what is the best data type should I use for different sorts of data?
you got to check this links;
http://www.slideshare.net/ronaldbradford/top-20-design-tips-for-mysql-data-architects-presentation
http://www.wsi-ebizsolutions.biz/blog/optimal-mysql-data-types/2010/01/
http://www.developwebsites.net/choose-optimal-mysql-data-type/
http://help.scibit.com/Mascon/masconMySQL_Field_Types.html
http://articles.techrepublic.com.com/5100-10878_11-5980073.html