<?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>cap&#039;n webb &#187; RIA</title>
	<atom:link href="http://blog.dataich.com/tag/ria/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dataich.com</link>
	<description>almost all things about it</description>
	<lastBuildDate>Thu, 12 Jan 2012 03:38:00 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>ただTitaniumチュートリアルをやってみただけだがエラーが出たので、ここに書いた</title>
		<link>http://blog.dataich.com/2008/12/12/%e3%81%9f%e3%81%a0titanium%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab%e3%82%92%e3%82%84%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%9f%e3%81%a0%e3%81%91%e3%81%a0%e3%81%8c%e3%82%a8%e3%83%a9/</link>
		<comments>http://blog.dataich.com/2008/12/12/%e3%81%9f%e3%81%a0titanium%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab%e3%82%92%e3%82%84%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%9f%e3%81%a0%e3%81%91%e3%81%a0%e3%81%8c%e3%82%a8%e3%83%a9/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 19:05:13 +0000</pubDate>
		<dc:creator>dataich</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[RIA]]></category>
		<category><![CDATA[Titanium]]></category>

		<guid isPermaLink="false">http://dataich.s15.coreserver.jp/blog/2008/12/12/%e3%81%9f%e3%81%a0titanium%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab%e3%82%92%e3%82%84%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%9f%e3%81%a0%e3%81%91%e3%81%a0%e3%81%8c%e3%82%a8%e3%83%a9/</guid>
		<description><![CDATA[開発環境 Appcelerator SDKとTitanium SDKをインストール Appcelerator Product Downloads Appcelerator Titanium SDK Downloads チ [...]]]></description>
			<content:encoded><![CDATA[<h2>開発環境</h2>
<p>Appcelerator SDKとTitanium SDKをインストール<br />
<a class="wpGallery" href="http://appcelerator.org/download" target="_blank" onclick="pageTracker._trackPageview('/outgoing/appcelerator.org/download?referer=');">Appcelerator Product Downloads</a><br />
<a class="wpGallery" href="http://titaniumapp.com/download" target="_blank" onclick="pageTracker._trackPageview('/outgoing/titaniumapp.com/download?referer=');">Appcelerator Titanium SDK Downloads</a></p>
<h2>チュートリアってみる。</h2>
<p><a class="wpGallery" href="http://titaniumapp.com/documentation/starting-your-first-titanium-project" target="_blank" onclick="pageTracker._trackPageview('/outgoing/titaniumapp.com/documentation/starting-your-first-titanium-project?referer=');">Starting your first Titanium project</a><br />
上記を参考に進めてみた。</p>
<h4>プロジェクト生成</h4>
<p>Terminalから</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ app create:project . myproject titanium</pre></div></div>

<p>下記のように出力されればプロジェクト生成成功。</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Using service titanium
Connecting to update server ...
Fetching release info from distribution server...
Your project was created <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>yourname<span style="color: #000000; font-weight: bold;">/</span>myproject
Appcelerator titanium project created ... Code strong<span style="color: #000000; font-weight: bold;">!</span></pre></div></div>

<p>ちなみにSDKのインストールに失敗したのか、最初はうまくいかなかった。<br />
再インストールしたらうまくいった。</p>
<h4>プロジェクト（アプリケーション）のパッケージング</h4>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">cd</span> myproject
$ app package:project osx <span style="color: #666666; font-style: italic;">#Windows向けの場合はwin32</span>
Create directory <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>yoshida<span style="color: #000000; font-weight: bold;">/</span>Work<span style="color: #000000; font-weight: bold;">/</span>temp<span style="color: #000000; font-weight: bold;">/</span>myproject<span style="color: #000000; font-weight: bold;">/</span>stage<span style="color: #7a0874; font-weight: bold;">&#93;</span>? <span style="color: #7a0874; font-weight: bold;">&#40;</span>Y<span style="color: #7a0874; font-weight: bold;">&#41;</span>es,<span style="color: #7a0874; font-weight: bold;">&#40;</span>N<span style="color: #7a0874; font-weight: bold;">&#41;</span>o,<span style="color: #7a0874; font-weight: bold;">&#40;</span>A<span style="color: #7a0874; font-weight: bold;">&#41;</span>ll <span style="color: #7a0874; font-weight: bold;">&#91;</span>Y<span style="color: #7a0874; font-weight: bold;">&#93;</span> Y
Connecting to update server ...
Fetching release info from distribution server...
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> titanium:osx:         <span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000; font-weight: bold;">|</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> titanium:osx:         <span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000; font-weight: bold;">|</span>
...
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> titanium:osx:       <span style="color: #000000;">100</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000; font-weight: bold;">|</span>ooooooooooooooooooooooooooooooooooooooooooooooooooooo<span style="color: #000000; font-weight: bold;">|</span>   5.4MB 302.5KB<span style="color: #000000; font-weight: bold;">/</span>s ETA:  00:00:00
&nbsp;
Installed titanium:osx <span style="color: #000000;">0.1</span>
Packaging Titanium <span style="color: #000000; font-weight: bold;">for</span> target os: osx
Validating tiapp.xml ...
Looks good ... Let<span style="color: #ff0000;">'s packager up!
Your Titanium application is located in /Users/yoshida/Work/temp/myproject/stage</span></pre></div></div>

<p>これで/Users/yoshida/Work/temp/myproject/stageにmyproject.appとしてパッケージングされる。<br />
myproject.appを起動した。</p>
<p>なんかエラーが出るが、<br />
<a href="http://blog.dataich.com/wp-content/uploads/titanium_error.jpg" rel="lightbox[30]"><img class="alignnone size-full wp-image-169" title="titanium_error" src="http://blog.dataich.com/wp-content/uploads/titanium_error.jpg" alt="titanium_error" width="400" height="203" /></a><br />
無視してクリックするとウィンドウが表示された。<br />
<a href="http://blog.dataich.com/wp-content/uploads/titanium_sample.jpg" rel="lightbox[30]"><img class="alignnone size-full wp-image-170" title="titanium_sample" src="http://blog.dataich.com/wp-content/uploads/titanium_sample.jpg" alt="titanium_sample" width="400" height="270" /></a><br />
Javascript APIを使ったサンプルがコード付きで試せるので、いろいろと見てみよう。<br />
但し、上記エラーのせいか、ボタンクリック系のサンプルが動かない、、、</p>
<div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://blog.dataich.com/2008/12/12/%e3%81%9f%e3%81%a0titanium%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab%e3%82%92%e3%82%84%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%9f%e3%81%a0%e3%81%91%e3%81%a0%e3%81%8c%e3%82%a8%e3%83%a9/&via=dataich&text=ただTitaniumチュートリアルをやってみただけだがエラーが出たので、ここに書いた&related=:&lang=en&count=vertical" class="twitter-share-button" onclick="pageTracker._trackPageview('/outgoing/twitter.com/share?url=http_//blog.dataich.com/2008/12/12/_e3_81_9f_e3_81_a0titanium_e3_83_81_e3_83_a5_e3_83_bc_e3_83_88_e3_83_aa_e3_82_a2_e3_83_ab_e3_82_92_e3_82_84_e3_81_a3_e3_81_a6_e3_81_bf_e3_81_9f_e3_81_a0_e3_81_91_e3_81_a0_e3_81_8c_e3_82_a8_e3_83_a9/_via=dataich_text=_Titanium_related=_lang=en_count=vertical&amp;referer=');">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>]]></content:encoded>
			<wfw:commentRss>http://blog.dataich.com/2008/12/12/%e3%81%9f%e3%81%a0titanium%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab%e3%82%92%e3%82%84%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%9f%e3%81%a0%e3%81%91%e3%81%a0%e3%81%8c%e3%82%a8%e3%83%a9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe Airでtwitterタイムラインを取得してみよう。</title>
		<link>http://blog.dataich.com/2008/07/01/adobe-air%e3%81%a7twitter%e3%82%bf%e3%82%a4%e3%83%a0%e3%83%a9%e3%82%a4%e3%83%b3%e3%82%92%e5%8f%96%e5%be%97%e3%81%97%e3%81%a6%e3%81%bf%e3%82%88%e3%81%86%e3%80%82/</link>
		<comments>http://blog.dataich.com/2008/07/01/adobe-air%e3%81%a7twitter%e3%82%bf%e3%82%a4%e3%83%a0%e3%83%a9%e3%82%a4%e3%83%b3%e3%82%92%e5%8f%96%e5%be%97%e3%81%97%e3%81%a6%e3%81%bf%e3%82%88%e3%81%86%e3%80%82/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 00:56:50 +0000</pubDate>
		<dc:creator>dataich</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Air]]></category>
		<category><![CDATA[RIA]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://dataich.s15.coreserver.jp/blog/2008/07/01/adobe-air%e3%81%a7twitter%e3%82%bf%e3%82%a4%e3%83%a0%e3%83%a9%e3%82%a4%e3%83%b3%e3%82%92%e5%8f%96%e5%be%97%e3%81%97%e3%81%a6%e3%81%bf%e3%82%88%e3%81%86%e3%80%82/</guid>
		<description><![CDATA[前提条件 Adobe Flex Builder3がインストール済みであること。（Eclipseプラグインでも可） ※ダウンロード、インストール方法については、下記Adobeサイトを参照してください。 Adobe &#82 [...]]]></description>
			<content:encoded><![CDATA[<div class="section">
<h4>前提条件</h4>
<p>Adobe Flex Builder3がインストール済みであること。（Eclipseプラグインでも可）</p>
<p>※ダウンロード、インストール方法については、下記Adobeサイトを参照してください。</p>
<p><a href="http://www.adobe.com/jp/products/flex/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.adobe.com/jp/products/flex/?referer=');">Adobe &#8211; Flex 3</a></p>
<h4>Flex Builder（または、Eclipse）上でのプロジェクト作成</h4>
<p>1.File &gt; New &gt; Flex Project（見つからない場合は、Otherより探してください。）を選択。</p>
<p>2.プロジェクト名を&#8217;twitter&#8217;（任意）とし、アプリケーションの種類を&#8217;デスクトップアプリケーション（Adobe Air&#8230;）&#8217;としてFinishを選択。これで下記構成プロジェクトが作成されます。</p>
<blockquote>
<ul>
<li>twitter
<ul>
<li>bin-debug</li>
<li>libs</li>
<li>src
<ul>
<li>twitter.mxml</li>
<li>twitter-app.xml</li>
</ul>
</li>
</ul>
</li>
</ul>
</blockquote>
<h4>ひとまず、Airアプリケーションを実行してみましょう。</h4>
<ol>
<li>プロジェクト&#8217;twitter&#8217;を右クリック &gt; Run As &gt; Adobe Air アプリケーションを選択。</li>
<li>別画面でAirアプリケーションが起動するはずです。もちろんまだ何もコーディングしていませんので、何も無いウィンドウが表示されるだけです。</li>
</ol>
<h4>twitterのタイムラインを表示するための画面コンポーネントの作成</h4>
<p>twitterのタイムラインを表示するためのコンポーネントとして、ここではmx:DataGridコンポーネントを使用します。</p>
<ol>
<li>twitter.mxmlをダブルクリックし、エディターに表示させ、デザインタブをクリック。</li>
<li>コンポーネントビューのコントロール/DataGridコンポーネントをデザインエディタにドラッグ。</li>
<li>Airアプリケーションを実行して、確認してください。何もなかったウィンドウにDataGridが表示されてます。</li>
</ol>
<h4>twitter apiを使用してタイムラインを取得する。</h4>
<p>1.まずは、twitterのAPIと通信を行うための、mx:HTTPServiceを作成します。</p>
<p>twitter.mxmlをダブルクリックし、エディターに表示させ、ソースタブをクリック。mx:WindowedApplicationタグ内に、下記を追加します。</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:HTTPService</span></span>
<span style="color: #009900;">  <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;twitter_timeline&quot;</span></span>
<span style="color: #009900;">  <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;http://twitter.com/statuses/public_timeline.xml&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></td></tr></table></div>

<p>2.アプリケーション開始時に、このHTTPServiceで通信するよう、mx:WindowedApplicationのcreationCompleteイベント属性に、&#8217;twitter_timeline.send()&#8217;と記述します。</p>
<p>3.ここまでで、下記のようになるかと思います。</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td 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: #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;">creationComplete</span>=<span style="color: #ff0000;">&quot;twitter_timeline.send()&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:HTTPService</span></span>
<span style="color: #009900;">    <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;twitter_timeline&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;http://twitter.com/statuses/public_timeline.xml&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
      ...省略
&nbsp;
<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></td></tr></table></div>

<p>4.次に、取得したタイムラインを最初に作成したDataGridに表示させます。</p>
<p>twitterのタイムラインAPIからは、XMLが取得できます。どういうXMLが取得できるかは、<a href="http://twitter.com/statuses/public_timeline.xml" target="_blank" onclick="pageTracker._trackPageview('/outgoing/twitter.com/statuses/public_timeline.xml?referer=');">http://twitter.com/statuses/public_timeline.xml</a>にブラウザでアクセスして確認してみてください。</p>
<p>取得したXMLをDataGridに表示させるには、dataProviderを使用します。ここにはXMLオブジェクト等を指定することができます。具体的にはdataProvider=&#8221;{twitter_timeline.lastResult.statuses.status}&#8221;とします。これは、HTTPServiceであるtwitter_timeline(ID)のlastResultファンクション（取得した内容（オブジェクト、ここではXMLオブジェクト）を返す）のstatusesタグの、statusタグを指定していることになります。</p>
<p>そして、DataGridのカラムであるmx:DataGridColumnのdataField属性に、&#8221;text&#8221;と記述します。これはstatusタグのtextタグの内容をセットしています。後はこれがstatusタグの回数分、自動的に出力されます。Airアプリケーションを実行して確認してみてください。</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:DataGrid</span> <span style="color: #000066;">x</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">y</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">dataProvider</span>=<span style="color: #ff0000;">&quot;{twitter_timeline.lastResult.statuses.status}&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;100%&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:columns<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:DataGridColumn</span> <span style="color: #000066;">headerText</span>=<span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">dataField</span>=<span style="color: #ff0000;">&quot;text&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:columns<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:DataGrid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>5.次に、screen_nameを取得します。</p>
<p>screen_nameはstatusタグのuserタグの中にあります。通常、DataGridタグ内では、{data}として、dataProviderのデータを取得できます。但し、dataField属性には、使用できません。そこでmx:itemRendererを使用します。これでDaraGridColumn内のレンダリングコンポーネントを差し替えることができます。下記のようにして、mx:labelコンポーネントに差し替えてtext属性に{data.user.screen_name}をセットしています。</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:DataGridColumn</span> <span style="color: #000066;">headerText</span>=<span style="color: #ff0000;">&quot;name&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:itemRenderer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Component<span style="color: #000000; font-weight: bold;">&gt;</span></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;{data.user.screen_name}&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:Component<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:itemRenderer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:DataGridColumn<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>6.次に、ユーザの画像を表示してみます。</p>
<p>DataGridColumnに画像を表示するには、itemRendererにmx.controls.Imageを指定します。これにより、このmx.controls.Imageのsource属性にURLをセットすることで画像として表示されます。ここまで全て合わせると下記のようになります。</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
</pre></td><td 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: #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;">creationComplete</span>=<span style="color: #ff0000;">&quot;twitter_timeline.send()&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:HTTPService</span></span>
<span style="color: #009900;">    <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;twitter_timeline&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;http://twitter.com/statuses/public_timeline.xml&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:DataGrid</span> <span style="color: #000066;">x</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">y</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">dataProvider</span>=<span style="color: #ff0000;">&quot;{twitter_timeline.lastResult.statuses.status}&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;100%&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:columns<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:DataGridColumn</span> <span style="color: #000066;">headerText</span>=<span style="color: #ff0000;">&quot;&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:itemRenderer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Component<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Image</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;{data.user.profile_image_url}&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:Component<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:itemRenderer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:DataGridColumn<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:DataGridColumn</span> <span style="color: #000066;">headerText</span>=<span style="color: #ff0000;">&quot;name&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:itemRenderer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Component<span style="color: #000000; font-weight: bold;">&gt;</span></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;{data.user.screen_name}&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:Component<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:itemRenderer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:DataGridColumn<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:DataGridColumn</span> <span style="color: #000066;">headerText</span>=<span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">dataField</span>=<span style="color: #ff0000;">&quot;text&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:columns<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:DataGrid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<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></td></tr></table></div>

<p>これでAirアプリケーションを実行してみてください。タイムラインが表示されます。</p></div>
<div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://blog.dataich.com/2008/07/01/adobe-air%e3%81%a7twitter%e3%82%bf%e3%82%a4%e3%83%a0%e3%83%a9%e3%82%a4%e3%83%b3%e3%82%92%e5%8f%96%e5%be%97%e3%81%97%e3%81%a6%e3%81%bf%e3%82%88%e3%81%86%e3%80%82/&via=dataich&text=Adobe Airでtwitterタイムラインを取得してみよう。&related=:&lang=en&count=vertical" class="twitter-share-button" onclick="pageTracker._trackPageview('/outgoing/twitter.com/share?url=http_//blog.dataich.com/2008/07/01/adobe-air_e3_81_a7twitter_e3_82_bf_e3_82_a4_e3_83_a0_e3_83_a9_e3_82_a4_e3_83_b3_e3_82_92_e5_8f_96_e5_be_97_e3_81_97_e3_81_a6_e3_81_bf_e3_82_88_e3_81_86_e3_80_82/_via=dataich_text=Adobe_Air_twitter_related=_lang=en_count=vertical&amp;referer=');">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>]]></content:encoded>
			<wfw:commentRss>http://blog.dataich.com/2008/07/01/adobe-air%e3%81%a7twitter%e3%82%bf%e3%82%a4%e3%83%a0%e3%83%a9%e3%82%a4%e3%83%b3%e3%82%92%e5%8f%96%e5%be%97%e3%81%97%e3%81%a6%e3%81%bf%e3%82%88%e3%81%86%e3%80%82/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

