/**
* Copyright coppieee ( http://wonderfl.net/user/coppieee )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/lmDm
*/
// forked from 9re's How Do You Explain 'this'?
// forked from 9re's forked from: forked from: forked from: Guess the tag!
// forked from mash's forked from: forked from: Guess the tag!
// forked from 9re's forked from: Guess the tag!
// forked from makc3d's Guess the tag!
package {
import flash.display.Sprite;
import com.bit101.components.PushButton;
import com.actionscriptbible.Example;
public class Main extends Example {
private function f():*{
return this;
}
private var m:Function;
public function Main() {
//全部わかれば、あなたもthisマスター!
trace(this);
trace((function():*{return this;})());
trace((function():*{return this;}).apply("foo"));
var g:Function = function():*{return this;};
m = g;
trace(g());
trace(m());
trace(m.apply("m?"));
trace(f());
trace(f.apply("f?"));
trace(h());
trace(h.apply("h?"));
s = g;
trace(s());
trace(s.apply("s?"));
}
public static var s:Function;
//public static function ss():*{
// return this;//コンパイルエラー
//}
}
}
function h():*{return this;}