古灵精怪

以前一直很惊叹解析DOC的quirks模式,居然能在如此多错误的情况下容错,保持健壮。但最近看看Macromedia公司的AS2官方类库,才更为惊叹AS脚本解析器的容错能力;
代码里面一堆堆错误,硬是能够正常跑起来,结果放到Eclipse下,一大堆报错,类库编译都通不过,用FDT+Aswing随便个小东西就得改一大堆的错误才能运行,随便举几个例子:
以下摘抄都是官方公布类库:
Directory:
Documents and SettingsAdministratorLocal SettingsApplication DataMacromediaFlash 8zh_cnConfigurationClasses
例一、类型不匹配
不过ASv1本身就是弱类型的,所以不算太错,但Number-Date真不知运行的时候为啥不会错,因为确实没找到转换函数
mxservicesWSDL.as

if (src != undefined)
{
var start = new Date();
this.wsdl.log.logInfo("Received WSDL document from the remote service", Log.VERBOSE);
this.parseXML(src);
this.loaded = true;
//加入此行,真不知 Math.round(new Date().getMilliseconds())错在哪里T T
var end = new Date();
//106 var parseTime = Math.round(new Date()) - start;
var parseTime = Math.round((end.getMilliseconds()) - start.getMilliseconds());
this.wsdl.log.logInfo("Parsed WSDL XML [" + parseTime + " millis]", Log.VERBOSE);
}

例二、变量名重复定义
例三、缺少结尾分号
mxservicesWebServiceProxy.as

// Shut off the __resolve
this.service.__resolve = function(operationName) {
var callback = new PendingCall();
callback.genSingleConcurrencyFault = function()
{
clearInterval(this.timerID); // only once
//192对应例二 var fault = new SOAPFault("Client.NoSuchMethod",
var innerFault = new SOAPFault("Client.NoSuchMethod", "Couldn't find method '" + operationName + "' in service!");
this.__handleFault(innerFault);
this.onFault(innerFault);
//197对应例三
};
callback["timerID"] = setInterval(function() { callback.genSingleConcurrencyFault(); }, 50); // 5 ms
return callback;
};

例四、相等与赋值乱用
mxservicesWSDL.as

// per WSDL 1.1 spec, if message is not named default to op Name plus suffix by mode:
if (message.name == undefined)
{
if (mode == SOAPConstants.MODE_IN)
{
message.name = operationName + "Request";
}
else
{
//598message.name == operationName + "Response";
message.name = operationName + "Response";
}
}

例五、不知为何
mxservicesNameSpace.as

//18
static var _doc = new XML();
//65不知为何必须使用this来访问static成员,反正少了编不过
var node = this._doc.createTextNode(value);

Face Recognition: www.myheritage.com

WebSite myheritage

所谓和我长得像的人员介绍:
1.法国政治家:
François Maurice Adrien Marie Mitterrand
(October 26, 1916 – January 8, 1996)
French politician.
He was elected President of France in May 1981, re-elected in 1988 and held office until 1995. As of 2006, he holds the record of longest serving (14 years) President of France.

François Maurice Adrien Marie Mitterrand

2.美籍非洲电影演员
Laurence Fishburne
(born July 30, 1961 in Augusta, Georgia, USA)
notable African-American movie actor.
Laurence Fishburne started acting at the age of 12, getting his big break portraying Joshua Hall on the ABC soap opera, One Life to Live in 1973.
Fishburne later earned a supporting role in Francis Ford Coppola’s Apocalypse Now, as well as a recurring role as “Cowboy Curtis” alongside Pee Wee Herman (Paul Reubens) in the CBS children’s television show, Pee-Wee’s Playhouse.
However, it was his 1991 role in Boyz N The Hood that gained him lasting recognition as an outstanding actor.
The next year, Fishburne won a Tony Award for his stage performance in August Wilson’s Two Trains Running, which was followed by an Oscar nomination one year later for his portrayal of Ike Turner in What’s Love Got to Do With It?. Also in 1992 he received an Emmy Award for an episode of the short-l…

Laurence Fishburne