<?xml version="1.0" encoding="ISO-8859-1"?>
<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>Gabriela Trindade Perry: HCI, Design Cognition, Flex &#187; Add new tag</title>
	<atom:link href="http://www.gabriela.trindade.nom.br/tag/add-new-tag/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gabriela.trindade.nom.br</link>
	<description></description>
	<lastBuildDate>Sun, 09 Jan 2011 15:28:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
		<item>
		<title>Drag n&#8217; drop List Canvas and vice versa</title>
		<link>http://www.gabriela.trindade.nom.br/2009/04/drag-n-drop-list-canvas-and-vice-versa/</link>
		<comments>http://www.gabriela.trindade.nom.br/2009/04/drag-n-drop-list-canvas-and-vice-versa/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 14:22:20 +0000</pubDate>
		<dc:creator>gabrielaperry</dc:creator>
				<category><![CDATA[Aplicativos]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Add new tag]]></category>

		<guid isPermaLink="false">http://www.gabriela.trindade.nom.br/?p=293</guid>
		<description><![CDATA[Esse post está em inglês e português. This post is in english and portuguese. Drag n´drop operations in Flex are piece of cake. When we´re using ListBase we dont even have to get our hands dirty with any code&#8230; When we dont have a ListBase control&#8230; well, it remains simple enough&#8230; Albeit, I think I [...]]]></description>
			<content:encoded><![CDATA[<p>Esse post está em inglês e português.</p>
<p>This post is in english and portuguese.</p>
<p><span id="more-293"></span>Drag n´drop operations in Flex are piece of cake. When we´re using ListBase we dont even have to get our hands dirty with any code&#8230; When we dont have a ListBase control&#8230; well, it remains simple enough&#8230; Albeit, I think I have the right to complain about somethings I dont like as the lack of standatrization for the hasFormat() argument: why in earth it has to be &#8220;items&#8221;! It seems lazy&#8230; Another issue is: why didnt they code to an interface when writting Flex and AIR Managers? For those who are not keen to DD operations: Flex and AIR have different ways of manipulating dragged data. Flex uses DragManager and AIR uses NativeDragManager. Theres a lot of info &#8211; either in the web and in the docs &#8211; about it, but, come on, it´s a pain&#8230; Theres also <a href="http://blog.creacog.co.uk/2008/02/25/dragmanager-workaround-in-final-flex3air1/" target="_blank">creacog´s</a> (elegant) solution, but&#8230; I dont want to raise all those classes to do a simple thing&#8230;</p>
<p>The last item in my complain list is probably due to my mistake, but the only way I could make the drag operation from the Canvas back to the List was overriding a ListBase method that kept on throwing an error beacuse my dragSource.dataForFormat was null. The case is: it´s NOT and Array!! So I overwrote it and it works&#8230;</p>
<p>Pretty easy, hun?</p>
<p>Anyways, check it <a href="/arquivos/car/car.html" target="_blank">here</a>. The AIR version is posted <a href="/?p=264" target="_blank">here</a>.</p>
<p>/******************************************************/</p>
<p>Drag n´drop no Flex é muito simples. Quando estamos usando controls baseados em ListBase não tem sequer que sujar as mãos com código &#8230; E quando não temos um control baseado em ListBase &#8230; Bem, continua bastante simples &#8230; Porém, acho que tenho o direito de reclamar de algumas coisas que eu não gosto, como a falta de padronização do argumento hasFormat () : por que diabos tem que ser &#8220;itens&#8221;! Parece preguiçoso &#8230; Outra questão é: por que eles não programaram para uma interface quando escreveram os managers do Flex e do AIR? Para aqueles que não estão familizarizados com operações DD: Flex e AIR tem diferentes formas de manipulação de dados arrastados. Flex utiliza DragManager e AIR usa NativeDragManager. Há um monte de informações &#8211; na web e nos docs &#8211; sobre isso, mas, por favor &#8230; Há também a solução (elegante) do <a href="http://blog.creacog.co.uk/2008/02/25/dragmanager-workaround-in-final-flex3air1/" target="_blank">creacog</a>, mas &#8230; Eu não quero levantar todas essas classes para fazer uma coisa simples &#8230;</p>
<p>O último item na minha lista de queixas é provavelmente devido a algum erro meu, mas a única maneira que eu consegui fazer a operação de arrastar de um Canvas de volta para um List foi sobrescrever um método  de  ListBase, que ficava dando um erro porque o meu dragSource.dataForFormat era nulo (ListBase.dragDropHandler, l:9212). O caso é: não é e Array! Então eu sobrescrevi e ele funciona &#8230;</p>
<p>Muito fácil, hun?</p>
<p>Enfim, veja o app <a href="/arquivos/car/car.html" target="_self">aqui</a>. A versão AIR está <a href="/?p=264" target="_blank">aqui</a>.</p>
<p>/****************************************************/</p>
<p>That´s the pice of code Im talking bout:<br />
[code lang="actionscript"]<br />
for (i = items.length - 1; i >= 0; i--) //it´s NOT an Array! It doesnt have lenght!!!!<br />
[/code]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gabriela.trindade.nom.br/2009/04/drag-n-drop-list-canvas-and-vice-versa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

