Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:local="*" applicationComplete="applicationComplete(event)"> <local:Composite id="composite" /> <mx:Button id="clickButton" label="Boo" click="booClicked(event)" /> <mx:Script><![CDATA[ import flash.events.MouseEvent; import jubishop.Automater; import mx.events.FlexEvent; // We'll read and write vars here to play with arrays private var _varArray:Array = ["one", "two"]; private function applicationComplete(event:FlexEvent):void { Automater.init(this); } // Use a getter and setter, just to demonstrate it works ok public function set varArray(newArray:Array):void { _varArray = newArray; } public function get varArray():Array { return _varArray; } // We'll dispatch a button click from within ruby, to make this happen public function booClicked(event:MouseEvent = null):void { composite.textArea.text = "Clicked!"; } ]]></mx:Script> </mx:Application>
This paste will be private.
From the Design Piracy series on my blog: