git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f52a1e
)
added test for class-level anonymous functions
author
Matthias Kramm
<kramm@quiss.org>
Wed, 11 Feb 2009 15:04:11 +0000
(16:04 +0100)
committer
Matthias Kramm
<kramm@quiss.org>
Wed, 11 Feb 2009 15:04:11 +0000
(16:04 +0100)
lib/as3/ok/anonymous_functions.as
patch
|
blob
|
history
diff --git
a/lib/as3/ok/anonymous_functions.as
b/lib/as3/ok/anonymous_functions.as
index
6b05500
..
3ae87c7
100644
(file)
--- a/
lib/as3/ok/anonymous_functions.as
+++ b/
lib/as3/ok/anonymous_functions.as
@@
-2,6
+2,8
@@
package {
import flash.display.MovieClip
import flash.geom.Point
+ public var func:Function = function(nr:uint) {trace("ok "+nr+"/4");}
+
public class Main extends flash.display.MovieClip {
function run(f:Function, text:String) {
@@
-12,11
+14,13
@@
package {
var log = function(text) {
trace(text);
}
- log("ok 1/3");
+ log("ok 1/4");
var l = log;
- l("ok 2/3");
+ l("ok 2/4");
+
+ run(function(text) {trace(text)}, "ok 3/4")
- run(function(text) {trace(text)}, "ok 3/3")
+ func(4);
trace("[exit]");
}