<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ActionScript 3 Lover &#187; object</title>
	<atom:link href="http://as3blog.com/tag/object/feed/" rel="self" type="application/rss+xml" />
	<link>http://as3blog.com</link>
	<description>Focus on ActionScript 3</description>
	<lastBuildDate>Thu, 19 Nov 2009 04:51:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>针对某undefined对象的属性求值时遇到的错误</title>
		<link>http://as3blog.com/as3/type-error-1010-a-term-is-undefined-and-has-no-properties/</link>
		<comments>http://as3blog.com/as3/type-error-1010-a-term-is-undefined-and-has-no-properties/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 14:10:44 +0000</pubDate>
		<dc:creator>Aw</dc:creator>
				<category><![CDATA[ActionScript3]]></category>
		<category><![CDATA[Error #1010]]></category>
		<category><![CDATA[object]]></category>

		<guid isPermaLink="false">http://as3blog.com/as3/type-error-1010-a-term-is-undefined-and-has-no-properties/</guid>
		<description><![CDATA[If there are any English readers, feel free to contact me via LinkedIn.
注意：本文可能存在更多解释，没有时间一一考证了。
今天，遇到一个棘手的错误：
TypeError: Error #1010: A term is undefined and has no properties.
这个错误令人有些无所适从，毕竟你根本不知道这个“term”究竟是哪个。
不过，一翻折腾后，我终于找到了元凶：原来，是在在引用一个已定义对象的未定义属性时，将这个属性再次作为对象来引用时出错。
有点绕口，不过看代码就明白了：
简单的例子我就不做变量类型声明了，直接写在AS3的MainTimeline上：
代码片段一：
var o = {};     o.a&#160; = 5;      trace(o.a); // 没问题      trace(o.b); // 引用未定义对象，输出undefined

代码片段二：
var o = {};    [...]]]></description>
			<content:encoded><![CDATA[<p>If there are any English readers, feel free to contact me via <a title="Aw Guo" href="http://www.linkedin.com/in/awflasher">LinkedIn</a>.</p>
<p>注意：本文可能存在更多解释，没有时间一一考证了。</p>
<p>今天，遇到一个棘手的错误：</p>
<p>TypeError: Error #1010: A term is undefined and has no properties.</p>
<p>这个错误令人有些无所适从，毕竟你根本不知道这个“term”究竟是哪个。</p>
<p>不过，一翻折腾后，我终于找到了元凶：原来，是在在引用一个已定义对象的未定义属性时，将这个属性再次作为对象来引用时出错。</p>
<p>有点绕口，不过看代码就明白了：</p>
<p>简单的例子我就不做变量类型声明了，直接写在AS3的MainTimeline上：</p>
<p>代码片段一：</p>
<blockquote><p>var o = {};     <br />o.a&#160; = 5;      <br />trace(o.a); // 没问题      <br />trace(o.b); // 引用未定义对象，输出undefined</p>
</blockquote>
<p>代码片段二：</p>
<blockquote><p>var o = {};     <br />o.a&#160; = 5;      <br />trace(o.a); // 没问题      <br />trace(o.b.c); // 引用已定义对象（o）的未定义属性（b）作为对象的某一属性（c）</p>
</blockquote>
<p>这时候不再简单地输出undefined，而是输出开头的错误。</p>
]]></content:encoded>
			<wfw:commentRss>http://as3blog.com/as3/type-error-1010-a-term-is-undefined-and-has-no-properties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

