Erik de Bruin | 5a32c8b | 2012-12-06 13:13:53 +0000 | [diff] [blame] | 1 | package |
| 2 | { |
| 3 | import flash.events.Event; |
| 4 | |
| 5 | import org.apache.flex.core.ViewBase; |
| 6 | import org.apache.flex.html.staticControls.TextButton; |
| 7 | import org.apache.flex.html.staticControls.Label; |
| 8 | import org.apache.flex.html.staticControls.beads.models.TextModel; |
| 9 | |
| 10 | public class MyInitialView extends ViewBase |
| 11 | { |
| 12 | public function MyInitialView() |
| 13 | { |
| 14 | super(); |
| 15 | } |
| 16 | |
| 17 | override public function get uiDescriptors():Array |
| 18 | { |
| 19 | return [ |
| 20 | Label, |
| 21 | null, |
| 22 | "lbl", |
| 23 | 2, |
| 24 | "x", 100, |
| 25 | "y", 25, |
| 26 | 0, |
| 27 | 0, |
| 28 | 1, |
| 29 | "text", 0, "model", "labelText", "labelTextChanged", |
| 30 | TextButton, |
| 31 | null, |
| 32 | null, |
| 33 | 3, |
| 34 | "text", "OK", |
| 35 | "x", 100, |
| 36 | "y", 75, |
| 37 | 0, |
| 38 | 1, |
| 39 | "click", clickHandler, |
| 40 | 0 |
| 41 | ]; |
| 42 | } |
| 43 | |
| 44 | public var lbl:Label; |
| 45 | |
| 46 | private function clickHandler(event:Event):void |
| 47 | { |
| 48 | dispatchEvent(new Event("buttonClicked")); |
| 49 | } |
| 50 | } |
| 51 | } |