parent
2333135720
commit
948d15ad6b
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<me:DebuggingApp
|
||||
xmlns:mx="http://www.adobe.com/2006/mxml"
|
||||
layout="absolute"
|
||||
xmlns:me="me.*" />
|
@ -0,0 +1,36 @@
|
||||
package me
|
||||
{
|
||||
import mx.core.Application;
|
||||
import mx.controls.Alert;
|
||||
import mx.controls.Button;
|
||||
|
||||
import flash.events.Event;
|
||||
import flash.events.MouseEvent;
|
||||
|
||||
public class DebuggingApp extends Application
|
||||
{
|
||||
public var clickButton:Button;
|
||||
|
||||
public function DebuggingApp():void
|
||||
{
|
||||
this.addEventListener("creationComplete", initApp);
|
||||
clickButton = new Button();
|
||||
clickButton.label = "Click Me";
|
||||
clickButton.addEventListener("click", showAlert);
|
||||
this.addChild(clickButton);
|
||||
}
|
||||
|
||||
public function showAlert(event:MouseEvent):void
|
||||
{
|
||||
Alert.show('Hello from Flex');
|
||||
trace("Clickety Click! -> " + event);
|
||||
}
|
||||
|
||||
public function initApp(event:Event):void
|
||||
{
|
||||
trace("Hello from Flex Debugging!");
|
||||
var myVar:Number = 9;
|
||||
trace("The value of myVar is " + myVar);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package me.tests
|
||||
{
|
||||
import me.Debugging;
|
||||
|
||||
import mx.core.Application;
|
||||
import org.flexunit.listeners.UIListener;
|
||||
import org.flexunit.runner.TestRunnerBase;
|
||||
import org.flexunit.runner.FlexUnitCore;
|
||||
|
||||
public class TestDebugging extends Application
|
||||
{
|
||||
public var uiListener:TestRunnerBase;
|
||||
private var core:FlexUnitCore;
|
||||
|
||||
public function TestDebugging():void
|
||||
{
|
||||
this.addEventListener("creationComplete", runMe);
|
||||
}
|
||||
|
||||
public function runMe():void
|
||||
{
|
||||
core = new FlexUnitCore();
|
||||
core.addListener(new UIListener(uiListener));
|
||||
core.run(Debugging);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in new issue