<?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>FlexDev &#187; Dicas</title>
	<atom:link href="http://www.flexdev.com.br/home/tag/dicas/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.flexdev.com.br/home</link>
	<description>Flex/AIR, Java e RIA em geral.</description>
	<lastBuildDate>Sat, 04 Sep 2010 13:01:46 +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>Tutoriais Flex</title>
		<link>http://www.flexdev.com.br/home/tutoriais-flex/</link>
		<comments>http://www.flexdev.com.br/home/tutoriais-flex/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 02:14:51 +0000</pubDate>
		<dc:creator>Ebercom</dc:creator>
				<category><![CDATA[Artigos]]></category>
		<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Tecnologia]]></category>
		<category><![CDATA[Tutoriais]]></category>

		<guid isPermaLink="false">http://blog.flexdev.com.br/tutoriais-flex/</guid>
		<description><![CDATA[Navegando pela internet a procura de material para conclus&#227;o da minha monografia, encontrei na lista Flex-Brasil uma s&#233;rie fant&#225;stica de tutoriais escritos por M&#225;rio Santos, segue abaixo os links: Parte I: http://msdevstudio.com/blog/download-manager.php?id=4 Parte II: http://msdevstudio.com/blog/download-manager.php?id=3 Parte III: http://msdevstudio.com/blog/download-manager.php?id=2 Parte IV: http://msdevstudio.com/blog/download-manager.php?id=1 Mais informa&#231;&#245;es no aqui. Boa leitura a todos&#8230; Abra&#231;os.. * Atualiza&#231;&#227;o realizada no dia [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flexdev.com.br/home/imagens/TutoriaisFlex_146E5/flex0_3.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="155" alt="flex0" src="http://www.flexdev.com.br/home/imagens/TutoriaisFlex_146E5/flex0_thumb_3.png" width="291" border="0" /></a> </p>
<p>Navegando pela internet a procura de material para conclus&#227;o da minha monografia, encontrei na lista <a href="http://www.flex.org/" target="_blank">Flex-Brasil</a> uma s&#233;rie fant&#225;stica de tutoriais escritos por <a href="http://www.msdevstudio.com" target="_blank">M&#225;rio Santos</a>, segue abaixo os links: </p>
<p>Parte I: <a href="http://msdevstudio.com/blog/download-manager.php?id=4">http://msdevstudio.com/blog/download-manager.php?id=4</a>    <br />Parte II: <a href="http://msdevstudio.com/blog/download-manager.php?id=3">http://msdevstudio.com/blog/download-manager.php?id=3</a>    <br />Parte III: <a href="http://msdevstudio.com/blog/download-manager.php?id=2">http://msdevstudio.com/blog/download-manager.php?id=2</a>    <br />Parte IV: <a href="http://msdevstudio.com/blog/download-manager.php?id=1">http://msdevstudio.com/blog/download-manager.php?id=1</a></p>
<p>Mais informa&#231;&#245;es no <a href="http://msdevstudio.com/blog/2008/04/08/adobe-flex-a-partir-do-zero-parte-iv/" target="_blank">aqui.</a> </p>
<p>Boa leitura a todos&#8230; </p>
<p>Abra&#231;os..</p>
<p>* Atualiza&#231;&#227;o realizada no dia 26/04, alterando os links conforme recomenda&#231;&#227;o do M&#225;rio Santos</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexdev.com.br/home/tutoriais-flex/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Blog Mario Junior</title>
		<link>http://www.flexdev.com.br/home/blog-mario-junior/</link>
		<comments>http://www.flexdev.com.br/home/blog-mario-junior/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 00:50:05 +0000</pubDate>
		<dc:creator>Ebercom</dc:creator>
				<category><![CDATA[Blogs]]></category>
		<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Tecnologia]]></category>
		<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://blog.flexdev.com.br/blog-mario-junior/</guid>
		<description><![CDATA[Entrou no ar a pouco tempo o blog do meu amigo Mario Junior, apesar dele ter lançado o site recentemente, já é um velho conhecido e colaborador das listas Flex e Java e por ai, inclusive é moderador de uma delas a Flex-Brasil, tarefa que cumpre com amor, dedicação e competencia. Indico a todos que [...]]]></description>
			<content:encoded><![CDATA[<p>Entrou no ar a pouco tempo o blog do meu amigo Mario Junior, apesar dele ter lançado o site recentemente, já é um velho conhecido e colaborador das listas Flex e Java e por ai, inclusive é moderador de uma delas a <a href="http://br.groups.yahoo.com/group/flex-brasil/" target="_blank">Flex-Brasil</a>, tarefa que cumpre com amor, dedicação e competencia.</p>
<p>Indico a todos que gostem de conteúdo com qualidade que visitem esse novo ponto obrigatório de todo profissional Flex. Segue o link:</p>
<p><a href="http://blog.mariojunior.com/" target="_blank">http://blog.mariojunior.com/</a></p>
<p>Parabéns Mario por mais essa prova de empenho em ajudar a comunidade Flex do Brasil.</p>
<p>Abraço a todos&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexdev.com.br/home/blog-mario-junior/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dicas Java</title>
		<link>http://www.flexdev.com.br/home/dicas-java/</link>
		<comments>http://www.flexdev.com.br/home/dicas-java/#comments</comments>
		<pubDate>Mon, 28 Jan 2008 12:54:01 +0000</pubDate>
		<dc:creator>Ebercom</dc:creator>
				<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Autoboxing]]></category>
		<category><![CDATA[Generics]]></category>

		<guid isPermaLink="false">http://blog.flexdev.com.br/dicas-java/</guid>
		<description><![CDATA[Navegando pelos tutoriais da vida na net, me deparei com um material legal sobre as já velhas Features do Java 5 ( tiger ), mas que muitas vezes nós usamos sem mesmo saber direito o que é. Dentre elas se destacam: Generics: Foi uma alteração feita para que os desenvolvedores pudessem &#8220;tipar&#8221; suas coleções, evitando [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.flexdev.com.br/blog/imagens/DicasJava/java.jpg" height="100" width="121" /></p>
<p>Navegando pelos tutoriais da vida na net, me deparei com um material legal sobre as já velhas Features do Java 5 ( tiger ), mas que muitas vezes nós usamos sem mesmo saber direito o que é. Dentre elas se destacam:</p>
<p>Generics:<br />
Foi uma alteração feita para que os desenvolvedores pudessem &#8220;tipar&#8221; suas coleções, evitando assim ter que ficar fazendo cast toda vez fossem utilizar algum elemento desta coleção. Mais detalhes nos link&#8217;s abaixo:</p>
<p><a href="http://www.devmedia.com.br/articles/viewcomp.asp?comp=3001" target="_blank">http://br.geocities.com/rafa2java/artigos/Java5/Generics.pdf</p>
<p>http://www.devmedia.com.br/articles/viewcomp.asp?comp=3001</a></p>
<p><a href="http://www.devmedia.com.br/articles/viewcomp.asp?comp=3061">http://www.devmedia.com.br/articles/viewcomp.asp?comp=3061</a></p>
<p>Enumerações:<br />
Uma enumeração é um tipo especial de classe que cria um novo tipo de dado com domínio pré-definido. Mais detalhes abaixo:</p>
<p><a href="http://br.geocities.com/rafa2java/artigos/Java5/Enums.pdf">http://br.geocities.com/rafa2java/artigos/Java5/Enums.pdf</a><a href="http://www.devmedia.com.br/articles/viewcomp.asp?comp=2051" target="_blank"></p>
<p>http://www.devmedia.com.br/articles/viewcomp.asp?comp=2051</a></p>
<p>Autoboxing e Unboxing:<br />
Recurso  o qual permite a atribuição direta de tipo primitivos a suas respectivas classes Wrappers. Segue alguns links abaixo:</p>
<p><a href="http://www.devmedia.com.br/articles/viewcomp.asp?comp=2051" target="_blank">http://www.devmedia.com.br/articles/viewcomp.asp?comp=2051</p>
<p>http://br.geocities.com/rafa2java/artigos/Java5/Autoboxing.pdf</a></p>
<p>Nova maneira de laço for (melhorado):</p>
<p><a href="http://www.devmedia.com.br/articles/viewcomp.asp?comp=2051" target="_blank">http://www.devmedia.com.br/articles/viewcomp.asp?comp=2051</a></p>
<p>Bom pessoal, sei que existem várias outras melhorias que não citei aqui mas fica ai a dica.</p>
<p>Abraços&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexdev.com.br/home/dicas-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Forum Flex</title>
		<link>http://www.flexdev.com.br/home/forum-flex/</link>
		<comments>http://www.flexdev.com.br/home/forum-flex/#comments</comments>
		<pubDate>Wed, 16 Jan 2008 23:46:33 +0000</pubDate>
		<dc:creator>Ebercom</dc:creator>
				<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[FlexBrasil]]></category>
		<category><![CDATA[Forum Flex]]></category>

		<guid isPermaLink="false">http://blog.flexdev.com.br/forum-flex/</guid>
		<description><![CDATA[Pessoal&#8230; É com muita alegria que venho divulgar mais um canal de disseminação da tecnologia Flex no Brasil, é o mais novo forum FlexBrasil, o qual foi criado hoje com o apoio do nosso amigo Digows. Espero que todos vão correndo se registrar, para que possam contribuir também com mais essa iniciativa da comunidade Flex [...]]]></description>
			<content:encoded><![CDATA[<p>Pessoal&#8230;</p>
<p>É com muita alegria que venho divulgar mais um canal de disseminação da tecnologia Flex no Brasil, é o mais novo forum <a href="http://forum.flexbrasil.com.br">Flex</a><a href="http://forum.flexbrasil.com.br">Brasil</a>, o qual foi criado hoje com o apoio do nosso amigo <a href="http://www.digows.com/" target="_blank">Digows</a>. Espero que todos vão correndo se registrar, para que possam contribuir também com mais essa iniciativa da comunidade Flex do Brasil, mas que ainda continuem com as já conhecidas listas <a href="http://www.flexbrasil.org" target="_blank">Flex-Brasil</a> e <a href="http://www.listaflexdev.org" target="_blank">FlexDev</a>.</p>
<p>Abraços a todos.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexdev.com.br/home/forum-flex/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Desabilitando um intervalo de datas</title>
		<link>http://www.flexdev.com.br/home/desabilitando-um-intervalo-de-datas/</link>
		<comments>http://www.flexdev.com.br/home/desabilitando-um-intervalo-de-datas/#comments</comments>
		<pubDate>Wed, 09 Jan 2008 00:59:59 +0000</pubDate>
		<dc:creator>Ebercom</dc:creator>
				<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[DateChooser]]></category>
		<category><![CDATA[datefield]]></category>
		<category><![CDATA[disableRanges]]></category>

		<guid isPermaLink="false">http://blog.flexdev.com.br/desabilitando-um-intervalo-de-datas/</guid>
		<description><![CDATA[Olá pessoal.... Bem 2008 já chegou as festas já se passaram, o jeito agora é trabalhar... hehe Vamos lá, hoje vou dar uma dica bem interessante pra voces, se trata de uma propridade presente nos componentes usados para trabalhar com datas no Flex como por exemplo o DateChooser e o DateField, ambos tem uma propriedade [...]]]></description>
			<content:encoded><![CDATA[<p>Olá pessoal....</p>
<p>Bem 2008 já chegou as festas já se passaram, o jeito agora é trabalhar... hehe</p>
<p>Vamos lá, hoje vou dar uma dica bem interessante pra voces, se trata de uma propridade presente nos componentes usados para trabalhar com datas no Flex como por exemplo o DateChooser e o DateField, ambos tem uma propriedade chamada disabledRanges="" a qual tem a finalidade de desabilitar um espaço de tempo para que não possa ser selecionado pelo usuário, imagine que você tem que criar uma aplicação de reservas de alguma coisa filmes, livros, quartos, etc... então parto do princípio que não se pode reservar algo para uma data anterior a data atual.</p>
<p>Esta propriedade recebe como parametro um array de datas no seguinte formato</p>
<div class="igBar"><span id="lxml-5"><a href="#" onclick="javascript:showPlainTxt('xml-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-5">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">disabledRanges=&quot;{[ {rangeStart: new Date(2008,0,15), rangeEnd: new Date(2008,0,20)} ]}&quot; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>que quer dizer, desabilite as data que compreender o espaço de tempo entre o dia 15/01/2008 ( new Date(2008,0,15) ) até 20/01/2008 ( new Date(2008,0,20) ).</p>
<p>Então vamos la, para desabilitar as datas anteriores a atual...</p>
<p>Insira no seu projeto o campo que necessita para trabalhar com datas, no caso vou colocar os dois acima citados.</p>
<div class="igBar"><span id="lxml-6"><a href="#" onclick="javascript:showPlainTxt('xml-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-6">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx</span>:application xmlns:<span style="color: #000066;">mx</span>=<span style="color: #ff0000;">"http://www.adobe.com/2006/mxml"</span> <span style="color: #000066;">layout</span>=<span style="color: #ff0000;">"absolute"</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">"190"</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">"232"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx</span>:datechooser <span style="color: #000066;">x</span>=<span style="color: #ff0000;">"10"</span> <span style="color: #000066;">y</span>=<span style="color: #ff0000;">"10"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx</span>:datefield <span style="color: #000066;">x</span>=<span style="color: #ff0000;">"48"</span> <span style="color: #000066;">y</span>=<span style="color: #ff0000;">"198"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/mx</span>:datefield<span style="font-weight: bold; color: black;">&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></mx:datechooser></mx:application></p>
<p>Então inclua a propriedade disableRanges:</p>
<div class="igBar"><span id="lxml-7"><a href="#" onclick="javascript:showPlainTxt('xml-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-7">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">disabledRanges =&quot;{[ {rangeEnd: new Date(new Date().getTime() - 86400000)} ]}&quot; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>que quer dizer, desabilite as datas até a data de hoje - 1 dia em milissegundos (new Date().getTime() - 86400000), e é isso ai.</p>
<p>O código completo fica assim:</p>
<div class="igBar"><span id="lxml-8"><a href="#" onclick="javascript:showPlainTxt('xml-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-8">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx</span>:application xmlns:<span style="color: #000066;">mx</span>=<span style="color: #ff0000;">"http://www.adobe.com/2006/mxml"</span> <span style="color: #000066;">layout</span>=<span style="color: #ff0000;">"absolute"</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">"252"</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">"232"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx</span>:datechooser <span style="color: #000066;">x</span>=<span style="color: #ff0000;">"39"</span> <span style="color: #000066;">y</span>=<span style="color: #ff0000;">"10"</span> <span style="color: #000066;">disabledranges</span>=<span style="color: #ff0000;">"{[ {rangeEnd: new Date(new Date().getTime() - 86400000)} ]}"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx</span>:datefield <span style="color: #000066;">x</span>=<span style="color: #ff0000;">"77"</span> <span style="color: #000066;">y</span>=<span style="color: #ff0000;">"198"</span> <span style="color: #000066;">disabledranges</span>=<span style="color: #ff0000;">"{[ {rangeStart: new Date(2008,0,15), rangeEnd: new Date(2008,0,20)} ]}"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/mx</span>:datefield<span style="font-weight: bold; color: black;">&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></mx:datechooser></mx:application></p>
<p>Para verificar como ficou a aplicação clique <a href="http://www.flexdev.com.br/progs/disableRanges/bin/">aqui</a>.</p>
<p>Esta é apenas uma pequena demonstração, para se aprofundar pode consultar a documentação <a href="http://livedocs.adobe.com/flex/2/langref/mx/controls/DateChooser.html" target="_blank">aqui</a>.</p>
<p>Abraços a todos.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexdev.com.br/home/desabilitando-um-intervalo-de-datas/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TomCast</title>
		<link>http://www.flexdev.com.br/home/tomcast/</link>
		<comments>http://www.flexdev.com.br/home/tomcast/#comments</comments>
		<pubDate>Tue, 11 Dec 2007 19:09:42 +0000</pubDate>
		<dc:creator>Ebercom</dc:creator>
				<category><![CDATA[Aplicativos]]></category>
		<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://blog.flexdev.com.br/tomcast/</guid>
		<description><![CDATA[Pessoal... O Carlos Eduardo da e-genial, e bota genial nisso, acaba de disponibilizar para todos sua mais nova aplicação que torna mais fácil a divulgação de videos na internet, e claro feito em Flex + FMS e Ruby on Rails, gostei de saber que num futuro não muito distante terá opção de divulgar screencasts... por [...]]]></description>
			<content:encoded><![CDATA[<p>Pessoal...</p>
<p>O Carlos Eduardo da e-genial, e bota genial nisso, acaba de disponibilizar para todos sua mais nova aplicação que torna mais fácil a divulgação de videos na internet, e claro feito em Flex + FMS e Ruby on Rails, gostei de saber que num futuro não muito distante terá opção de divulgar screencasts... por enquanto vamos testando e aguardando novas atualizações...</p>
<p>Parabéns Carlos...</p>
<p>Para conferir acessem [ <a href="http://www.tomcast.com.br" target="_blank">www.tomcast.com.br</a>  ]</p>
<p>Abraços a todos...</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexdev.com.br/home/tomcast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fechar janela PopUp do navegador</title>
		<link>http://www.flexdev.com.br/home/fechar-janela-popup-do-navegador/</link>
		<comments>http://www.flexdev.com.br/home/fechar-janela-popup-do-navegador/#comments</comments>
		<pubDate>Sun, 02 Dec 2007 21:54:31 +0000</pubDate>
		<dc:creator>Ebercom</dc:creator>
				<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.flexdev.com.br/blog/fechar-janela-popup-do-navegador/</guid>
		<description><![CDATA[Pessoal... Uma dica ai pra vocês que querem fazer um botão fechar no sistema. Usando o Flex e java script vamos fazer um botão para fechar uma janela popup do seu navegador... Vamos lá Primeiro criamos o nosso componente ou aplicação que vai acomodar um botão chamado Fechar. PLAIN TEXT XML: &#60;mx:application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="379" [...]]]></description>
			<content:encoded><![CDATA[<p>Pessoal...</p>
<p>Uma dica ai pra vocês que querem fazer um botão fechar no sistema. Usando o Flex e java script vamos fazer um botão para fechar uma janela popup do seu navegador... Vamos lá</p>
<p>Primeiro criamos o nosso componente ou aplicação que vai acomodar um botão chamado Fechar.</p>
<div class="igBar"><span id="lxml-12"><a href="#" onclick="javascript:showPlainTxt('xml-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-12">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx</span>:application xmlns:<span style="color: #000066;">mx</span>=<span style="color: #ff0000;">"http://www.adobe.com/2006/mxml"</span> <span style="color: #000066;">layout</span>=<span style="color: #ff0000;">"absolute"</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">"379"</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">"224"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx</span>:button <span style="color: #000066;">label</span>=<span style="color: #ff0000;">"Fechar"</span> <span style="color: #000066;">horizontalcenter</span>=<span style="color: #ff0000;">"0"</span> <span style="color: #000066;">verticalcenter</span>=<span style="color: #ff0000;">"0"</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"btnFechar"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/mx</span>:button<span style="font-weight: bold; color: black;">&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></mx:application></p>
<p>Após inserido o botão vamos criar a função que fara o trabalho de fechar o PopUp.</p>
<div class="igBar"><span id="lactionscript-13"><a href="#" onclick="javascript:showPlainTxt('actionscript-13'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-13">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">events</span>.<span style="color: #006600;">CloseEvent</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">controls</span>.<span style="color: #006600;">Alert</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//funcção que será chamada pelo botão.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> sair<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// Alerta que solicitará ao usuário se ele deseja realemente encerrar o programa.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Alert.<span style="color: #0066CC;">show</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Deseja encerrar o programa?"</span>,<span style="color: #ff0000;">"Encerrar"</span>, Alert.<span style="color: #006600;">YES</span> | Alert.<span style="color: #006600;">NO</span>, <span style="color: #0066CC;">this</span>, encerrar<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//funcão que é chamada pelo alert acima</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> encerrar<span style="color: #66cc66;">&#40;</span>event:CloseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//Caso a a resposta do usuário seja sim, dispara através do navigateToURL o codigo java script</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">detail</span>==Alert.<span style="color: #006600;">YES</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">navigateToURL<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"javascript:window.close()"</span><span style="color: #66cc66;">&#41;</span>, <span style="color: #ff0000;">"_self"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>E agora é colocar no evento click do botão a chamada para a função sair.</p>
<div class="igBar"><span id="lxml-14"><a href="#" onclick="javascript:showPlainTxt('xml-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-14">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx</span>:Button <span style="color: #000066;">label</span>=<span style="color: #ff0000;">"Fechar"</span> <span style="color: #000066;">horizontalCenter</span>=<span style="color: #ff0000;">"0"</span> <span style="color: #000066;">verticalCenter</span>=<span style="color: #ff0000;">"0"</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"btnFechar"</span> <span style="color: #000066;">click</span>=<span style="color: #ff0000;">"sair()"</span><span style="font-weight: bold; color: black;">/&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Para conferir o funcionamento clique <a href="http://www.flexdev.com.br/progs/closepopup/bin/">aqui</a>.</p>
<p>Para quem quiser conferir o arquivo main.mxml cliqui <a href="http://www.flexdev.com.br/blog/wp-content/uploads/2007/12/main.mxml" target="_blank">aqui</a>.</p>
<p>Bom é isso ai, mas lembre-se funciona apenas com PopUp, fiz alguns testes com janela normal e no IE ele tenta fechar a janela mas pede confirmação, ja no Firefox não consegue fechar. Mas fica ai a dica, e notem que também nessa aplicação você já consegue fazer uma coisa que é muito usada nas aplicações que é perguntar ao usuário se ele quer realizar determinada operação ou não, usando o Alert.</p>
<p>Caso alguém conheça outra forma compartilhe com a gente ai.</p>
<p>Abraços...</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexdev.com.br/home/fechar-janela-popup-do-navegador/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A mágica do [ Bindable ]</title>
		<link>http://www.flexdev.com.br/home/a-magica-do-bindable/</link>
		<comments>http://www.flexdev.com.br/home/a-magica-do-bindable/#comments</comments>
		<pubDate>Fri, 30 Nov 2007 20:18:44 +0000</pubDate>
		<dc:creator>Ebercom</dc:creator>
				<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Bindable]]></category>

		<guid isPermaLink="false">http://www.flexdev.com.br/blog/a-magica-do-bindable/</guid>
		<description><![CDATA[Pessoal.. Desde de que começei a utilizar Flex, venho usando uma palavrinha que até então me parecia que como um passe de mágica ela podia "avisar" que houve uma modificação nos objeto por ela "enfeitiçada". Eis que navegando pelas listas sobre Flex encontrei uma explicação que até agora não vi melhor. Ela foi dada pelo [...]]]></description>
			<content:encoded><![CDATA[<p>Pessoal..</p>
<p>Desde de que começei a utilizar Flex, venho usando uma palavrinha que até  então me parecia que como um passe de mágica ela podia "avisar" que houve uma  modificação nos objeto por ela "enfeitiçada". Eis que navegando pelas listas  sobre Flex encontrei uma explicação que até agora não vi melhor. Ela foi dada  pelo <a href="http://www.becklog.org/">Beck Novaes</a> e segue  abaixo para que todos possam compartilhar dessa que creio ser uma informação  muito esclarecedora.</p>
<p>Vamos lá...</p>
<p><span id="more-18"></span></p>
<p>##########################################################<br />
# Ministério  da Saúde Adverte: Este post será bem maior do que o  #<br />
# convencional e esta  explicação sobre o funcionamento viciante    #<br />
# do Data Binding pode fazer  o seu cérebro entrar em loop.            #<br />
#########################################################</p>
<p>O [Bindable] é uma Metadata Tag o que significa dizer que é uma<br />
instrução  para o compilador fazer alguma coisa. Neste caso você está<br />
falando para o  compilador gerar o código necessário para sua<br />
propriedade ser a fonte do  DataBinding.</p>
<p>O segredo do funcionamento do DataBinding está na classe<br />
"mx.binding.utils.ChangeWatcher". Esta classe se baseia em listeners<br />
para fazer a "mágica" do DataBinding.</p>
<p>Tomemos o seguinte trecho de código abaixo para facilitar a<br />
explicação:</p>
<div class="igBar"><span id="lxml-20"><a href="#" onclick="javascript:showPlainTxt('xml-20'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-20">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx</span>:textinput <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"tiSource"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx</span>:textinput <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"tiDestination"</span> <span style="color: #000066;">text</span>=<span style="color: #ff0000;">"{tiSource.text}"</span><span style="font-weight: bold; color: black;">&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/mx</span>:textinput<span style="font-weight: bold; color: black;">&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Neste exemplo, toda vez que o usuário digitar algo no TextInput<br />
"tiSource" isto será automaticamente copiado para o TextInput<br />
"tiDestination".</p>
<p>Isto é possível porque a propriedade "text" é Bindable. Como tal, toda<br />
vez que esta propriedade mudar ela distribuirá um evento - que neste<br />
caso é chamado de "textChanged". Graças ao ChangeWatcher, que é usado<br />
implicitamente toda vez que usamos as chaves {} para determinar o<br />
Binding, será criado automaticamente um EventHandler para tratar este<br />
evento "textChanged". A implementação deste EventHandler pegará o<br />
valor  do "text" de "tiSource" e copiará para o "text" de<br />
"tiDestination".</p>
<p>Em outras palavras, a mágica do DataBinding é um código que é gerado<br />
automaticamente pelo compilador do Flex que se baseia na arquitetura<br />
Listener - Handler que já conhecemos: alguém distribui um evento e<br />
alguém ouve para fazer alguma coisa. Neste caso uma propriedade muda,<br />
e  um código gerado automaticamente através de uma sintaxe predefinida<br />
(chaves{}) copia o valor desta propriedade para outra.</p>
<p>Eu fiz um teste no Flex usando a opção keep-generated-<br />
actionscript=true   com uma propriedade Bindable e o resultado segue<br />
abaixo.</p>
<p>Test.mxml<br />
========</p>
<div class="igBar"><span id="lxml-21"><a href="#" onclick="javascript:showPlainTxt('xml-21'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-21">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx</span>:application xmlns:<span style="color: #000066;">mx</span>=<span style="color: #ff0000;">"http://www.adobe.com/2006/mxml"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">width=&quot;100%&quot; height=&quot;100%&quot;&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx</span>:Script<span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #339933;">&lt;![CDATA[</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">[Bindable]</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">private var&nbsp; myProp:String;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">]]&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/mx</span>:Script<span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/mx</span>:Application<span style="font-weight: bold; color: black;">&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
_Test-binding-generated.as (Código gerado pelo compilador Flex)<br />
======================================================</p>
<div class="igBar"><span id="lactionscript-22"><a href="#" onclick="javascript:showPlainTxt('actionscript-22'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-22">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">class</span>&nbsp; BindableProperty</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span>&lt;/mx:application&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#91;</span>Bindable<span style="color: #66cc66;">&#40;</span>event=<span style="color: #ff0000;">"propertyChange"</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span>&nbsp; myProp<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">String</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">return</span> <span style="color: #0066CC;">this</span>._1060147409myProp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> myProp<span style="color: #66cc66;">&#40;</span>value:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span>&nbsp; oldValue:<span style="color: #0066CC;">Object</span> = <span style="color: #0066CC;">this</span>._1060147409myProp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>oldValue !== value<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">this</span>._1060147409myProp = value;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">dispatchEvent<span style="color: #66cc66;">&#40;</span>mx.<span style="color: #006600;">events</span>.<span style="color: #006600;">PropertyChangeEvent</span>.<span style="color: #006600;">createUpdateEvent</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">"myProp"</span>, oldValue, value<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Ou seja, o usar o [Bindable] o compilador Flex gerou o arquivo "_Test-<br />
binding-generated.as" cujo conteúdo pode ser visto acima. Observe que<br />
no  "set" da propriedade um evento é disparado. No MXML acima se a<br />
propriedade  "myProp " não fosse Bindable este código não seria gerado.<br />
Mas isso é só uma  parte do funcionamento do Bindable. Ainda é preciso<br />
definir o que irá  acontecer toda vez que o "myProp" mudar.</p>
<p>Primeiramente apenas definimos a propriedade como Bindable. Agora<br />
vamos  usá-la.</p>
<p>Test.mxml<br />
========</p>
<div class="igBar"><span id="lxml-23"><a href="#" onclick="javascript:showPlainTxt('xml-23'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-23">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;</span>?xml <span style="color: #000066;">version</span>=<span style="color: #ff0000;">"1.0"</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">"utf-8"</span>?<span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx</span>:Application&nbsp; xmlns:<span style="color: #000066;">mx</span>=<span style="color: #ff0000;">"http://www.adobe.com/2006/mxml"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066;">width</span>=<span style="color: #ff0000;">"100%"</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">"100%"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx</span>:Script<span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #339933;">&lt;![CDATA[</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">[Bindable]</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">private var&nbsp; myProp:String;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">]]&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/mx</span>:Script<span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx</span>:TextInput <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"myTextInput"</span> <span style="color: #000066;">text</span>=<span style="color: #ff0000;">"{myProp}"</span><span style="font-weight: bold; color: black;">/&gt;</span></span> <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- USANDO&nbsp; O</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">BINDING --&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/mx</span>:Application<span style="font-weight: bold; color: black;">&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Agora, outro trecho de código gerado pelo Flex, desta vez no arquivo<br />
"Test-generated.as" é o seguinte:</p>
<p>Test-generated.as<br />
===============</p>
<div class="igBar"><span id="lactionscript-24"><a href="#" onclick="javascript:showPlainTxt('actionscript-24'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-24">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> _Test_bindingsSetup<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">...</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #006600;">binding</span> = <span style="color: #000000; font-weight: bold;">new</span>&nbsp; mx.<span style="color: #006600;">binding</span>.<span style="color: #006600;">Binding</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">String</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> result:* = <span style="color: #66cc66;">&#40;</span>myProp<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span>&nbsp; stringResult:<span style="color: #0066CC;">String</span> = <span style="color: #66cc66;">&#40;</span>result == <span style="color: #0066CC;">undefined</span> ?</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">null</span> : <span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#40;</span>result<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">return</span> stringResult;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>_sourceFunctionReturnValue:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">myTextInput.<span style="color: #0066CC;">text</span> = _sourceFunctionReturnValue;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">"myTextInput.text"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">...</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Quem quiser entender o que faz cada linha do trecho de código acima<br />
pode  olhar no código fonte da classe mx.binding. Binding. Mas em<br />
resumo, é este  trecho de código que pega o valor de "myProp" toda vez<br />
que ele mudar e copia  para "myTextInput.text".</p>
<p>Bom pessoal espero que essa explicação dada pelo nosso amigo Beck Novaes  possa ser tão esclarecedora pra voces o quanto foi pra mim...</p>
<p>Abraços...</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexdev.com.br/home/a-magica-do-bindable/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Traduzindo componentes do Flex 2.0</title>
		<link>http://www.flexdev.com.br/home/traduzindo-componentes-flex-2/</link>
		<comments>http://www.flexdev.com.br/home/traduzindo-componentes-flex-2/#comments</comments>
		<pubDate>Tue, 27 Nov 2007 03:18:52 +0000</pubDate>
		<dc:creator>Ebercom</dc:creator>
				<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[tradução]]></category>
		<category><![CDATA[traduzindo]]></category>

		<guid isPermaLink="false">http://www.flexdev.com.br/blog/?p=16</guid>
		<description><![CDATA[Pessoal... Vou passar uma dica agora que tenho certeza que todos vão gostar. Uma maneira de traduzir definitivamente os componentes do Flex, como DateField, Alert, DateChooser, etc... Vamos lá... Primeiro baixe o arquivo zipado que contem todas as traduções, na realidade essa é uma cópia da pasta locale que se encontra dentro da pasta de [...]]]></description>
			<content:encoded><![CDATA[<p>Pessoal...</p>
<p>Vou passar uma dica agora que tenho certeza que todos vão gostar.<br />
Uma maneira de traduzir definitivamente os componentes do Flex, como DateField, Alert, DateChooser, etc...</p>
<p>Vamos lá...</p>
<p>Primeiro baixe o arquivo zipado que contem todas as traduções, na realidade essa é uma cópia da pasta locale que se encontra dentro da pasta de instalação do Flex, com algumas alterações como por exemplo de en_US para pt_BR.</p>
<p>Você pode baixar o arquivo clicando <a href="http://www.flexdev.com.br/blog/arquivos/locale.zip">aqui</a>.</p>
<p>Logo depois descompacte esse arquivo dentro da pasta do seu projeto, por exemplo se a pasta do seu projeto for a c:\projetos\flexdev o conteúdo do arquivo deve ficar dentro dessa pasta. Feito isso você notará que foi criada mais uma pasta, no diretório do seu projeto, chamada locale.</p>
<p>Após descompactar o arquivo você deve mudar algumas diretivas de compilação do seu projeto, para isso abra seu projeto seja ele no eclipse com plugin ou no Flex Builder e clique com o botão direito sobre o projeto, escolha properties</p>
<p><a href="http://www.flexdev.com.br/blog/imagens/TraduodecomponentesFlex2.0_1247/post1.jpg"><img src="http://www.flexdev.com.br/blog/imagens/TraduodecomponentesFlex2.0_1247/post1_thumb.jpg" alt="post1" style="border-width: 0px" border="0" height="431" width="300" /></a></p>
<p>depois clique em "Flex Compiler", altere a linha "Additional compiler arguments" para "-locale pt_BR -source-path locale/{locale}"</p>
<p><a href="http://www.flexdev.com.br/blog/imagens/TraduodecomponentesFlex2.0_1247/post2.jpg"><img src="http://www.flexdev.com.br/blog/imagens/TraduodecomponentesFlex2.0_1247/post2_thumb.jpg" alt="post2" style="border-width: 0px" border="0" height="491" width="563" /></a></p>
<p>logo depois recompile seu projeto e veja que os componentes já estão traduzidos, e todos os novos que você adicionar já estarão traduzidos.</p>
<p>Bom pessoal é isso... uma dica simples mas que com certeza vai acabar com os yes e no da vida ai...</p>
<p>Abraços..</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexdev.com.br/home/traduzindo-componentes-flex-2/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Customizando Preloader ( loading&#8230; )</title>
		<link>http://www.flexdev.com.br/home/customizando-preloader-loading/</link>
		<comments>http://www.flexdev.com.br/home/customizando-preloader-loading/#comments</comments>
		<pubDate>Fri, 23 Nov 2007 11:55:58 +0000</pubDate>
		<dc:creator>Ebercom</dc:creator>
				<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.flexdev.com.br/blog/?p=15</guid>
		<description><![CDATA[Pessoal... Através de uma pergunta feita na lista Flex Brasil, cheguei a um post interessante e simples feito por Rubens Albuquerque, ele ensina de maneira simples e rápida como traduzir a tela que antecede a sua aplicação, lembrando que você pode altera-la totalmente... Customizando o Preloader no Flex 2  Abraços...]]></description>
			<content:encoded><![CDATA[<p>Pessoal...</p>
<p>Através de uma pergunta feita na lista Flex Brasil, cheguei a um post interessante e simples feito por Rubens Albuquerque, ele ensina de maneira simples e rápida como traduzir a tela que antecede a sua aplicação, lembrando que você pode altera-la totalmente...</p>
<p><a href="http://blog.dclick.com.br/2007/02/22/customizando-o-preloader-flex-2/">Customizando o Preloader no Flex 2 </a></p>
<p>Abraços...</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexdev.com.br/home/customizando-preloader-loading/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
