<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Generating Flex Methods</title>
	<atom:link href="http://blogs.jetbrains.com/idea/2009/10/flex-methods-generation/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.jetbrains.com/idea/2009/10/flex-methods-generation/</link>
	<description>tips &#38; tricks, news, how-to's</description>
	<pubDate>Mon, 13 Feb 2012 07:54:29 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
		<item>
		<title>By: Nick S</title>
		<link>http://blogs.jetbrains.com/idea/2009/10/flex-methods-generation/#comment-127649</link>
		<dc:creator>Nick S</dc:creator>
		<pubDate>Thu, 04 Mar 2010 19:35:16 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.jetbrains.com/idea/?p=2151#comment-127649</guid>
		<description>This is fantastic..it is an essential part of an IDE..the ability to code generate, which is sorely lacking in Flex/Flash Builder.  

I do have one thought on something else which can be added to this to make it even more useful.  A lot of the time when Flex developers are using getters/setters it is so that we can hook into calling invalidateDisplayList/invalidateProperites/etc.  A big part of this is setting a flag so that when the call to commitProperties/etc is invoked, it can check for those flags and act accordingly.

The basic format is as follows:

private var _foo:Object;
private var _fooChanged:Boolean = false;

public function set foo(value:Object):void
{
    _foo = value;
   _fooChanged = true;
   invalidateProperties();
}

public function get foo():Object
{
    return _foo;
}

...

override protected function commitProperties()
{
    super.commitProperties();
    if(fooChanged)....
}

If there were some way to generate the getters/setters where they include that accompanying boolean flag as well as call one or more of the invalidatexxx functions..that would be MONEY!  I can't tell you how many times I write that!

Bonus points if you can add the fooChanged..block to the function which we are scheduling a call to.


Another awesome thing would be to highlight a public var and then convert it to this private getter/setter format(and vice versa)

Thanks!</description>
		<content:encoded><![CDATA[<p>This is fantastic..it is an essential part of an IDE..the ability to code generate, which is sorely lacking in Flex/Flash Builder.  </p>
<p>I do have one thought on something else which can be added to this to make it even more useful.  A lot of the time when Flex developers are using getters/setters it is so that we can hook into calling invalidateDisplayList/invalidateProperites/etc.  A big part of this is setting a flag so that when the call to commitProperties/etc is invoked, it can check for those flags and act accordingly.</p>
<p>The basic format is as follows:</p>
<p>private var _foo:Object;<br />
private var _fooChanged:Boolean = false;</p>
<p>public function set foo(value:Object):void<br />
{<br />
    _foo = value;<br />
   _fooChanged = true;<br />
   invalidateProperties();<br />
}</p>
<p>public function get foo():Object<br />
{<br />
    return _foo;<br />
}</p>
<p>&#8230;</p>
<p>override protected function commitProperties()<br />
{<br />
    super.commitProperties();<br />
    if(fooChanged)&#8230;.<br />
}</p>
<p>If there were some way to generate the getters/setters where they include that accompanying boolean flag as well as call one or more of the invalidatexxx functions..that would be MONEY!  I can&#8217;t tell you how many times I write that!</p>
<p>Bonus points if you can add the fooChanged..block to the function which we are scheduling a call to.</p>
<p>Another awesome thing would be to highlight a public var and then convert it to this private getter/setter format(and vice versa)</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Taras Tielkes</title>
		<link>http://blogs.jetbrains.com/idea/2009/10/flex-methods-generation/#comment-120278</link>
		<dc:creator>Taras Tielkes</dc:creator>
		<pubDate>Sat, 28 Nov 2009 14:13:18 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.jetbrains.com/idea/?p=2151#comment-120278</guid>
		<description>It would be nice if the order of the "generate..." entries was not totally different from the Java editor. It's a small detail, but quite annoying.

http://youtrack.jetbrains.net/issue/IDEA-25806</description>
		<content:encoded><![CDATA[<p>It would be nice if the order of the &#8220;generate&#8230;&#8221; entries was not totally different from the Java editor. It&#8217;s a small detail, but quite annoying.</p>
<p><a href="http://youtrack.jetbrains.net/issue/IDEA-25806" rel="nofollow">http://youtrack.jetbrains.net/issue/IDEA-25806</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kenton</title>
		<link>http://blogs.jetbrains.com/idea/2009/10/flex-methods-generation/#comment-118224</link>
		<dc:creator>kenton</dc:creator>
		<pubDate>Fri, 23 Oct 2009 14:38:30 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.jetbrains.com/idea/?p=2151#comment-118224</guid>
		<description>Very nice!</description>
		<content:encoded><![CDATA[<p>Very nice!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

