<?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>Stefan Horochovec &#187; Flex</title>
	<atom:link href="http://www.horochovec.com.br/blog/tag/flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.horochovec.com.br/blog</link>
	<description>Blog sobre plataforma Flash - Flex e AIR - e sua integração com Java</description>
	<lastBuildDate>Mon, 12 Jul 2010 02:01:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Tecsul Pato Branco &#8211; 2009</title>
		<link>http://www.horochovec.com.br/blog/2009/10/07/tecsul-pato-branco-2009/</link>
		<comments>http://www.horochovec.com.br/blog/2009/10/07/tecsul-pato-branco-2009/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 00:20:16 +0000</pubDate>
		<dc:creator>Stefan Horochovec</dc:creator>
				<category><![CDATA[Sem categoria]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Tecsul]]></category>

		<guid isPermaLink="false">http://www.horochovec.com.br/blog/?p=190</guid>
		<description><![CDATA[Durante os dias 14, 15 e 16 acontecerá em Pato Branco, PR o evento Tecsul. O Tecsul é uma união de dois eventos, o Aftertaste e o Sematis. Serão três dias de palestras e minicursos com diversos palestrantes e instrutores. O AUG FlexDuck estará presente no dia 14 com um minicurso sobre Flex. Convido todos [...]]]></description>
			<content:encoded><![CDATA[<p>Durante os dias 14, 15 e 16 acontecerá em Pato Branco, PR o evento Tecsul. O Tecsul é uma união de dois eventos, o Aftertaste e o Sematis.</p>
<p>Serão três dias de palestras e minicursos com diversos palestrantes e instrutores.</p>
<p>O <a href="http://www.flexduck.org/" target="_new">AUG FlexDuck</a> estará presente no dia 14 com um minicurso sobre Flex.</p>
<p>Convido todos a estarem participando do evento. Mais informações, clique <a href="http://www.tecsul.org.br" target="_new">aqui</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.horochovec.com.br/blog/2009/10/07/tecsul-pato-branco-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Curso de Adobe Flex em Dois Vizinhos</title>
		<link>http://www.horochovec.com.br/blog/2009/09/18/curso-de-adobe-flex-em-dois-vizinhos/</link>
		<comments>http://www.horochovec.com.br/blog/2009/09/18/curso-de-adobe-flex-em-dois-vizinhos/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 04:20:21 +0000</pubDate>
		<dc:creator>Stefan Horochovec</dc:creator>
				<category><![CDATA[FlexDuck]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Cursos]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.horochovec.com.br/blog/?p=188</guid>
		<description><![CDATA[Ola Em mais uma parceria com o NTI Paraná e Sudotec, estaremos realizando um curso de 24 horas de Adobe Flex em Dois Vizinhos/PR. O curso tem duração de 24 horas. As aulas serão na Sudotec. O curso é para iniciantes e a linguagem que utilizaremos como back-end será o Java. Para mais informações, acesse [...]]]></description>
			<content:encoded><![CDATA[<p>Ola</p>
<p>Em mais uma parceria com o NTI Paraná e Sudotec, estaremos realizando um curso de 24 horas de Adobe Flex em Dois Vizinhos/PR.</p>
<p>O curso tem duração de 24 horas. As aulas serão na Sudotec. O curso é para iniciantes e a linguagem que utilizaremos como back-end será o Java.</p>
<p>Para mais informações, acesse o site do NTI Parana, clicando <a href="http://www.ntipr.org.br/" target="_new">aqui</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.horochovec.com.br/blog/2009/09/18/curso-de-adobe-flex-em-dois-vizinhos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>AIR &#8211; Criando uma aplicação com atualização automática &#8211; Parte III</title>
		<link>http://www.horochovec.com.br/blog/2009/08/14/air-criando-uma-aplicacao-com-atualizacao-automatica-parte-iii/</link>
		<comments>http://www.horochovec.com.br/blog/2009/08/14/air-criando-uma-aplicacao-com-atualizacao-automatica-parte-iii/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 05:36:52 +0000</pubDate>
		<dc:creator>Stefan Horochovec</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Auto-Update]]></category>

		<guid isPermaLink="false">http://www.horochovec.com.br/blog/?p=168</guid>
		<description><![CDATA[Na última parte do artigo, a última configuração que deve ser feita dentro do projeto, é que dentro da pasta src, você deve criar um arquivo chamado update-config.xml. Esse arquivo irá conter as informações de como o processo de atualização deve se comportar. ?Download update-config.xml1 2 3 4 5 6 7 8 9 10 11 [...]]]></description>
			<content:encoded><![CDATA[<p>Na última parte do artigo, a última configuração que deve ser feita dentro do projeto, é que dentro da pasta <em>src</em>, você deve criar um arquivo chamado <em>update-config.xml.</em> Esse arquivo irá conter as informações de  como o processo de atualização deve se comportar.</p>
<p><span id="more-168"></span></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://www.horochovec.com.br/blog/wp-content/plugins/wp-codebox/wp-codebox.php?p=168&amp;download=update-config.xml">update-config.xml</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p1685"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code" id="p168code5"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">&lt;</span>configuration xmlns=<span style="color: #990000;">&quot;http://ns.adobe.com/air/framework/update/configuration/1.0&quot;</span><span style="color: #000066; font-weight: bold;">&gt;</span>
	<span style="color: #000066; font-weight: bold;">&lt;</span>url<span style="color: #000066; font-weight: bold;">&gt;</span>http<span style="color: #000066; font-weight: bold;">:</span><span style="color: #009900; font-style: italic;">//www.seusite.com.br/air/update-config.xml&lt;/url&gt;</span>
	<span style="color: #000066; font-weight: bold;">&lt;</span>delay<span style="color: #000066; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">&lt;/</span>delay<span style="color: #000066; font-weight: bold;">&gt;</span>
	<span style="color: #000066; font-weight: bold;">&lt;</span>defaultUI<span style="color: #000066; font-weight: bold;">&gt;</span>
		<span style="color: #000066; font-weight: bold;">&lt;</span>dialog <span style="color: #004993;">name</span>=<span style="color: #990000;">&quot;checkForUpdate&quot;</span> <span style="color: #004993;">visible</span>=<span style="color: #990000;">&quot;true&quot;</span> <span style="color: #000066; font-weight: bold;">/&gt;</span>
		<span style="color: #000066; font-weight: bold;">&lt;</span>dialog <span style="color: #004993;">name</span>=<span style="color: #990000;">&quot;downloadUpdate&quot;</span> <span style="color: #004993;">visible</span>=<span style="color: #990000;">&quot;true&quot;</span> <span style="color: #000066; font-weight: bold;">/&gt;</span>
		<span style="color: #000066; font-weight: bold;">&lt;</span>dialog <span style="color: #004993;">name</span>=<span style="color: #990000;">&quot;downloadProgress&quot;</span> <span style="color: #004993;">visible</span>=<span style="color: #990000;">&quot;true&quot;</span> <span style="color: #000066; font-weight: bold;">/&gt;</span>
		<span style="color: #000066; font-weight: bold;">&lt;</span>dialog <span style="color: #004993;">name</span>=<span style="color: #990000;">&quot;installUpdate&quot;</span> <span style="color: #004993;">visible</span>=<span style="color: #990000;">&quot;true&quot;</span> <span style="color: #000066; font-weight: bold;">/&gt;</span>
		<span style="color: #000066; font-weight: bold;">&lt;</span>dialog <span style="color: #004993;">name</span>=<span style="color: #990000;">&quot;fileUpdate&quot;</span> <span style="color: #004993;">visible</span>=<span style="color: #990000;">&quot;true&quot;</span> <span style="color: #000066; font-weight: bold;">/&gt;</span>
		<span style="color: #000066; font-weight: bold;">&lt;</span>dialog <span style="color: #004993;">name</span>=<span style="color: #990000;">&quot;unexpectedError&quot;</span> <span style="color: #004993;">visible</span>=<span style="color: #990000;">&quot;true&quot;</span> <span style="color: #000066; font-weight: bold;">/&gt;</span>
	<span style="color: #000066; font-weight: bold;">&lt;/</span>defaultUI<span style="color: #000066; font-weight: bold;">&gt;</span>
<span style="color: #000066; font-weight: bold;">&lt;/</span>configuration<span style="color: #000066; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<p>Todas as opções foram marcadas como true, para que você possa acompanhar todas as etapas do processo.</p>
<p>A partir deste momento, o trabalho fica todo por conta do Flex. Não há mais necessidade de você se preocupar com nada. Ele será responsável por fazer a verificação, sugerir ou não o download, e caso o usuário opte por baixar a aplicação, ainda irá sou salva-lá em seu HD, ou atualizar automaticamente a aplicação. Fácil não é?</p>
<p>Mas como ele sabe que existe uma nova versão para ser baixada?</p>
<p>Através de um arquivo XML que deverá ser publicado no servidor na mesma URL foi informada na propriedade URL do objeto <em>autoUpdater</em>.</p>
<p>Vamos dar uma conferida em como deve ser esse XML para que o autoUpdater possa fazer as verificações necessárias.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://www.horochovec.com.br/blog/wp-content/plugins/wp-codebox/wp-codebox.php?p=168&amp;download=update-config.xml">update-config.xml</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p1686"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code" id="p168code6"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">&lt;?</span>xml <span style="color: #004993;">version</span>=<span style="color: #990000;">&quot;1.0&quot;</span> encoding=<span style="color: #990000;">&quot;utf-8&quot;</span><span style="color: #000066; font-weight: bold;">?&gt;</span>  
<span style="color: #000066; font-weight: bold;">&lt;</span>update xmlns=<span style="color: #990000;">&quot;http://ns.adobe.com/air/framework/update/description/1.0&quot;</span><span style="color: #000066; font-weight: bold;">&gt;</span>  
	<span style="color: #000066; font-weight: bold;">&lt;</span>version<span style="color: #000066; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight:bold;">1.1</span><span style="color: #000066; font-weight: bold;">&lt;/</span>version<span style="color: #000066; font-weight: bold;">&gt;</span>  
	<span style="color: #000066; font-weight: bold;">&lt;</span>url<span style="color: #000066; font-weight: bold;">&gt;</span>http<span style="color: #000066; font-weight: bold;">:</span><span style="color: #009900; font-style: italic;">//www.seusite.com.br/air/AIRAutoUpdate1-1.air&lt;/url&gt;  </span>
	<span style="color: #000066; font-weight: bold;">&lt;</span>description<span style="color: #000066; font-weight: bold;">&gt;&lt;!</span><span style="color: #000000;">&#91;</span>CDATA<span style="color: #000000;">&#91;</span>   
	v1<span style="color: #000066; font-weight: bold;">.</span>1
	<span style="color: #000066; font-weight: bold;">*</span> Adicionado novos feeds para leitura
	<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">&gt;&lt;/</span>description<span style="color: #000066; font-weight: bold;">&gt;</span>  
<span style="color: #000066; font-weight: bold;">&lt;/</span>update<span style="color: #000066; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<p>Simples não é? Poucas informações são necessárias para que a atualização ocorra. Você deve informar apenas a versão da aplicação que deverá ser atualizada. Ou seja, minha primeira compilação da primeira versão do projeto era 1.0, a próxima versão, ela foi compilada como 1.1, então é essa versão que eu devo passar para o update-config.xml.</p>
<p>Depois, devo informar a URL que está o arquivo que deverá ser feito o download para  a atualização. E por ultimo, posso descrever quais foram as alterações na versão que geraram a nova atualização.</p>
<p>Dessa forma, quando iniciarmos a aplicação, o aplicativo irá ler esse XML, verificará que existe uma nova versão disponível, e irá inicializar o processo de atualização.</p>
<p>De uma forma simples assim, você não precisará mais se preocupar com atualizadores ou em informar seu cliente que existe uma nova versão para o sistema. Deixe o AIR trabalhar um pouco por você!</p>
<p>Com os códigos informados acima, temos a primeira versão do sistema completa, exceto o XML de atualização, que só deve ser publicado quando houver uma nova versão. Abaixo, seguem os fontes para a versão 1.1 do projeto. Esses sem comentários adicionais, já que o intuito do artigo era apenas explicar como é feita a atualização de forma automática em aplicações em AIR.</p>
<p><strong>AIRAutoUpdate-app.xml</strong></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://www.horochovec.com.br/blog/wp-content/plugins/wp-codebox/wp-codebox.php?p=168&amp;download=AIRAutoUpdate-app.xml">AIRAutoUpdate-app.xml</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p1687"><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
</pre></td><td class="code" id="p168code7"><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;application</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://ns.adobe.com/air/application/1.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;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>AIRAutoUpdate<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>1.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>AIRAutoUpdate<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;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>AIRAutoUpdate - Tutorial IMasters<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;installFolder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Horochovec/AIR/AIRAutoUpdate<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/installFolder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;programMenuFolder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Horochovec/AIR/AIRAutoUpdate<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/programMenuFolder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Exemplo de app que faz sua atualização automática<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;copyright<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Stefan Horochovec (stefan@horochovec.com.br)<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/copyright<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;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>AIRAutoUpdate<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<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>AIRAutoUpdate.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;systemChrome<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>none<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>true<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;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;minimizable<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/minimizable<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;maximizable<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/maximizable<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;resizable<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/resizable<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></td></tr></table></div>

<p><strong>Posts.mxml</strong></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://www.horochovec.com.br/blog/wp-content/plugins/wp-codebox/wp-codebox.php?p=168&amp;download=AIRAutoUpdate-app.xml">AIRAutoUpdate-app.xml</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p1688"><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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
</pre></td><td class="code" id="p168code8"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">&lt;?</span>xml <span style="color: #004993;">version</span>=<span style="color: #990000;">&quot;1.0&quot;</span> encoding=<span style="color: #990000;">&quot;utf-8&quot;</span><span style="color: #000066; font-weight: bold;">?&gt;</span>
<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>TitleWindow 
	xmlns<span style="color: #000066; font-weight: bold;">:</span>mx=<span style="color: #990000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> 
	layout=<span style="color: #990000;">&quot;absolute&quot;</span> 
	<span style="color: #004993;">width</span>=<span style="color: #990000;">&quot;500&quot;</span> 
	<span style="color: #004993;">height</span>=<span style="color: #990000;">&quot;250&quot;</span> 
	showCloseButton=<span style="color: #990000;">&quot;true&quot;</span> 
	creationComplete=<span style="color: #990000;">&quot;creationCompleteHandler(event);&quot;</span>
	<span style="color: #004993;">close</span>=<span style="color: #990000;">&quot;onCloseHandler(event);&quot;</span> 
	title=<span style="color: #990000;">&quot;Feeds Imasters - Seção Flex&quot;</span><span style="color: #000066; font-weight: bold;">&gt;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>Script<span style="color: #000066; font-weight: bold;">&gt;</span>
		<span style="color: #000066; font-weight: bold;">&lt;!</span><span style="color: #000000;">&#91;</span>CDATA<span style="color: #000000;">&#91;</span>
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">import</span> flash<span style="color: #000066; font-weight: bold;">.</span>desktop<span style="color: #000066; font-weight: bold;">.</span>NativeApplication<span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>events<span style="color: #000066; font-weight: bold;">.</span>CloseEvent<span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>events<span style="color: #000066; font-weight: bold;">.</span>FlexEvent<span style="color: #000066; font-weight: bold;">;</span>			
			<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>rpc<span style="color: #000066; font-weight: bold;">.</span>events<span style="color: #000066; font-weight: bold;">.</span>ResultEvent<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #3f5fbf;">/**
			 * Dataprovider do grid
			 */</span>			
			<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> xmlList <span style="color: #000066; font-weight: bold;">:</span> <a href="http://www.google.com/search?q=xmllist%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:xmllist.html"><span style="color: #004993;">XMLList</span></a><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
    		<span style="color: #3f5fbf;">/**
    		 * Evento disparado na finalização da construção do componente
    		 * Responsavel por iniciar o HTTPService para leitura do feed
    		 */</span>
			<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> creationCompleteHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span>FlexEvent<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span>
			<span style="color: #000000;">&#123;</span>
				<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>service<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">send</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
&nbsp;
			<span style="color: #3f5fbf;">/**
			 * Evento disparado no termino com sucesso da leitura do HTTPService
			 * Responsavel por adicionar ao grid o dataProvider
			 */</span>
			<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> serviceHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span>ResultEvent<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span>
			<span style="color: #000000;">&#123;</span>
				<span style="color: #6699cc; font-weight: bold;">var</span> result <span style="color: #000066; font-weight: bold;">:</span> <a href="http://www.google.com/search?q=xml%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:xml.html"><span style="color: #004993;">XML</span></a> = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=xml%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:xml.html"><span style="color: #004993;">XML</span></a><span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">.</span>result<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				xmlList	= result<span style="color: #000066; font-weight: bold;">..</span>item<span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>grid<span style="color: #000066; font-weight: bold;">.</span>dataProvider	= xmlList<span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
&nbsp;
    		<span style="color: #3f5fbf;">/**
    		 * Evento disparado no fechar da TitleWindow, ele é responsável por fechar a aplicação
    		 */</span>			
			<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onCloseHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span>CloseEvent<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span> 
			<span style="color: #000000;">&#123;</span>
				NativeApplication<span style="color: #000066; font-weight: bold;">.</span>nativeApplication<span style="color: #000066; font-weight: bold;">.</span>exit<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
&nbsp;
			<span style="color: #3f5fbf;">/**
			 * Quando ocorrer um click no grid, o botao para abrir o link do post
			 * sera habilitado, e coloca os textos para os componentes do autor 
			 * e descrição do post
			 */</span>
			<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onClickGridHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=mouseevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouseevent.html"><span style="color: #004993;">MouseEvent</span></a><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span>
			<span style="color: #000000;">&#123;</span>
				<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>btnLink<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">visible</span>	= <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>autor<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span>			= <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>grid<span style="color: #000066; font-weight: bold;">.</span>selectedItem<span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">as</span> <a href="http://www.google.com/search?q=object%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:object.html"><span style="color: #004993;">Object</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span><span style="color: #990000;">'author'</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>descricao<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span>		= <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>grid<span style="color: #000066; font-weight: bold;">.</span>selectedItem<span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">as</span> <a href="http://www.google.com/search?q=object%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:object.html"><span style="color: #004993;">Object</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span><span style="color: #990000;">'description'</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
&nbsp;
			<span style="color: #3f5fbf;">/**
			 * Click do botao para visualizar o artigo
			 */</span>
			<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onBtnLinkClickHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=mouseevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouseevent.html"><span style="color: #004993;">MouseEvent</span></a><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span>
			<span style="color: #000000;">&#123;</span>
				<span style="color: #004993;">navigateToURL</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=urlrequest%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:urlrequest.html"><span style="color: #004993;">URLRequest</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>grid<span style="color: #000066; font-weight: bold;">.</span>selectedItem<span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">as</span> <a href="http://www.google.com/search?q=object%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:object.html"><span style="color: #004993;">Object</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span><span style="color: #990000;">'guid'</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">toString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;_blank&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">&gt;</span>
	<span style="color: #000066; font-weight: bold;">&lt;/</span>mx<span style="color: #000066; font-weight: bold;">:</span>Script<span style="color: #000066; font-weight: bold;">&gt;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>HTTPService id=<span style="color: #990000;">&quot;service&quot;</span> <span style="color: #004993;">url</span>=<span style="color: #990000;">&quot;http://imasters.uol.com.br/feed/secao/flex&quot;</span> 
					showBusyCursor=<span style="color: #990000;">&quot;true&quot;</span> resultFormat=<span style="color: #990000;">&quot;e4x&quot;</span> 
					result=<span style="color: #990000;">&quot;serviceHandler(event)&quot;</span><span style="color: #000066; font-weight: bold;">/&gt;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>VBox <span style="color: #004993;">bottom</span>=<span style="color: #990000;">&quot;5&quot;</span> <span style="color: #004993;">left</span>=<span style="color: #990000;">&quot;5&quot;</span> <span style="color: #004993;">right</span>=<span style="color: #990000;">&quot;5&quot;</span> <span style="color: #004993;">top</span>=<span style="color: #990000;">&quot;5&quot;</span><span style="color: #000066; font-weight: bold;">&gt;</span>
		<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>AdvancedDataGrid id=<span style="color: #990000;">&quot;grid&quot;</span> designViewDataType=<span style="color: #990000;">&quot;flat&quot;</span> 
							 <span style="color: #004993;">bottom</span>=<span style="color: #990000;">&quot;5&quot;</span> <span style="color: #004993;">left</span>=<span style="color: #990000;">&quot;5&quot;</span> <span style="color: #004993;">right</span>=<span style="color: #990000;">&quot;5&quot;</span> <span style="color: #004993;">top</span>=<span style="color: #990000;">&quot;5&quot;</span> 
							 <span style="color: #004993;">height</span>=<span style="color: #990000;">&quot;50%&quot;</span> <span style="color: #004993;">width</span>=<span style="color: #990000;">&quot;100%&quot;</span>
							 <span style="color: #004993;">click</span>=<span style="color: #990000;">&quot;onClickGridHandler(event);&quot;</span><span style="color: #000066; font-weight: bold;">&gt;</span>
			<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>columns<span style="color: #000066; font-weight: bold;">&gt;</span>
				<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>AdvancedDataGridColumn headerText=<span style="color: #990000;">&quot;Titulo do artigo&quot;</span> dataField=<span style="color: #990000;">&quot;title&quot;</span><span style="color: #000066; font-weight: bold;">/&gt;</span>
			<span style="color: #000066; font-weight: bold;">&lt;/</span>mx<span style="color: #000066; font-weight: bold;">:</span>columns<span style="color: #000066; font-weight: bold;">&gt;</span>
		<span style="color: #000066; font-weight: bold;">&lt;/</span>mx<span style="color: #000066; font-weight: bold;">:</span>AdvancedDataGrid<span style="color: #000066; font-weight: bold;">&gt;</span>
&nbsp;
		<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>Canvas 	<span style="color: #004993;">height</span>=<span style="color: #990000;">&quot;50%&quot;</span> <span style="color: #004993;">width</span>=<span style="color: #990000;">&quot;100%&quot;</span> <span style="color: #004993;">borderColor</span>=<span style="color: #990000;">&quot;#DADADA&quot;</span> borderStyle=<span style="color: #990000;">&quot;solid&quot;</span><span style="color: #000066; font-weight: bold;">&gt;</span>
			<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>Label <span style="color: #004993;">x</span>=<span style="color: #990000;">&quot;6&quot;</span> <span style="color: #004993;">y</span>=<span style="color: #990000;">&quot;6&quot;</span> id=<span style="color: #990000;">&quot;autor&quot;</span> fontWeight=<span style="color: #990000;">&quot;bold&quot;</span><span style="color: #000066; font-weight: bold;">/&gt;</span>
			<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>TextArea 	<span style="color: #004993;">height</span>=<span style="color: #990000;">&quot;53&quot;</span> id=<span style="color: #990000;">&quot;descricao&quot;</span> <span style="color: #004993;">bottom</span>=<span style="color: #990000;">&quot;6&quot;</span> <span style="color: #004993;">left</span>=<span style="color: #990000;">&quot;6&quot;</span> <span style="color: #004993;">right</span>=<span style="color: #990000;">&quot;6&quot;</span> 
							borderStyle=<span style="color: #990000;">&quot;none&quot;</span> <span style="color: #004993;">selectable</span>=<span style="color: #990000;">&quot;false&quot;</span> mouseFocusEnabled=<span style="color: #990000;">&quot;false&quot;</span> 
							<span style="color: #004993;">mouseEnabled</span>=<span style="color: #990000;">&quot;false&quot;</span><span style="color: #000066; font-weight: bold;">/&gt;</span>
			<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>LinkButton 	<span style="color: #004993;">x</span>=<span style="color: #990000;">&quot;383&quot;</span> <span style="color: #004993;">y</span>=<span style="color: #990000;">&quot;4&quot;</span> label=<span style="color: #990000;">&quot;Ler artigo&quot;</span> <span style="color: #004993;">visible</span>=<span style="color: #990000;">&quot;false&quot;</span> 
							id=<span style="color: #990000;">&quot;btnLink&quot;</span> <span style="color: #004993;">click</span>=<span style="color: #990000;">&quot;onBtnLinkClickHandler(event);&quot;</span><span style="color: #000066; font-weight: bold;">/&gt;</span>
&nbsp;
		<span style="color: #000066; font-weight: bold;">&lt;/</span>mx<span style="color: #000066; font-weight: bold;">:</span>Canvas<span style="color: #000066; font-weight: bold;">&gt;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">&lt;/</span>mx<span style="color: #000066; font-weight: bold;">:</span>VBox<span style="color: #000066; font-weight: bold;">&gt;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">&lt;/</span>mx<span style="color: #000066; font-weight: bold;">:</span>TitleWindow<span style="color: #000066; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<p>Espero ter ficado claro o processo de atualização automática no AIR.</p>
<p>Abraços a todos.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.horochovec.com.br/blog/2009/08/14/air-criando-uma-aplicacao-com-atualizacao-automatica-parte-iii/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>AIR &#8211; Criando uma aplicação com atualização automática &#8211; Parte II</title>
		<link>http://www.horochovec.com.br/blog/2009/08/14/air-criando-uma-aplicacao-com-atualizacao-automatica-parte-ii/</link>
		<comments>http://www.horochovec.com.br/blog/2009/08/14/air-criando-uma-aplicacao-com-atualizacao-automatica-parte-ii/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 05:32:26 +0000</pubDate>
		<dc:creator>Stefan Horochovec</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Auto-Update]]></category>

		<guid isPermaLink="false">http://www.horochovec.com.br/blog/?p=145</guid>
		<description><![CDATA[Segunda parte&#8230; Na continuação podemos partir para o desenvolvimento da aplicação em si. Eu criei um componente chamado Posts.mxml, ele encontra-se dentro da package: br.com.horochovec.view.Posts. A idéia desse componente é que ele seja responsável por consumir o Feed sobre Flex do site iMasters, passe algumas informações para um Grid, e assim, o usuário possa listar [...]]]></description>
			<content:encoded><![CDATA[<p>Segunda parte&#8230;<span id="more-145"></span></p>
<p>Na continuação podemos partir para o desenvolvimento da aplicação em si. Eu criei um componente chamado Posts.mxml, ele encontra-se dentro da package: br.com.horochovec.view.Posts. A idéia desse componente é que ele seja responsável por consumir o Feed sobre Flex do site iMasters, passe algumas informações para um Grid, e assim, o usuário possa listar os posts do site e obter mais informações sobre ele.</p>
<p>Esse componente estende de uma TitleWindow, dentro dele possui um VBox, AdvancedDataGrid, e um Canvas, que contem dentro dele um Label, um TextArea e um LinkButton.</p>
<p>O componente VBox é o container que agrupará todos os outros componentes visuais desse componente.</p>
<p>Ainda no componente Posts.mxml, eu possuo um HTTPService. Esse HTTPService é responsável por consumir o Feed da iMasters em seu momento de criação. Ou seja, quando o componente Posts.mxml for criado, irá consumir o HTTPService para que busque todos os artigos disponíveis no site na seção Flex. O formato do consumo das informações será através de e4x.</p>
<p>O AdvancedDataGrid tem apenas uma única coluna, ela é responsável por imprimir o titulo do artigo. Caso o usuário opte por clicar no item do Grid, eu solicito para a aplicação que me mostre no quadro abaixo (composto por um Canvas, Label, TextInput e LinkButton) algumas informações do post selecionado.</p>
<p>Segue o fonte na integra do componente desenvolvido.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://www.horochovec.com.br/blog/wp-content/plugins/wp-codebox/wp-codebox.php?p=145&amp;download=Posts.mxml">Posts.mxml</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p14511"><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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
</pre></td><td class="code" id="p145code11"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">&lt;?</span>xml <span style="color: #004993;">version</span>=<span style="color: #990000;">&quot;1.0&quot;</span> encoding=<span style="color: #990000;">&quot;utf-8&quot;</span><span style="color: #000066; font-weight: bold;">?&gt;</span>
<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>TitleWindow 
	xmlns<span style="color: #000066; font-weight: bold;">:</span>mx=<span style="color: #990000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> 
	layout=<span style="color: #990000;">&quot;absolute&quot;</span> 
	<span style="color: #004993;">width</span>=<span style="color: #990000;">&quot;500&quot;</span> 
	<span style="color: #004993;">height</span>=<span style="color: #990000;">&quot;250&quot;</span> 
	showCloseButton=<span style="color: #990000;">&quot;true&quot;</span> 
	creationComplete=<span style="color: #990000;">&quot;creationCompleteHandler(event);&quot;</span>
	<span style="color: #004993;">close</span>=<span style="color: #990000;">&quot;onCloseHandler(event);&quot;</span> 
	title=<span style="color: #990000;">&quot;Feeds Imasters - Seção Flex&quot;</span><span style="color: #000066; font-weight: bold;">&gt;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>Script<span style="color: #000066; font-weight: bold;">&gt;</span>
		<span style="color: #000066; font-weight: bold;">&lt;!</span><span style="color: #000000;">&#91;</span>CDATA<span style="color: #000000;">&#91;</span>
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">import</span> flash<span style="color: #000066; font-weight: bold;">.</span>desktop<span style="color: #000066; font-weight: bold;">.</span>NativeApplication<span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>events<span style="color: #000066; font-weight: bold;">.</span>CloseEvent<span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>events<span style="color: #000066; font-weight: bold;">.</span>FlexEvent<span style="color: #000066; font-weight: bold;">;</span>			
			<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>rpc<span style="color: #000066; font-weight: bold;">.</span>events<span style="color: #000066; font-weight: bold;">.</span>ResultEvent<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #3f5fbf;">/**
			 * Dataprovider do grid
			 */</span>			
			<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> xmlList <span style="color: #000066; font-weight: bold;">:</span> <a href="http://www.google.com/search?q=xmllist%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:xmllist.html"><span style="color: #004993;">XMLList</span></a><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
    		<span style="color: #3f5fbf;">/**
    		 * Evento disparado na finalização da construção do componente
    		 * Responsavel por iniciar o HTTPService para leitura do feed
    		 */</span>
			<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> creationCompleteHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span>FlexEvent<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span>
			<span style="color: #000000;">&#123;</span>
				<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>service<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">send</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
&nbsp;
			<span style="color: #3f5fbf;">/**
			 * Evento disparado no termino com sucesso da leitura do HTTPService
			 * Responsavel por adicionar ao grid o dataProvider
			 */</span>
			<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> serviceHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span>ResultEvent<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span>
			<span style="color: #000000;">&#123;</span>
				<span style="color: #6699cc; font-weight: bold;">var</span> result <span style="color: #000066; font-weight: bold;">:</span> <a href="http://www.google.com/search?q=xml%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:xml.html"><span style="color: #004993;">XML</span></a> = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=xml%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:xml.html"><span style="color: #004993;">XML</span></a><span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">.</span>result<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				xmlList	= result<span style="color: #000066; font-weight: bold;">..</span>item<span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>grid<span style="color: #000066; font-weight: bold;">.</span>dataProvider	= xmlList<span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
&nbsp;
    		<span style="color: #3f5fbf;">/**
    		 * Evento disparado no fechar da TitleWindow, ele é responsável por fechar a aplicação
    		 */</span>			
			<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onCloseHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span>CloseEvent<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span> 
			<span style="color: #000000;">&#123;</span>
				NativeApplication<span style="color: #000066; font-weight: bold;">.</span>nativeApplication<span style="color: #000066; font-weight: bold;">.</span>exit<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
&nbsp;
			<span style="color: #3f5fbf;">/**
			 * Quando ocorrer um click no grid, o botao para abrir o link do post
			 * sera habilitado, e coloca os textos para os componentes do autor 
			 * e descrição do post
			 */</span>
			<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onClickGridHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=mouseevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouseevent.html"><span style="color: #004993;">MouseEvent</span></a><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span>
			<span style="color: #000000;">&#123;</span>
				<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>btnLink<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">visible</span>	= <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>autor<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span>			= <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>grid<span style="color: #000066; font-weight: bold;">.</span>selectedItem<span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">as</span> <a href="http://www.google.com/search?q=object%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:object.html"><span style="color: #004993;">Object</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span><span style="color: #990000;">'author'</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>descricao<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span>		= <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>grid<span style="color: #000066; font-weight: bold;">.</span>selectedItem<span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">as</span> <a href="http://www.google.com/search?q=object%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:object.html"><span style="color: #004993;">Object</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span><span style="color: #990000;">'description'</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
&nbsp;
			<span style="color: #3f5fbf;">/**
			 * Click do botao para visualizar o artigo
			 */</span>
			<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onBtnLinkClickHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=mouseevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouseevent.html"><span style="color: #004993;">MouseEvent</span></a><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span>
			<span style="color: #000000;">&#123;</span>
				<span style="color: #004993;">navigateToURL</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=urlrequest%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:urlrequest.html"><span style="color: #004993;">URLRequest</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>grid<span style="color: #000066; font-weight: bold;">.</span>selectedItem<span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">as</span> <a href="http://www.google.com/search?q=object%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:object.html"><span style="color: #004993;">Object</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span><span style="color: #990000;">'guid'</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">toString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;_blank&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">&gt;</span>
	<span style="color: #000066; font-weight: bold;">&lt;/</span>mx<span style="color: #000066; font-weight: bold;">:</span>Script<span style="color: #000066; font-weight: bold;">&gt;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>HTTPService id=<span style="color: #990000;">&quot;service&quot;</span> <span style="color: #004993;">url</span>=<span style="color: #990000;">&quot;http://imasters.uol.com.br/feed/secao/flex&quot;</span> 
					showBusyCursor=<span style="color: #990000;">&quot;true&quot;</span> resultFormat=<span style="color: #990000;">&quot;e4x&quot;</span> 
					result=<span style="color: #990000;">&quot;serviceHandler(event)&quot;</span><span style="color: #000066; font-weight: bold;">/&gt;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>VBox <span style="color: #004993;">bottom</span>=<span style="color: #990000;">&quot;5&quot;</span> <span style="color: #004993;">left</span>=<span style="color: #990000;">&quot;5&quot;</span> <span style="color: #004993;">right</span>=<span style="color: #990000;">&quot;5&quot;</span> <span style="color: #004993;">top</span>=<span style="color: #990000;">&quot;5&quot;</span><span style="color: #000066; font-weight: bold;">&gt;</span>
		<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>AdvancedDataGrid id=<span style="color: #990000;">&quot;grid&quot;</span> designViewDataType=<span style="color: #990000;">&quot;flat&quot;</span> 
							 <span style="color: #004993;">bottom</span>=<span style="color: #990000;">&quot;5&quot;</span> <span style="color: #004993;">left</span>=<span style="color: #990000;">&quot;5&quot;</span> <span style="color: #004993;">right</span>=<span style="color: #990000;">&quot;5&quot;</span> <span style="color: #004993;">top</span>=<span style="color: #990000;">&quot;5&quot;</span> 
							 <span style="color: #004993;">height</span>=<span style="color: #990000;">&quot;50%&quot;</span> <span style="color: #004993;">width</span>=<span style="color: #990000;">&quot;100%&quot;</span>
							 <span style="color: #004993;">click</span>=<span style="color: #990000;">&quot;onClickGridHandler(event);&quot;</span><span style="color: #000066; font-weight: bold;">&gt;</span>
			<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>columns<span style="color: #000066; font-weight: bold;">&gt;</span>
				<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>AdvancedDataGridColumn headerText=<span style="color: #990000;">&quot;Titulo do artigo&quot;</span> dataField=<span style="color: #990000;">&quot;title&quot;</span><span style="color: #000066; font-weight: bold;">/&gt;</span>
			<span style="color: #000066; font-weight: bold;">&lt;/</span>mx<span style="color: #000066; font-weight: bold;">:</span>columns<span style="color: #000066; font-weight: bold;">&gt;</span>
		<span style="color: #000066; font-weight: bold;">&lt;/</span>mx<span style="color: #000066; font-weight: bold;">:</span>AdvancedDataGrid<span style="color: #000066; font-weight: bold;">&gt;</span>
&nbsp;
		<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>Canvas 	<span style="color: #004993;">height</span>=<span style="color: #990000;">&quot;50%&quot;</span> <span style="color: #004993;">width</span>=<span style="color: #990000;">&quot;100%&quot;</span> <span style="color: #004993;">borderColor</span>=<span style="color: #990000;">&quot;#DADADA&quot;</span> borderStyle=<span style="color: #990000;">&quot;solid&quot;</span><span style="color: #000066; font-weight: bold;">&gt;</span>
			<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>Label <span style="color: #004993;">x</span>=<span style="color: #990000;">&quot;6&quot;</span> <span style="color: #004993;">y</span>=<span style="color: #990000;">&quot;6&quot;</span> id=<span style="color: #990000;">&quot;autor&quot;</span> fontWeight=<span style="color: #990000;">&quot;bold&quot;</span><span style="color: #000066; font-weight: bold;">/&gt;</span>
			<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>TextArea 	<span style="color: #004993;">height</span>=<span style="color: #990000;">&quot;53&quot;</span> id=<span style="color: #990000;">&quot;descricao&quot;</span> <span style="color: #004993;">bottom</span>=<span style="color: #990000;">&quot;6&quot;</span> <span style="color: #004993;">left</span>=<span style="color: #990000;">&quot;6&quot;</span> <span style="color: #004993;">right</span>=<span style="color: #990000;">&quot;6&quot;</span> 
							borderStyle=<span style="color: #990000;">&quot;none&quot;</span> <span style="color: #004993;">selectable</span>=<span style="color: #990000;">&quot;false&quot;</span> mouseFocusEnabled=<span style="color: #990000;">&quot;false&quot;</span> 
							<span style="color: #004993;">mouseEnabled</span>=<span style="color: #990000;">&quot;false&quot;</span><span style="color: #000066; font-weight: bold;">/&gt;</span>
			<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>LinkButton 	<span style="color: #004993;">x</span>=<span style="color: #990000;">&quot;383&quot;</span> <span style="color: #004993;">y</span>=<span style="color: #990000;">&quot;4&quot;</span> label=<span style="color: #990000;">&quot;Ler artigo&quot;</span> <span style="color: #004993;">visible</span>=<span style="color: #990000;">&quot;false&quot;</span> 
							id=<span style="color: #990000;">&quot;btnLink&quot;</span> <span style="color: #004993;">click</span>=<span style="color: #990000;">&quot;onBtnLinkClickHandler(event);&quot;</span><span style="color: #000066; font-weight: bold;">/&gt;</span>
&nbsp;
		<span style="color: #000066; font-weight: bold;">&lt;/</span>mx<span style="color: #000066; font-weight: bold;">:</span>Canvas<span style="color: #000066; font-weight: bold;">&gt;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">&lt;/</span>mx<span style="color: #000066; font-weight: bold;">:</span>VBox<span style="color: #000066; font-weight: bold;">&gt;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">&lt;/</span>mx<span style="color: #000066; font-weight: bold;">:</span>TitleWindow<span style="color: #000066; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<p>Algumas  considerações interessantes sobre o componente acima:</p>
<ul>
<li><strong>creationComplete=&#8221;creationCompleteHandler(event);&#8221;</strong> Quando o  componente tiver sido criado, ele irá disparar a função  creationCompleteHandler(); que será responsável por iniciar o consumo do  HTTPService.</li>
</ul>
<ul>
<li><strong>onCloseHandler(event:CloseEvent);</strong> Neste evento a  classe NativeApplication é acionada sendo responsável por fechar a aplicação  pelo botão de fechar da TitleWindow, componente base para o componente Posts;</li>
</ul>
<ul>
<li><strong>serviceHandler(event:ResultEvent);</strong> Evento responsável  por filtras as informações que o HTTPService consumiu e as retornaram como  string. Essas informações foram passadas para um XMLList aonde este XMLList  será o dataProvider do Grid.</li>
</ul>
<p>Com isso temos um componente  baseado em uma TitleWindow, que é capaz de buscar informações de um feed do  site da iMasters, através de HTTPService e disponibilizar as informações na  tela.</p>
<p>Dentro da minha aplicação  principal, eu possuo a definição de alguns estilos, para que o fundo transparente  funcione sem nenhum transtorno.</p>
<p>Para uma melhor interpretação, irei  disponibilizar todo o fonte do main, depois comentando cada uma das observações  necessárias.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://www.horochovec.com.br/blog/wp-content/plugins/wp-codebox/wp-codebox.php?p=145&amp;download=AIRAutoUpdate.mxml">AIRAutoUpdate.mxml</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p14512"><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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
</pre></td><td class="code" id="p145code12"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">&lt;?</span>xml <span style="color: #004993;">version</span>=<span style="color: #990000;">&quot;1.0&quot;</span> encoding=<span style="color: #990000;">&quot;utf-8&quot;</span><span style="color: #000066; font-weight: bold;">?&gt;</span>
<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>Application 
	xmlns<span style="color: #000066; font-weight: bold;">:</span>mx=<span style="color: #990000;">&quot;http://www.adobe.com/2006/mxml&quot;</span>
	xmlns<span style="color: #000066; font-weight: bold;">:</span>app=<span style="color: #990000;">&quot;br.com.horochovec.view.*&quot;</span> 
    <span style="color: #004993;">width</span>=<span style="color: #990000;">&quot;500&quot;</span> <span style="color: #004993;">height</span>=<span style="color: #990000;">&quot;250&quot;</span>
    layout=<span style="color: #990000;">&quot;absolute&quot;</span>
    paddingRight=<span style="color: #990000;">&quot;0&quot;</span>
    paddingLeft=<span style="color: #990000;">&quot;0&quot;</span> 
    creationComplete=<span style="color: #990000;">&quot;onCreationCompleteHandler(event);&quot;</span><span style="color: #000066; font-weight: bold;">&gt;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>Style<span style="color: #000066; font-weight: bold;">&gt;</span>
    	<span style="color: #3f5fbf;">/**
    	 * Estilo para a aplicação possuir o background transparente
    	 */</span>
        Application 
        <span style="color: #000000;">&#123;</span>
            background<span style="color: #000066; font-weight: bold;">-</span><span style="color: #004993;">color</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #990000;">&quot;&quot;</span><span style="color: #000066; font-weight: bold;">;</span> 
            background<span style="color: #000066; font-weight: bold;">-</span>image<span style="color: #000066; font-weight: bold;">:</span><span style="color: #990000;">&quot;&quot;</span><span style="color: #000066; font-weight: bold;">;</span> 
            padding<span style="color: #000066; font-weight: bold;">:</span> 0px<span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #000000;">&#125;</span>
    <span style="color: #000066; font-weight: bold;">&lt;/</span>mx<span style="color: #000066; font-weight: bold;">:</span>Style<span style="color: #000066; font-weight: bold;">&gt;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>Script<span style="color: #000066; font-weight: bold;">&gt;</span>
    	<span style="color: #000066; font-weight: bold;">&lt;!</span><span style="color: #000000;">&#91;</span>CDATA<span style="color: #000000;">&#91;</span>
    		<span style="color: #0033ff; font-weight: bold;">import</span> air<span style="color: #000066; font-weight: bold;">.</span>update<span style="color: #000066; font-weight: bold;">.</span>events<span style="color: #000066; font-weight: bold;">.</span>DownloadErrorEvent<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
    		<span style="color: #0033ff; font-weight: bold;">import</span> air<span style="color: #000066; font-weight: bold;">.</span>update<span style="color: #000066; font-weight: bold;">.</span>events<span style="color: #000066; font-weight: bold;">.</span>UpdateEvent<span style="color: #000066; font-weight: bold;">;</span>
    		<span style="color: #0033ff; font-weight: bold;">import</span> air<span style="color: #000066; font-weight: bold;">.</span>update<span style="color: #000066; font-weight: bold;">.</span>ApplicationUpdaterUI<span style="color: #000066; font-weight: bold;">;</span>
    		<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>controls<span style="color: #000066; font-weight: bold;">.</span>Alert<span style="color: #000066; font-weight: bold;">;</span>
    		<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>events<span style="color: #000066; font-weight: bold;">.</span>CloseEvent<span style="color: #000066; font-weight: bold;">;</span>
    		<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>events<span style="color: #000066; font-weight: bold;">.</span>FlexEvent<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
    		<span style="color: #3f5fbf;">/**
    		 * Objeto para atualizacao automatica
    		 */</span>
    		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> autoUpdater	<span style="color: #000066; font-weight: bold;">:</span> ApplicationUpdaterUI = <span style="color: #0033ff; font-weight: bold;">new</span> ApplicationUpdaterUI<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
    		<span style="color: #3f5fbf;">/**
    		 * Evento disparado na finalização da aplicação para adicionar um Listner de MouseDown 
    		 * no componente principal da aplicação
    		 */</span>
    		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onCreationCompleteHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span>FlexEvent<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span> 
    		<span style="color: #000000;">&#123;</span>
    			<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>main<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span> <a href="http://www.google.com/search?q=mouseevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouseevent.html"><span style="color: #004993;">MouseEvent</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MOUSE_DOWN</span><span style="color: #000066; font-weight: bold;">,</span>	onMouseDownHandler <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
    			<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>autoUpdateInit<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
    		<span style="color: #000000;">&#125;</span>
&nbsp;
    		<span style="color: #3f5fbf;">/**
    		 * Funcao para configuracao do inicio da atualizacao
    		 */</span>
    		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> autoUpdateInit<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span> 
    		<span style="color: #000000;">&#123;</span>
    			<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>autoUpdater<span style="color: #000066; font-weight: bold;">.</span>updateURL	= <span style="color: #990000;">&quot;http://www.horochovec.com.br/air/update-config.xml&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
    			<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>autoUpdater<span style="color: #000066; font-weight: bold;">.</span>isCheckForUpdateVisible	= <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">;</span>
    			<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>autoUpdater<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>UpdateEvent<span style="color: #000066; font-weight: bold;">.</span>INITIALIZED<span style="color: #000066; font-weight: bold;">,</span>	onUpdateApp<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
    			<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>autoUpdater<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=errorevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:errorevent.html"><span style="color: #004993;">ErrorEvent</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ERROR</span><span style="color: #000066; font-weight: bold;">,</span>			onErrorUpdate<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
    			<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>autoUpdater<span style="color: #000066; font-weight: bold;">.</span>initialize<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
    		<span style="color: #000000;">&#125;</span>
&nbsp;
    		<span style="color: #3f5fbf;">/**
    		 * Evento de inicializacao de atualizacao
    		 */</span>
    		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onUpdateApp<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span>UpdateEvent<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span> 
    		<span style="color: #000000;">&#123;</span>
    			<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>autoUpdater<span style="color: #000066; font-weight: bold;">.</span>checkNow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
    		<span style="color: #000000;">&#125;</span>
&nbsp;
    		<span style="color: #3f5fbf;">/**
    		 * Evento em caso de erro na atualizacao
    		 */</span>
    		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onErrorUpdate<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=errorevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:errorevent.html"><span style="color: #004993;">ErrorEvent</span></a><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span>
    		<span style="color: #000000;">&#123;</span>
    			Alert<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">show</span><span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">toString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
    		<span style="color: #000000;">&#125;</span>
&nbsp;
    		<span style="color: #3f5fbf;">/**
    		 * Possibilita arrastar o componente na janela atual 
    		 */</span>
    		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onMouseDownHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=mouseevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouseevent.html"><span style="color: #004993;">MouseEvent</span></a><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span>
    		<span style="color: #000000;">&#123;</span>
    			<span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span>nativeWindow<span style="color: #000066; font-weight: bold;">.</span>startMove<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
    		<span style="color: #000000;">&#125;</span>
&nbsp;
&nbsp;
    	<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">&gt;</span>
    <span style="color: #000066; font-weight: bold;">&lt;/</span>mx<span style="color: #000066; font-weight: bold;">:</span>Script<span style="color: #000066; font-weight: bold;">&gt;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">&lt;!--</span> Componente com a aplicação <span style="color: #000066; font-weight: bold;">--&gt;</span>
    <span style="color: #000066; font-weight: bold;">&lt;</span>app<span style="color: #000066; font-weight: bold;">:</span>Posts <span style="color: #004993;">x</span>=<span style="color: #990000;">&quot;0&quot;</span> <span style="color: #004993;">y</span>=<span style="color: #990000;">&quot;0&quot;</span> id=<span style="color: #990000;">&quot;main&quot;</span><span style="color: #000066; font-weight: bold;">/&gt;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">&lt;/</span>mx<span style="color: #000066; font-weight: bold;">:</span>Application<span style="color: #000066; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<p>Algumas  considerações:</p>
<ul>
<li><strong>creationComplete=&#8221;onCreationCompleteHandler(event);&#8221;</strong> No termino da criação da aplicação, a função onCreationCompleteHandler() será disparada, ela é responsável por adicionar um EventListner de MouseDown em meu componente Posts, e também executa a função autoUpdateInit(), que será responsável por eu iniciar meu objeto de atualização automática;</li>
</ul>
<ul>
<li><strong>function autoUpdateInit();</strong>Nessa função ocorre a configuração do objeto para efetuar a atualização automática. O primeiro atributo informado é a URL do arquivo XML que será consultado para verificar se existe uma atualização disponível para a aplicação (o formato do arquivo será informado na sequência).O segundo atributo informado é para que seja visível a busca por novas atualizações, esse atributo está informado como <em>true</em>, para que possamos acompanhar a busca por novas atualizações e ver se realmente está funcionando a implementação.Em seguida, dois <em>EventListner</em> são adicionados ao objeto, um quando ele for inicializado, e outro caso aconteça algum erro.Por fim, a função inicializa o objeto de atualização através da função <em>initialize();</em></li>
</ul>
<ul>
<li><strong>function initialize();</strong> Essa função é responsável por solicitar ao componente de atualização que verifique na URL informada se o aplicativo possui uma versão nova.</li>
</ul>
<p>Dessa forma, terminamos a segunda parte do artigo. Até a próxima!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.horochovec.com.br/blog/2009/08/14/air-criando-uma-aplicacao-com-atualizacao-automatica-parte-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AIR &#8211; Criando uma aplicação com atualização automática &#8211; Parte I</title>
		<link>http://www.horochovec.com.br/blog/2009/08/14/air-criando-uma-aplicacao-com-atualizacao-automatica-parte-i/</link>
		<comments>http://www.horochovec.com.br/blog/2009/08/14/air-criando-uma-aplicacao-com-atualizacao-automatica-parte-i/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 05:28:49 +0000</pubDate>
		<dc:creator>Stefan Horochovec</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Auto-Update]]></category>

		<guid isPermaLink="false">http://www.horochovec.com.br/blog/?p=139</guid>
		<description><![CDATA[Ola pessoal, Esse e os próximos dois posts no meu blog irei abordar um assunto que considero bastante interessante e que a Adobe teve um cuidado todo especial quando projetou essa atualização no SDK 1.5 do AIR, que foi a API para uma auto-atualização de sua aplicação. Esse artigo será divido em três partes. Os [...]]]></description>
			<content:encoded><![CDATA[<p>Ola pessoal,</p>
<p>Esse e os próximos dois posts no meu blog irei abordar um assunto que considero bastante interessante e que a Adobe teve um cuidado todo especial quando projetou essa atualização no SDK 1.5 do AIR, que foi a API para uma auto-atualização de sua aplicação. Esse artigo será divido em três partes. Os códigos fontes dos dois projetos utilizados estão disponíveis para download..</p>
<p>O post foi dividido em três partes devido a seu tamanho, seria muito extenso tudo em um unico.</p>
<p>Espero que aproveitem <img src='http://www.horochovec.com.br/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><span id="more-139"></span></p>
<p>Hoje é possível que você  configure sua aplicação para que ela procure no servidor se existe uma  atualização disponível e caso exista, se você quer fazer o download e atualizar  sua aplicação. Ainda é possível que você possa informar ao usuário do sistema,  quais seriam os motivos para a atualização da aplicação. Tudo isso, através de poucas  linhas de codificação e apenas um arquivo XML em seu servidor.</p>
<p>Para ilustrar essa situação,  vamos criar uma aplicação que irá ler um feed do site da iMasters. A  primeira versão da aplicação será responsável por ler apenas um dos feeds, e a  sua atualização, poderá ter mais opções de leitura.</p>
<p>Vou iniciar o artigo, partindo do  principio que você já saiba criar um projeto no FlexBuilder para AIR. Essa  aplicação tem alguns detalhes interessantes. O primeiro deles é que ela terá  seu background transparente, ou seja, você tem a impressão que a aplicação está  rodando como um gadget, outra grande inovação que a Adobe trouxe para o AIR.</p>
<p>Eu criei um projeto chamado <strong>AIRAutoUpdate</strong> e o FlexBuilder criou a  estrutura abaixo:</p>
<p><img class="aligncenter size-full wp-image-140" title="imagem01" src="http://www.horochovec.com.br/blog/wp-content/uploads/2009/08/imagem01.jpg" alt="imagem01" width="297" height="224" /></p>
<p>Bom, para quem não conhece a estrutura do AIR, o arquivo AIRAutoUpdate-app.xml é responsável por definir diversas informações ao compilador. O FlexBuilder adiciona um arquivo bem extenso quando você cria um projeto, iremos substituir o arquivo que ele criou por uma versão mais simples, contendo apenas aquilo que for relevante para esse tutorial, conforme informado abaixo:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://www.horochovec.com.br/blog/wp-content/plugins/wp-codebox/wp-codebox.php?p=139&amp;download=download.txt">download.txt</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p13914"><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
</pre></td><td class="code" id="p139code14"><pre class="language" style="font-family:monospace;">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;application xmlns=&quot;http://ns.adobe.com/air/application/1.5&quot;&gt;
	&lt;id&gt;AIRAutoUpdate&lt;/id&gt;
	&lt;version&gt;1.0&lt;/version&gt;
	&lt;filename&gt;AIRAutoUpdate&lt;/filename&gt;
	&lt;name&gt;AIRAutoUpdate - Tutorial&lt;/name&gt;
	&lt;installFolder&gt;Horochovec/AIR/AIRAutoUpdate&lt;/installFolder&gt;
	&lt;programMenuFolder&gt;Horochovec/AIR/AIRAutoUpdate&lt;/programMenuFolder&gt;
	&lt;description&gt;Exemplo de app que faz sua atualização automática&lt;/description&gt;
    &lt;copyright&gt;Stefan Horochovec (stefan@horochovec.com.br)&lt;/copyright&gt;
	&lt;initialWindow&gt;
		&lt;title&gt;AIRAutoUpdate&lt;/title&gt;
		&lt;content&gt;AIRAutoUpdate.swf&lt;/content&gt;
		&lt;systemChrome&gt;none&lt;/systemChrome&gt;
		&lt;transparent&gt;true&lt;/transparent&gt;
		&lt;visible&gt;true&lt;/visible&gt;
	    &lt;minimizable&gt;true&lt;/minimizable&gt;
	    &lt;maximizable&gt;false&lt;/maximizable&gt;
	    &lt;resizable&gt;false&lt;/resizable&gt;
	&lt;/initialWindow&gt;
&lt;/application&gt;</pre></td></tr></table></div>

<p>Esse artigo não tem como objetivo descrever todas as informações que foram atribuídas ao XML, porem, algumas ressalvas serão feitas aos atributos que são base para esse artigo.</p>
<ol>
<li><strong>&lt;version&gt;&lt;/version&gt; </strong>Utilizado para definir qual a versão da aplicação atualmente, é usado para fazer verificações de versão para atualização.</li>
<li><strong>&lt;systemChrome&gt;none&lt;/systemChrome&gt; </strong>Definição do tipo do System Chrome, essa opção tem valor default “standard”, porem, para criar uma aplicação com fundo transparente, deve-se atribuir o valor “none”.</li>
<li><strong>&lt;transparent&gt;true&lt;/transparent&gt; </strong>Definição se a janela deverá ser transparente, é apenas aplicável quando systemChrome for do tipo none.</li>
<li><strong>&lt;visible&gt;true&lt;/visible&gt; </strong>Define se a janela deverá se iniciar como visível, como o valor default é false, passamos para true.</li>
</ol>
<p>Assim,  dessa forma o compilador irá receber as informações necessárias a nível de  definição da aplicação para que o seu background fique transparente.</p>
<p>Terminamos assim, a primeira parte do artigo, até a proxima.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.horochovec.com.br/blog/2009/08/14/air-criando-uma-aplicacao-com-atualizacao-automatica-parte-i/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flex + BlazeDS : como o BlazeDS sabe o que executar?</title>
		<link>http://www.horochovec.com.br/blog/2009/07/24/flex-blazeds-como-o-blazeds-sabe-o-que-executar/</link>
		<comments>http://www.horochovec.com.br/blog/2009/07/24/flex-blazeds-como-o-blazeds-sabe-o-que-executar/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 03:55:15 +0000</pubDate>
		<dc:creator>Stefan Horochovec</dc:creator>
				<category><![CDATA[BlazeDS]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.horochovec.com.br/blog/?p=134</guid>
		<description><![CDATA[Ola pessoal, Meu amigo Erko Bridee publicou recentemente em seu blog um artigo interessantissimo para quem não conhece a forma que o BlazeDS sabe o que executar. Para ler o artigo, clique aqui. Boa leitura!]]></description>
			<content:encoded><![CDATA[<p>Ola pessoal,</p>
<p>Meu amigo <a href="http://erkobridee.com/" target="_new">Erko Bridee</a> publicou recentemente em seu blog um artigo interessantissimo para quem não conhece a forma que o BlazeDS sabe o que executar. Para ler o artigo, clique <a href="http://erkobridee.com/2009/07/17/flex-blazeds-como-o-blazeds-sabe-o-que-executar/" target="_new">aqui</a>.</p>
<p>Boa leitura!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.horochovec.com.br/blog/2009/07/24/flex-blazeds-como-o-blazeds-sabe-o-que-executar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remover componentes do Custom do FlexBuilder</title>
		<link>http://www.horochovec.com.br/blog/2009/07/23/remover-componentes-do-custom-do-flexbuilder/</link>
		<comments>http://www.horochovec.com.br/blog/2009/07/23/remover-componentes-do-custom-do-flexbuilder/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 02:49:44 +0000</pubDate>
		<dc:creator>Stefan Horochovec</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[FlexBuilder]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[SDK]]></category>

		<guid isPermaLink="false">http://www.horochovec.com.br/blog/?p=128</guid>
		<description><![CDATA[Olá, É muito comum no Flex o programador criar componentes para facilitar sua vida, porém, nem sempre você tem a necessidade de criar uma Library para isso, ou seja, você acaba customizando componentes dentro da sua própria aplicação. Porém, em algumas situações, você pode criar um componente &#8220;pai&#8221; e alguns &#8220;filhos&#8221;, usando a herança. Geralmente [...]]]></description>
			<content:encoded><![CDATA[<p>Olá,</p>
<p>É muito comum no Flex o programador criar componentes para facilitar sua vida, porém, nem sempre você tem a necessidade de criar uma Library para isso, ou seja, você acaba customizando componentes dentro da sua própria aplicação. Porém, em algumas situações, você pode criar um componente &#8220;pai&#8221; e alguns &#8220;filhos&#8221;, usando a herança. Geralmente nesses casos você só usa na sua aplicação os componentes &#8220;filhos&#8221;, o componente &#8220;pai&#8221; é a base para eles e ele não deve ser utilizado em sua aplicação. Agora, como remover ele de sua aba &#8220;Custom&#8221; no FlexBuilder?</p>
<p><span id="more-128"></span>Existe uma forma simples de fazer isso, você fará o uso da metadata <strong>ExcludeClass</strong>.</p>
<p>Para exemplificar essa situação, iremos criar a seguinte situação. Um componente base que eu devo usar para os botões da minha aplicação, e depois, iremos criar um botão para o uso na aplicação. Vale lembrar que essa situação é apenas para ilustrar o uso da metadata e não é um padrão para criação de botões, até porque o componente pai irá herdar suas propriedades de um Canvas.</p>
<p>Segue abaixo, o código fonte do componente principal: Botao</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://www.horochovec.com.br/blog/wp-content/plugins/wp-codebox/wp-codebox.php?p=128&amp;download=Botao.as">Botao.as</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p12818"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code" id="p128code18"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> br<span style="color: #000066; font-weight: bold;">.</span>com<span style="color: #000066; font-weight: bold;">.</span>horochovec
<span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>containers<span style="color: #000066; font-weight: bold;">.</span>Canvas<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> Botao <span style="color: #0033ff; font-weight: bold;">extends</span> Canvas
	<span style="color: #000000;">&#123;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> Botao<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>Feito isso, iremos criar um novo componentes, que iremos chamar de BotaoOK:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://www.horochovec.com.br/blog/wp-content/plugins/wp-codebox/wp-codebox.php?p=128&amp;download=BotaoOK.as">BotaoOK.as</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p12819"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code" id="p128code19"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> br<span style="color: #000066; font-weight: bold;">.</span>com<span style="color: #000066; font-weight: bold;">.</span>horochovec
<span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> br<span style="color: #000066; font-weight: bold;">.</span>com<span style="color: #000066; font-weight: bold;">.</span>horochovec<span style="color: #000066; font-weight: bold;">.</span>Botao<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> BotaoOK <span style="color: #0033ff; font-weight: bold;">extends</span> Botao
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> BotaoOK<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>Dessa forma, teremos o componente BotaoOK pronto para o uso, porém, no grupo &#8220;Custom&#8221; de meus componentes no FlexBuilder, eu tenho também disponivel para o uso o componente Botao, que é o componente pai, e eu não quero utilizá-lo em meu projeto. Quero removê-lo da lista, para que nenhum desenvolvedor utilize o mesmo. Como devo proceder?</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://www.horochovec.com.br/blog/wp-content/plugins/wp-codebox/wp-codebox.php?p=128&amp;download=Botao.as">Botao.as</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p12820"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code" id="p128code20"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> br<span style="color: #000066; font-weight: bold;">.</span>com<span style="color: #000066; font-weight: bold;">.</span>horochovec
<span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>containers<span style="color: #000066; font-weight: bold;">.</span>Canvas<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #000000;">&#91;</span>ExcludeClass<span style="color: #000000;">&#93;</span>
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> Botao <span style="color: #0033ff; font-weight: bold;">extends</span> Canvas
	<span style="color: #000000;">&#123;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> Botao<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>Pronto. Adicionando a Metadata [ExcludeClass] dentro do seu componente, ele não estará mais disponivel para o uso em minha aplicação, mas poderei continuar usando o componente pai para ser base de outros componentes.</p>
<p>Espero ter contribuido,</p>
<p>Abraços, dúvidas? Comentem!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.horochovec.com.br/blog/2009/07/23/remover-componentes-do-custom-do-flexbuilder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FlexDuck &#8211; Apresentação a comunidade</title>
		<link>http://www.horochovec.com.br/blog/2009/04/28/flexduck-apresentacao-a-comunidade/</link>
		<comments>http://www.horochovec.com.br/blog/2009/04/28/flexduck-apresentacao-a-comunidade/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 23:00:02 +0000</pubDate>
		<dc:creator>Stefan Horochovec</dc:creator>
				<category><![CDATA[FlexDuck]]></category>
		<category><![CDATA[AUG]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.horochovec.com.br/blog/?p=104</guid>
		<description><![CDATA[Ola pessoal. Ontem (27/04) tivemos nossa primeira reunião pública do AUG. Ela foi realizada na Faculdade MaterDei e contou com a presença de alguns professores dos cursos de graduação e pós-graduação na área de TI, e de algumas turmas dos cursos de graduação. Devido a agenda lotada da instituição, tivemos um tempo limitado de reunião, [...]]]></description>
			<content:encoded><![CDATA[<p>Ola pessoal.</p>
<p>Ontem (27/04) tivemos nossa primeira reunião pública do AUG. Ela foi  realizada na Faculdade MaterDei e contou com a presença de alguns professores  dos cursos de graduação e pós-graduação na área de TI, e de algumas turmas dos  cursos de graduação.</p>
<p><span id="more-104"></span>Devido a agenda lotada da instituição, tivemos um tempo limitado de reunião,  porém, foi possivel passar os objetivos junto a comunidade do AUG, sobre o que é  o Flex, seus objetivos e ferramentas que fazem dele um sucesso em RIA.</p>
<p>Abaixo, seguem algumas fotos tiradas no evento,</p>
<p>Obrigado a todos que compareceram, e em breve, novas reuniões acontecerão no  meio acadêmico.</p>
<p><img class="alignnone" src="http://www.horochovec.com.br/fotos/flexduck/270409/01.jpg" alt="" width="500" height="375" /></p>
<p><img class="alignnone" src="http://www.horochovec.com.br/fotos/flexduck/270409/03.jpg" alt="" width="500" height="375" /></p>
<p><img class="alignnone" src="http://www.horochovec.com.br/fotos/flexduck/270409/04.jpg" alt="" width="500" height="375" /></p>
<p><img class="alignnone" src="http://www.horochovec.com.br/fotos/flexduck/270409/05.jpg" alt="" width="500" height="375" /></p>
<p><img class="alignnone" src="http://www.horochovec.com.br/fotos/flexduck/270409/06.jpg" alt="" width="500" height="375" /></p>
<p><img class="alignnone" src="http://www.horochovec.com.br/fotos/flexduck/270409/07.jpg" alt="" width="500" height="375" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.horochovec.com.br/blog/2009/04/28/flexduck-apresentacao-a-comunidade/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Forum FlexBrasil</title>
		<link>http://www.horochovec.com.br/blog/2009/04/10/forum-flexbrasil/</link>
		<comments>http://www.horochovec.com.br/blog/2009/04/10/forum-flexbrasil/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 12:28:02 +0000</pubDate>
		<dc:creator>Stefan Horochovec</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[FlexBrasil]]></category>
		<category><![CDATA[Forum]]></category>

		<guid isPermaLink="false">http://www.horochovec.com.br/blog/?p=98</guid>
		<description><![CDATA[Ola pessoal, Estava dando uma olhada nas estatisticas do Forum FlexBrasil e resolvi divulgar um pouco do Forum aqui no Blog. O Forum conta hoje com 6727 usuários registrados, com um crescimento de quase 15 pessoas por dia se juntando a comunidade do Forum. Ora, 15 pessoas se juntam ao Forum por dia para compartilhar [...]]]></description>
			<content:encoded><![CDATA[<p>Ola pessoal,</p>
<p>Estava dando uma olhada nas estatisticas do Forum <a href="http://forum.flexbrasil.com.br/" target="_new">FlexBrasil</a> e resolvi divulgar um pouco do Forum aqui no Blog.</p>
<p><span id="more-98"></span></p>
<p>O Forum conta hoje com 6727 usuários registrados, com um crescimento de quase 15 pessoas por dia se juntando a comunidade do Forum.</p>
<p>Ora, 15 pessoas se juntam ao Forum por dia para compartilhar seu conhecimento e suas dúvidas, eu acho isso fantástico.</p>
<p>Se você ainda não conhece o forum, ou ainda não se cadastrou&#8230; Acesse:  <a href="http://forum.flexbrasil.com.br/" target="_new">Forum FlexBrasil</a>.</p>
<p>O Forum conta com diversos grupos para facilitar sua postagem e seu aprendizado nele, você acessa diretamente o conteudo que deseja acessar, sem precisar filtrar todas as mensagens são postadas.</p>
<p>Conheça, faça parte da comunidade!</p>
<p>Abraços</p>
]]></content:encoded>
			<wfw:commentRss>http://www.horochovec.com.br/blog/2009/04/10/forum-flexbrasil/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prototipação de interfaces</title>
		<link>http://www.horochovec.com.br/blog/2009/03/18/prototipacao-sugestao-de-solucoes-para-o-uso-diario/</link>
		<comments>http://www.horochovec.com.br/blog/2009/03/18/prototipacao-sugestao-de-solucoes-para-o-uso-diario/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 02:41:00 +0000</pubDate>
		<dc:creator>Stefan Horochovec</dc:creator>
				<category><![CDATA[Eng. de Software]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[interfaces]]></category>
		<category><![CDATA[prototipação]]></category>
		<category><![CDATA[protótipos]]></category>

		<guid isPermaLink="false">http://www.horochovec.com.br/blog/?p=17</guid>
		<description><![CDATA[Essa sugestão já rolou em algumas listas de discussão do Flex, quando pediram se alguem conhecia alguma ferramenta de prototipação. Porém, como seu uso pode ser extendido a outras tecnologias resolvi criar esse post para tentar ajudar quem está procurando uma ferramenta nessa área. Balsamiq Mockups Uma ferramenta bem interessante, com opção para o uso [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Essa sugestão já rolou em algumas listas de discussão do Flex, quando pediram se alguem conhecia alguma ferramenta de prototipação. Porém, como seu uso pode ser  extendido a outras tecnologias resolvi criar esse post para tentar ajudar quem está procurando uma ferramenta nessa área.</p>
<p style="text-align: justify;"><span id="more-17"></span></p>
<p style="text-align: justify;"><strong><a href="http://www.balsamiq.com/" target="_blank">Balsamiq Mockups</a></strong></p>
<p style="text-align: justify;">Uma ferramenta bem interessante, com opção para o uso online ou offline, que contem quase todos os componentes que você utiliza no seu dia-a-dia do desenvolvimento Flex.</p>
<p style="text-align: justify;">Um grande diferencial dessa ferramenta foi a forma de apresentação dos componentes na tela, como se estivessem desenhados a mão, ao contrário da maioria das ferramentas de prototipação que eu já tinha visto.</p>
<p style="text-align: justify;">Além dos protótipos serem &#8220;bonitinhos&#8221; quando apresentados dessa forma, reforça ao cliente que o que você esta apresentando é um protótipo, e não uma versão &#8220;beta&#8221; do novo módulo ou tela que você estaria desenvolvendo para ele.</p>
<p style="text-align: justify;">Com recursos bem interessantes de bloqueio de edição para componentes para que você não arraste errado sem querer, diversos recursos de anotações ao layout, com setas e lembretes permite que você possa criar layouts de uma forma bem &#8220;informal&#8221;, porém, com muitos detalhes.</p>
<p style="text-align: justify;">Venho utilizando ela no trabalho e os resultados foram muito satisfatórios&#8230;</p>
<p style="text-align: justify;">Segue então a dica do seu uso&#8230;. Não vou postar nenhuma tela, pois basta você clicar <a href="http://www.balsamiq.com/" target="_blank">aqui</a> e conferir o link com a demonstração online da ferramenta.</p>
<p style="text-align: justify;">A ferramenta é paga, e tem um custo de U$ 75.00, porém, você pode usufruir dela sem custos para criar seus layouts sem a opcão de salvar o layout criado, sendo possivel apenas fazer a exportação para .png, ou seja, você pode fazer bons testes e depois comprar, já que o custo não é elevado e os resultados são compensadores.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.horochovec.com.br/blog/2009/03/18/prototipacao-sugestao-de-solucoes-para-o-uso-diario/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
