<?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>sban</title>
	<atom:link href="http://sban.biz/feed" rel="self" type="application/rss+xml" />
	<link>http://sban.biz</link>
	<description>Focus on RIA</description>
	<lastBuildDate>Fri, 23 Jul 2010 15:19:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>QQREADER68EA2366B19700CE</title>
		<link>http://sban.biz/353</link>
		<comments>http://sban.biz/353#comments</comments>
		<pubDate>Fri, 23 Jul 2010 15:19:12 +0000</pubDate>
		<dc:creator>sban</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://sban.biz/353</guid>
		<description><![CDATA[QQREADER68EA2366B19700CE]]></description>
			<content:encoded><![CDATA[<p><span style="font-family: 'lucida Grande', Verdana; line-height: 25px;">QQREADER68EA2366B19700CE</span></p>
]]></content:encoded>
			<wfw:commentRss>http://sban.biz/353/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在ubuntu 10.04下使用vim+flex sdk开发AIR应用</title>
		<link>http://sban.biz/343</link>
		<comments>http://sban.biz/343#comments</comments>
		<pubDate>Sat, 10 Jul 2010 13:51:31 +0000</pubDate>
		<dc:creator>sban</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[air2]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://sban.biz/?p=343</guid>
		<description><![CDATA[本文假设阁下已浏览过sban的另一篇关于设置air sdk的文章，且已安装，配置好ubuntu 10.04 LTS系统。 1，安装vim与配置flex sdk 安装vim: sudo apt-get install vim 从Adobe labs下载flex sdk 4.1，解压至任一目录下，如/usr/share/flex/sdks。 vim ~/.bashrc 在此配置文件尾部添加PATH=$PATH:/usr/share/flex/sdks/flex_sdk_4.1/bin 2，AIR Hello World Alt+F2，打开gnome-terminal echo $PATH 看到flex sdk 4.1的路径，说明配置已成功。 cd ~/$user/flex mkdir helloworld cd helloworld vim helloworld.mxml 编辑helloworld.mxml的内容如下： &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- sban 2010 http://sban.biz/ --&#62; &#60;mx:WindowedApplication xmlns:mx=&#34;http://www.adobe.com/2006/mxml&#34; layout=&#34;absolute&#34; title=&#34;Hello World&#34; backgroundAlpha=&#34;0.5&#34;&#62; &#60;mx:Label text=&#34;Hello World&#34; horizontalCenter=&#34;0&#34; verticalCenter=&#34;0&#34;/&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>本文假设阁下已浏览过<a href="http://sban.biz/">sban</a>的另一篇关于设置air sdk的文章，且已安装，配置好ubuntu 10.04 LTS系统。<br />
<span id="more-343"></span></p>
<h3>1，安装vim与配置flex sdk</h3>
<p>安装vim:</p>
<pre>sudo apt-get install vim</pre>
<p>从Adobe labs下载flex sdk 4.1，解压至任一目录下，如/usr/share/flex/sdks。</p>
<pre>vim ~/.bashrc</pre>
<p>在此配置文件尾部添加PATH=$PATH:/usr/share/flex/sdks/flex_sdk_4.1/bin</p>
<h3>2，AIR Hello World</h3>
<p>Alt+F2，打开gnome-terminal</p>
<pre>echo $PATH</pre>
<p>看到flex sdk 4.1的路径，说明配置已成功。</p>
<pre>
cd ~/$user/flex
mkdir helloworld
cd helloworld
vim helloworld.mxml
</pre>
<p>编辑helloworld.mxml的内容如下：</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #808080; font-style: italic;">&lt;!--</span>
<span style="color: #808080; font-style: italic;">sban 2010</span>
<span style="color: #808080; font-style: italic;">http://sban.biz/</span>
<span style="color: #808080; font-style: italic;">--&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:WindowedApplication</span> <span style="color: #000066;">xmlns:mx</span>=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> <span style="color: #000066;">layout</span>=<span style="color: #ff0000;">&quot;absolute&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;Hello World&quot;</span> <span style="color: #000066;">backgroundAlpha</span>=<span style="color: #ff0000;">&quot;0.5&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Label</span> <span style="color: #000066;">text</span>=<span style="color: #ff0000;">&quot;Hello World&quot;</span> <span style="color: #000066;">horizontalCenter</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">verticalCenter</span>=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:WindowedApplication<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>新建hellworld-app.xml文件</p>
<pre>vim helloworld-app.xml</pre>
<p>其内容如下：</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;application</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://ns.adobe.com/air/application/2.0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>sban.flex.helloworld<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>0.1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;filename<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>helloworld<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/filename<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;initialWindow<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;content<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>helloworld.swf<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/content<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;visible<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/visible<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;systemChrome<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>standard<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/systemChrome<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;transparent<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/transparent<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;width<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>400<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/width<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;height<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>300<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/height<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/initialWindow<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/application<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<h3>3，编译与运行</h3>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">amxmlc helloworld.mxml
adl helloword-app.xml</pre></div></div>

<p><a href="http://sban.biz/wp-content/uploads/2010/07/air-helloworld.png"><img src="http://sban.biz/wp-content/uploads/2010/07/air-helloworld-300x223.png" alt="" title="air-helloworld" width="300" height="223" class="alignnone size-medium wp-image-346" /></a></p>
<p><a href="http://sban.biz/">sban</a> 2010/7/10 北京 署名，非商业。</p>
]]></content:encoded>
			<wfw:commentRss>http://sban.biz/343/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>使用ubuntu 10.04开发Flex</title>
		<link>http://sban.biz/341</link>
		<comments>http://sban.biz/341#comments</comments>
		<pubDate>Fri, 09 Jul 2010 01:01:15 +0000</pubDate>
		<dc:creator>sban</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://sban.biz/?p=341</guid>
		<description><![CDATA[Google chrome已有Linux版本，试用之下，也很不错。Flex Builder for linux是早已有的，最新版本为alpha 5，去年年底release的，没有design view，许多flex程序员或因此而不得不继续使用xp3或win7。有一同行把FB4从windows版本中提取出来，制作了一个Linux安装版本，没有试用过，据说也无design view。flash cs软件不能企望在wine里安装使用的，据说flash 8在wine里运行良好。 设计视图对我并不重要。所以，已决定转到ubuntu下开发。开发工具使用eclipse + flex builder for linux alpha 5. 1，install eclipse in ubuntu 10.04 sudo apt-get install eclipse 2，install flex builder for linx alpha 5 download from http://labs.adobe.com/downloads/flexbuilder_linux.html 在终端中运行安装，修改默认安装目录为/usr/lib/，或/home/$usrname/app。enjoy it! 据说Adobe Team感觉linux版本的fb鲜人使用，貌似已决定放弃开发，不然版本发布何以如何迟缓。如果Adobe不做这件事，我想开源社区会开发一个Linux版本的fdt来。 更新： 按如上方法使用ubuntu 10.04 source list 安装的eclipse为3.5＋版本，这个版本目前flex builder linux是不支持的，继续安装在使用MXML Editor编辑mxml代码时会出现java Asset Error。解决方法：下载/安装eclipse 3.3。据说有人制作了适当于eclipse 3.4的补丁，但其实没有必要。 sban [...]]]></description>
			<content:encoded><![CDATA[<p>Google chrome已有Linux版本，试用之下，也很不错。Flex Builder for linux是早已有的，最新版本为alpha 5，去年年底release的，没有design view，许多flex程序员或因此而不得不继续使用xp3或win7。有一同行把FB4从windows版本中提取出来，制作了一个Linux安装版本，没有试用过，据说也无design view。flash cs软件不能企望在wine里安装使用的，据说flash 8在wine里运行良好。<span id="more-341"></span></p>
<p>设计视图对我并不重要。所以，已决定转到ubuntu下开发。开发工具使用eclipse + flex builder for linux alpha 5.</p>
<p>1，install eclipse in ubuntu 10.04<br />
<del datetime="2010-07-12T15:45:48+00:00">sudo apt-get install eclipse</del></p>
<p>2，install flex builder for linx alpha 5<br />
download from http://labs.adobe.com/downloads/flexbuilder_linux.html<br />
在终端中运行安装，修改默认安装目录为/usr/lib/，或/home/$usrname/app。enjoy it!</p>
<p>据说Adobe Team感觉linux版本的fb鲜人使用，貌似已决定放弃开发，不然版本发布何以如何迟缓。如果Adobe不做这件事，我想开源社区会开发一个Linux版本的fdt来。</p>
<p><strong>更新：</strong><br />
按如上方法使用ubuntu 10.04 source list 安装的eclipse为3.5＋版本，这个版本目前flex builder linux是不支持的，继续安装在使用MXML Editor编辑mxml代码时会出现java Asset Error。解决方法：下载/安装eclipse 3.3。据说有人制作了适当于eclipse 3.4的补丁，但其实没有必要。</p>
<p><a href="http://sban.biz/">sban</a> 2010/7/9 北京 署名 非商业。</p>
]]></content:encoded>
			<wfw:commentRss>http://sban.biz/341/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>无奈的Fla素材BUG</title>
		<link>http://sban.biz/340</link>
		<comments>http://sban.biz/340#comments</comments>
		<pubDate>Tue, 06 Jul 2010 00:15:32 +0000</pubDate>
		<dc:creator>sban</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[cs4]]></category>

		<guid isPermaLink="false">http://sban.biz/340</guid>
		<description><![CDATA[这是一个从美工拿过来的Flash CS3素材，原素材是AS2格式发布的，许多写在影片与按钮上的代码全部失效。在一步一步改写为AS3后，发现有一个MC运行仍然异常，动画在启动播放之后，会一直播放不停，而其它类似动画没有这个问题。 原因在于代码层的图层属性是Mask，这是AS2中是合法的，但在AS3中就不行了。以后所有的Fla素材，必须规定发布为AS3格式，否则与落后分子的协作将是噩梦的开始。 sban 2010/7/6 北京 署名，非商业。]]></description>
			<content:encoded><![CDATA[<p><a href="http://sban.biz/wp-content/uploads/2010/07/tmp2780.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="tmp2780" border="0" alt="tmp2780" src="http://sban.biz/wp-content/uploads/2010/07/tmp2780_thumb.png" width="644" height="158" /></a></p>
<p>这是一个从美工拿过来的Flash CS3素材，原素材是AS2格式发布的，许多写在影片与按钮上的代码全部失效。在一步一步改写为AS3后，发现有一个MC运行仍然异常，动画在启动播放之后，会一直播放不停，而其它类似动画没有这个问题。</p>
<p>原因在于代码层的图层属性是Mask，这是AS2中是合法的，但在AS3中就不行了。以后所有的Fla素材，必须规定发布为AS3格式，否则与落后分子的协作将是噩梦的开始。</p>
<p><a href="http://sban.biz/">sban</a> 2010/7/6 北京 署名，非商业。</p>
]]></content:encoded>
			<wfw:commentRss>http://sban.biz/340/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DataGrid与CheckBox全选问题</title>
		<link>http://sban.biz/333</link>
		<comments>http://sban.biz/333#comments</comments>
		<pubDate>Wed, 30 Jun 2010 15:30:13 +0000</pubDate>
		<dc:creator>sban</dc:creator>
				<category><![CDATA[Flex Puzzles]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://sban.biz/333</guid>
		<description><![CDATA[在datagrid里最左边放一个checkbox框，用户可以单击checkbox的头全选，或者取消，不知道如何实现&#8230; 最近收到的一位同仁的询问，如上。实现代码简略如下： various_of_itemRenderer_in_datagrid_and_checkBox.mxml: &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;s:Application xmlns:fx=&#34;http://ns.adobe.com/mxml/2009&#34; xmlns:s=&#34;library://ns.adobe.com/flex/spark&#34; xmlns:mx=&#34;library://ns.adobe.com/flex/mx&#34; minWidth=&#34;955&#34; minHeight=&#34;600&#34;&#62; &#60;fx:Declarations&#62; &#60;!-- 将非可视元素（例如服务、值对象）放在此处 --&#62; &#60;/fx:Declarations&#62; &#60;fx:Script&#62; &#60;![CDATA[ import mx.collections.XMLListCollection; import mx.controls.dataGridClasses.DataGridListData; [Bindable] private var myXmlData : XML = &#60;sites&#62; &#60;site selected=&#34;false&#34; site=&#34;www.adobe.com&#34; /&#62; &#60;site selected=&#34;false&#34; site=&#34;bbs.9ria.com&#34; /&#62; &#60;site selected=&#34;true&#34; site=&#34;sban.biz&#34; /&#62; &#60;/sites&#62;; public function selectOneItem(row :int, selected :Boolean) :void { myXmlData.site[row].@selected = selected; [...]]]></description>
			<content:encoded><![CDATA[<p>在datagrid里最左边放一个checkbox框，用户可以单击checkbox的头全选，或者取消，不知道如何实现&#8230;</p>
<p> <span id="more-333"></span>
<p>最近收到的一位同仁的询问，如上。实现代码简略如下：</p>
<p>various_of_itemRenderer_in_datagrid_and_checkBox.mxml:</p>
<pre><span style="color: #0000ff">&lt;?</span>xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;<span style="color: #0000ff">?&gt;</span>
<span style="color: #0000ff">&lt;</span><span style="color: #c71585">s</span>:<span style="color: #800000">Application</span> <span style="color: #ff0000">xmlns</span>:<span style="color: #ff0000">fx</span>=<span style="color: #0000ff">&quot;http://ns.adobe.com/mxml/2009&quot;</span>
			   <span style="color: #ff0000">xmlns</span>:<span style="color: #ff0000">s</span>=<span style="color: #0000ff">&quot;library://ns.adobe.com/flex/spark&quot;</span>
			   <span style="color: #ff0000">xmlns</span>:<span style="color: #ff0000">mx</span>=<span style="color: #0000ff">&quot;library://ns.adobe.com/flex/mx&quot;</span>
			   <span style="color: #ff0000">minWidth</span>=<span style="color: #0000ff">&quot;955&quot;</span> <span style="color: #ff0000">minHeight</span>=<span style="color: #0000ff">&quot;600&quot;</span><span style="color: #0000ff">&gt;</span>
	<span style="color: #0000ff">&lt;</span><span style="color: #c71585">fx</span>:<span style="color: #800000">Declarations</span><span style="color: #0000ff">&gt;</span>
		<span style="color: #008000">&lt;!-- 将非可视元素（例如服务、值对象）放在此处 --&gt;</span>
	<span style="color: #0000ff">&lt;/</span><span style="color: #c71585">fx</span>:<span style="color: #800000">Declarations</span><span style="color: #0000ff">&gt;</span>

	<span style="color: #0000ff">&lt;</span><span style="color: #c71585">fx</span>:<span style="color: #800000">Script</span><span style="color: #0000ff">&gt;</span>
		<span style="color: #0000ff">&lt;</span>![CDATA[
			import mx.collections.XMLListCollection;
			import mx.controls.dataGridClasses.DataGridListData;

			[Bindable]
			private var myXmlData : XML = <span style="color: #0000ff">&lt;</span><span style="color: #800000">sites</span><span style="color: #0000ff">&gt;</span>
					<span style="color: #0000ff">&lt;</span><span style="color: #800000">site</span> <span style="color: #ff0000">selected</span>=<span style="color: #0000ff">&quot;false&quot;</span> <span style="color: #ff0000">site</span>=<span style="color: #0000ff">&quot;www.adobe.com&quot;</span> <span style="color: #0000ff">/&gt;</span>
					<span style="color: #0000ff">&lt;</span><span style="color: #800000">site</span> <span style="color: #ff0000">selected</span>=<span style="color: #0000ff">&quot;false&quot;</span> <span style="color: #ff0000">site</span>=<span style="color: #0000ff">&quot;bbs.9ria.com&quot;</span> <span style="color: #0000ff">/&gt;</span>
					<span style="color: #0000ff">&lt;</span><span style="color: #800000">site</span> <span style="color: #ff0000">selected</span>=<span style="color: #0000ff">&quot;true&quot;</span> <span style="color: #ff0000">site</span>=<span style="color: #0000ff">&quot;sban.biz&quot;</span> <span style="color: #0000ff">/&gt;</span>
				<span style="color: #0000ff">&lt;/</span><span style="color: #800000">sites</span><span style="color: #0000ff">&gt;</span>;

			public function selectOneItem(row :int, selected :Boolean) :void
			{
				myXmlData.site[row].@selected = selected;
			}

			public function selectAllItems(selected :Boolean) :void
			{
				for each(var site : XML in myXmlData.site)
					site.@selected = selected;
			}
		]]&gt;
	<span style="color: #0000ff">&lt;/</span><span style="color: #c71585">fx</span>:<span style="color: #800000">Script</span><span style="color: #0000ff">&gt;</span>

	<span style="color: #0000ff">&lt;</span><span style="color: #c71585">mx</span>:<span style="color: #800000">DataGrid</span> <span style="color: #ff0000">id</span>=<span style="color: #0000ff">&quot;myDataGrid&quot;</span> <span style="color: #ff0000">sortableColumns</span>=<span style="color: #0000ff">&quot;false&quot;</span> <span style="color: #ff0000">dataProvider</span>=<span style="color: #0000ff">&quot;{ myXmlData.site}&quot;</span><span style="color: #0000ff">&gt;</span>
		<span style="color: #0000ff">&lt;</span><span style="color: #c71585">mx</span>:<span style="color: #800000">columns</span><span style="color: #0000ff">&gt;</span>
			<span style="color: #0000ff">&lt;</span><span style="color: #c71585">mx</span>:<span style="color: #800000">DataGridColumn</span> <span style="color: #ff0000">width</span>=<span style="color: #0000ff">&quot;50&quot;</span> <span style="color: #ff0000">headerText</span>=<span style="color: #0000ff">&quot;&quot;</span> <span style="color: #ff0000">dataField</span>=<span style="color: #0000ff">&quot;@selected&quot;</span>
				   <span style="color: #ff0000">headerRenderer</span>=<span style="color: #0000ff">&quot;sban.flexPuzzles.DataGridItemCheckBoxHeaderRenderer&quot;</span>
				   <span style="color: #ff0000">itemRenderer</span>=<span style="color: #0000ff">&quot;sban.flexPuzzles.DataGridItemCheckBoxRenderer&quot;</span> <span style="color: #0000ff">/&gt;</span>
			<span style="color: #0000ff">&lt;</span><span style="color: #c71585">mx</span>:<span style="color: #800000">DataGridColumn</span> <span style="color: #ff0000">width</span>=<span style="color: #0000ff">&quot;120&quot;</span> <span style="color: #ff0000">headerText</span>=<span style="color: #0000ff">&quot;site&quot;</span> <span style="color: #ff0000">textDecoration</span>=<span style="color: #0000ff">&quot;underline&quot;</span> <span style="color: #ff0000">dataField</span>=<span style="color: #0000ff">&quot;@site&quot;</span> <span style="color: #0000ff">/&gt;</span>
		<span style="color: #0000ff">&lt;/</span><span style="color: #c71585">mx</span>:<span style="color: #800000">columns</span><span style="color: #0000ff">&gt;</span>
	<span style="color: #0000ff">&lt;/</span><span style="color: #c71585">mx</span>:<span style="color: #800000">DataGrid</span><span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;/</span><span style="color: #c71585">s</span>:<span style="color: #800000">Application</span><span style="color: #0000ff">&gt;</span></pre>
<p>DataGridItemCheckBoxHeaderRenderer.mxml:</p>
<pre><span style="color: #0000ff">&lt;?</span>xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;<span style="color: #0000ff">?&gt;</span>
<span style="color: #0000ff">&lt;</span><span style="color: #c71585">s</span>:<span style="color: #800000">MXDataGridItemRenderer</span> <span style="color: #ff0000">xmlns</span>:<span style="color: #ff0000">fx</span>=<span style="color: #0000ff">&quot;http://ns.adobe.com/mxml/2009&quot;</span>
	  <span style="color: #ff0000">xmlns</span>:<span style="color: #ff0000">s</span>=<span style="color: #0000ff">&quot;library://ns.adobe.com/flex/spark&quot;</span>
	  <span style="color: #ff0000">xmlns</span>:<span style="color: #ff0000">mx</span>=<span style="color: #0000ff">&quot;library://ns.adobe.com/flex/mx&quot;</span>
	  <span style="color: #ff0000">focusEnabled</span>=<span style="color: #0000ff">&quot;false&quot;</span><span style="color: #0000ff">&gt;</span>
	<span style="color: #0000ff">&lt;</span><span style="color: #c71585">fx</span>:<span style="color: #800000">Script</span><span style="color: #0000ff">&gt;</span>
		<span style="color: #0000ff">&lt;</span>![CDATA[
			import mx.binding.utils.BindingUtils;
			import mx.controls.dataGridClasses.DataGridColumn;
			import mx.events.FlexEvent;

			protected function checkbox1_changeHandler(event:Event):void
			{
				parentDocument.selectAllItems(event.target.selected);
			}
		]]<span style="color: #0000ff">&gt;</span>
	<span style="color: #0000ff">&lt;/</span><span style="color: #c71585">fx</span>:<span style="color: #800000">Script</span><span style="color: #0000ff">&gt;</span>
	<span style="color: #0000ff">&lt;</span><span style="color: #c71585">s</span>:<span style="color: #800000">CheckBox</span> <span style="color: #ff0000">id</span>=<span style="color: #0000ff">&quot;myChkbox&quot;</span> <span style="color: #ff0000">change</span>=<span style="color: #0000ff">&quot;checkbox1_changeHandler(event)&quot;</span> <span style="color: #0000ff">/&gt;</span>
<span style="color: #0000ff">&lt;/</span><span style="color: #c71585">s</span>:<span style="color: #800000">MXDataGridItemRenderer</span><span style="color: #0000ff">&gt;</span></pre>
</p>
<p>DataGridItemCheckBoxRenderer.mxml:</p>
<pre><span style="color: #0000ff">&lt;?</span>xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;<span style="color: #0000ff">?&gt;</span>
<span style="color: #0000ff">&lt;</span><span style="color: #c71585">s</span>:<span style="color: #800000">MXDataGridItemRenderer</span> <span style="color: #ff0000">xmlns</span>:<span style="color: #ff0000">fx</span>=<span style="color: #0000ff">&quot;http://ns.adobe.com/mxml/2009&quot;</span>
		  <span style="color: #ff0000">xmlns</span>:<span style="color: #ff0000">s</span>=<span style="color: #0000ff">&quot;library://ns.adobe.com/flex/spark&quot;</span>
		  <span style="color: #ff0000">xmlns</span>:<span style="color: #ff0000">mx</span>=<span style="color: #0000ff">&quot;library://ns.adobe.com/flex/mx&quot;</span>
		  <span style="color: #ff0000">focusEnabled</span>=<span style="color: #0000ff">&quot;false&quot;</span><span style="color: #0000ff">&gt;</span>

	<span style="color: #0000ff">&lt;</span><span style="color: #c71585">fx</span>:<span style="color: #800000">Script</span><span style="color: #0000ff">&gt;</span>
		<span style="color: #0000ff">&lt;</span>![CDATA[
			import mx.binding.utils.BindingUtils;
			import mx.controls.dataGridClasses.DataGridColumn;
			import mx.events.FlexEvent;

			protected function checkbox1_changeHandler(event:Event):void
			{
				parentDocument.selectOneItem(dataGridListData.rowIndex, event.target.selected);
			}

		]]<span style="color: #0000ff">&gt;</span>
	<span style="color: #0000ff">&lt;/</span><span style="color: #c71585">fx</span>:<span style="color: #800000">Script</span><span style="color: #0000ff">&gt;</span>
	<span style="color: #0000ff">&lt;</span><span style="color: #c71585">s</span>:<span style="color: #800000">CheckBox</span> <span style="color: #ff0000">id</span>=<span style="color: #0000ff">&quot;myChkbox&quot;</span> <span style="color: #ff0000">selected</span>=<span style="color: #0000ff">&quot;{dataGridListData.label == 'true'}&quot;</span>
				<span style="color: #ff0000">change</span>=<span style="color: #0000ff">&quot;checkbox1_changeHandler(event)&quot;</span><span style="color: #0000ff">/&gt;</span>
<span style="color: #0000ff">&lt;/</span><span style="color: #c71585">s</span>:<span style="color: #800000">MXDataGridItemRenderer</span><span style="color: #0000ff">&gt;</span></pre>
<p><a href="http://sban.biz/">sban</a> 2010/6/30 转载请注明作者及出处 非商业。</p>
]]></content:encoded>
			<wfw:commentRss>http://sban.biz/333/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->