<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>FLEXYGEN</title>
	<atom:link href="http://flexygen.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://flexygen.wordpress.com</link>
	<description>Adobe Flex and AIR development</description>
	<lastBuildDate>Sat, 01 Jan 2011 19:16:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='flexygen.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>FLEXYGEN</title>
		<link>http://flexygen.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://flexygen.wordpress.com/osd.xml" title="FLEXYGEN" />
	<atom:link rel='hub' href='http://flexygen.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Immutability and Binding</title>
		<link>http://flexygen.wordpress.com/2008/05/21/immutability-and-binding/</link>
		<comments>http://flexygen.wordpress.com/2008/05/21/immutability-and-binding/#comments</comments>
		<pubDate>Wed, 21 May 2008 04:08:40 +0000</pubDate>
		<dc:creator>richard</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://flexygen.wordpress.com/?p=10</guid>
		<description><![CDATA[An application I am developing makes heavy use of date ranges. I created a a simple DateRange class containing start and end dates. Besides being stored in models, date ranges are used in events and passed around to controller and service methods. I didn&#8217;t like the idea of using a relatively heavyweight subclass of EventDispatcher [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexygen.wordpress.com&amp;blog=2334499&amp;post=10&amp;subd=flexygen&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>An application I am developing makes heavy use of date ranges. I created a a simple DateRange class containing start and end dates. Besides being stored in models, date ranges are used in events and passed around to controller and service methods. I didn&#8217;t like the idea of using a relatively heavyweight subclass of EventDispatcher for these purposes, so I chose not to make DateRange bindable. But I went a step further and made it an immutable class, with no setters. This won&#8217;t be everyone&#8217;s cup of tea, but is common in the Java world, where immutable objects can help out with thread-safety, obviously not an issue in Flex.</p>
<p>At first, I created a companion wrapper class BindableDateRange for use in models, but it became rather messy. In the course of re-factoring it away, I ran into the well-known warning:</p>
<p>warning: unable to bind to property &#8216;start&#8217; on class &#8216;DateRange&#8217; (class is not an IEventDispatcher)</p>
<p>In one MXML component, I was binding to the start property:</p>
<p>&lt;mx:DateField selectedDate=&#8221;{range.start}&#8221; change=&#8221;useDate(event)&#8221; /&gt;</p>
<p>But, but, but &#8220;range&#8221; is what changes! Why can&#8217;t I bind to &#8220;range.start&#8221;? Well, you can. Once I got rid of a few unrelated bugs, I was able to verify that the binding was working (i.e. the DateField updated when the range changed. To get rid of the warning, I had to create [Bindable] getters for &#8220;start&#8221; and &#8220;end&#8221; within the component itself, and replace the expression with {this.start}. Unfortunate, but there you have it.</p>
<p>Update: It appears that another way to get rid of the warning is to add [Bindable(event="startChanged"] to the  getter for the &#8220;start&#8221; property, without necessarily deriving from EventDispatcher (which is unnecessary since events aren&#8217;t dispatched for this read-only property).</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/flexygen.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/flexygen.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flexygen.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flexygen.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flexygen.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flexygen.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flexygen.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flexygen.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flexygen.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flexygen.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flexygen.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flexygen.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flexygen.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flexygen.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flexygen.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flexygen.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexygen.wordpress.com&amp;blog=2334499&amp;post=10&amp;subd=flexygen&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flexygen.wordpress.com/2008/05/21/immutability-and-binding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/694e59d7efd69a8dabb466e51da61f0a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">richard</media:title>
		</media:content>
	</item>
		<item>
		<title>Shapes and Sprites</title>
		<link>http://flexygen.wordpress.com/2008/03/27/shapes-and-sprites/</link>
		<comments>http://flexygen.wordpress.com/2008/03/27/shapes-and-sprites/#comments</comments>
		<pubDate>Thu, 27 Mar 2008 19:15:42 +0000</pubDate>
		<dc:creator>richard</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://flexygen.wordpress.com/?p=9</guid>
		<description><![CDATA[In recent weeks I&#8217;ve been diving into the world of Flex custom components, and the drawing APIs. Many years ago I worked on the Transform Panel in InDesign, but it&#8217;s been a while since I did any graphics-intensive programming. It&#8217;s great fun building slick user experiences with the standard Flex components, but I&#8217;d also love [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexygen.wordpress.com&amp;blog=2334499&amp;post=9&amp;subd=flexygen&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In recent weeks I&#8217;ve been diving into the world of Flex custom components, and the drawing APIs. Many years ago I worked on the Transform Panel in InDesign, but it&#8217;s been a while since I did any graphics-intensive programming. It&#8217;s great fun building slick user experiences with the standard Flex components, but I&#8217;d also love to work on a juicy RIA like Buzzword or SproutBuilder.</p>
<p>One of my personal projects is a board game. I have the board (a subclass of UIComponent) rendering a collection of tiles, which are subclasses of Sprite. It was necessary (I think) to use Sprite, because each tile has a child text label and the underlying Graphics object doesn&#8217;t have any sort of drawText() method. The next step was to look at handling selection and dragging of tiles.</p>
<p>Chet Haase recently joined the Flex SDK team and posted a drawing sample called TopDrawer on his <a href="http://graphics-geek.blogspot.com/">blog</a>. This was most helpful! TopDrawer has an ArtCanvas class (also a UIComponent), and the drawn shapes (rectangles, lines etc.) are represented by subclasses of Shape added as children of the canvas.</p>
<p>I cheerfully copied a couple of lines from the ArtCanvas event handler for MouseDown events:</p>
<pre class="brush: java;">
            	var selectPoint:Point = localToGlobal(new Point(event.localX, event.localY));
                for each (var shape:ArtShape in shapes)
                {
                    if (shape.hitTestPoint(selectPoint.x, selectPoint.y, true))
                    {
                        selectShape(shape);
                        break;
                    }
                }
</pre>
<p>In my game, the hitTestPoint() call did not succeed when I clicked on a tile (a Sprite) but did, if I changed it to a Shape. The simple fix was to call event.target.localToGlobal(). So one difference between Sprites and Shapes is that a child Sprite may be the &#8220;target&#8221; property of a MouseEvent, but a Shape won&#8217;t. The code worked in TopDrawer because the the shapes are Shapes, and the localX and localY properties were already in the coordinate system of the ArtCanvas.</p>
<p>Before I figured this out, I tried to create an AS3-only test case with a Shape child and Sprite child. The mouse event handler wasn&#8217;t even reached. I learned (via O&#8217;Reiily&#8217;s AS3 Cookbook) that the main application class does not receive mouse events, though it does receive enterFrame, for example. So here&#8217;s a one-file non-object-oriented test that does work as expected. You can pop this in an AS3-only FlexBuilder project and run it in the debugger. I hope this is helpful to someone.</p>
<pre class="brush: java;">

package {
    import flash.display.Shape;
    import flash.display.Sprite;
    import flash.events.MouseEvent;
    import flash.geom.Point;

    // Testing Hit detection

    public class TestHitDetection extends Sprite
    {
        private var _rootSprite:Sprite;
        private var _circleSprite:Sprite;
        private var _circleShape:Shape; 

        public function TestHitDetection()
        {
            super();

            _rootSprite = new Sprite(); // This is necessary because the main application class does not receive mouse events
            _rootSprite.x = 50;
            _rootSprite.y = 50;

            _rootSprite.graphics.beginFill(0xDDDDDD);
            _rootSprite.graphics.drawRect(0,0,500,500);
            _rootSprite.graphics.endFill();

            _circleSprite = new Sprite();
            _circleSprite.graphics.beginFill(0x00FF00);
            _circleSprite.graphics.drawCircle(60,60,50);
            _circleSprite.graphics.endFill();
            _circleSprite.x = 10;
            _circleSprite.y = 10;

            _rootSprite.addChild(_circleSprite);

            _circleShape = new Shape();
            _circleShape.graphics.beginFill(0xFF0000);
            _circleShape.graphics.drawCircle(0,0,75);
            _circleShape.graphics.endFill();
            _circleShape.x = 200;
            _circleShape.y = 200;

            _rootSprite.addChild(_circleShape);

            this.addChild(_rootSprite);

            _rootSprite.addEventListener(MouseEvent.MOUSE_DOWN, handleMouseDown);
        }

        private function handleMouseDown(event:MouseEvent):void{
            trace(&quot;mousedown&quot;);
            var selectPoint:Point = event.target.localToGlobal(new Point(event.localX, event.localY));
            if (_circleSprite.hitTestPoint(selectPoint.x, selectPoint.y, true)) {
                trace(&quot;hit sprite&quot;);
            }
            if (_circleShape.hitTestPoint(selectPoint.x, selectPoint.y, true)) {
                trace(&quot;hit shape&quot;);
            }
        }
    }
}</pre>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/flexygen.wordpress.com/9/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/flexygen.wordpress.com/9/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flexygen.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flexygen.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flexygen.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flexygen.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flexygen.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flexygen.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flexygen.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flexygen.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flexygen.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flexygen.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flexygen.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flexygen.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flexygen.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flexygen.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexygen.wordpress.com&amp;blog=2334499&amp;post=9&amp;subd=flexygen&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flexygen.wordpress.com/2008/03/27/shapes-and-sprites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/694e59d7efd69a8dabb466e51da61f0a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">richard</media:title>
		</media:content>
	</item>
		<item>
		<title>Simple MVC Sample</title>
		<link>http://flexygen.wordpress.com/2008/02/07/simple-mvc-sample/</link>
		<comments>http://flexygen.wordpress.com/2008/02/07/simple-mvc-sample/#comments</comments>
		<pubDate>Thu, 07 Feb 2008 05:11:02 +0000</pubDate>
		<dc:creator>richard</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://flexygen.wordpress.com/?p=8</guid>
		<description><![CDATA[I decided not to be a perfectionist, and posted the Flex sample code I wrote for my presentation to the Seattle Flex User Group last month. I hope someone finds it helpful. It&#8217;s the beginnings of a very simple slide show editor/viewer, using the RichTextEditor and TextArea controls. I actually ran into an issue with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexygen.wordpress.com&amp;blog=2334499&amp;post=8&amp;subd=flexygen&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I decided not to be a perfectionist, and posted the Flex sample code I wrote for my presentation to the Seattle Flex User Group last month. I hope someone finds it helpful.</p>
<p>It&#8217;s the beginnings of a <em>very</em> simple slide show editor/viewer, using the RichTextEditor and TextArea controls. I actually ran into an issue with RichTextEditor when the htmlText property is bound to external data. Vote <a href="http://bugs.adobe.com/jira/browse/SDK-14438" target="_blank">here</a>.</p>
<p>But the usefulness of the application (which has no server component currently) is not the point. Much like  Joe Berkovitz and James Echmalian do <a href="http://www.joeberkovitz.com/blog/2007/10/18/max-2007-in-barcelona-talk-materials-online/" target="_blank">here</a>, my goal was to provide readable source code showing the MVC pattern in Flex, without using Cairngorm or any other frameworks .</p>
<p>You can run the application <a href="http://dl.dropbox.com/u/4650141/Flex/seaflexexample/slideshowV1/index.html">here</a>, and right-click within it to view the source.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/flexygen.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/flexygen.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flexygen.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flexygen.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flexygen.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flexygen.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flexygen.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flexygen.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flexygen.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flexygen.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flexygen.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flexygen.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flexygen.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flexygen.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flexygen.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flexygen.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexygen.wordpress.com&amp;blog=2334499&amp;post=8&amp;subd=flexygen&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flexygen.wordpress.com/2008/02/07/simple-mvc-sample/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/694e59d7efd69a8dabb466e51da61f0a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">richard</media:title>
		</media:content>
	</item>
		<item>
		<title>DDD-Digression</title>
		<link>http://flexygen.wordpress.com/2008/02/04/ddd-digression/</link>
		<comments>http://flexygen.wordpress.com/2008/02/04/ddd-digression/#comments</comments>
		<pubDate>Mon, 04 Feb 2008 17:45:07 +0000</pubDate>
		<dc:creator>richard</dc:creator>
				<category><![CDATA[architecture]]></category>

		<guid isPermaLink="false">http://flexygen.wordpress.com/?p=7</guid>
		<description><![CDATA[Eric Evans wrote an excellent book on Domain-Driven Design, a book which I evangelize at every opportunity. There&#8217;s also a fairly active discussion group. At my last job I was able to apply DDD concepts in a Java/Spring/Hibernate project. Rather than being an exhaustive catalogue of design patterns, the book describes a few which, used [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexygen.wordpress.com&amp;blog=2334499&amp;post=7&amp;subd=flexygen&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Eric Evans wrote an excellent <a href="http://domaindrivendesign.org/books/index.html#DDD" target="_blank">book</a> on <a href="http://domaindrivendesign.org/" target="_blank">Domain-Driven Design</a>, a book which I evangelize at every opportunity. There&#8217;s also a fairly active <a href="http://tech.groups.yahoo.com/group/domaindrivendesign/" target="_blank">discussion group</a>. At my last job I was able to apply DDD concepts in a Java/Spring/Hibernate project.</p>
<p>Rather than being an exhaustive catalogue of design patterns, the book describes a few which, used together, form an architectural blueprint I find very appealing. There are the usual Value Objects and Entities, but DDD distinguishes certain entities as <i>aggregate roots</i>, entities which need to be globally accessible (eg. by query) rather than navigated to via other entities. You can extend a UML class diagram by drawing a line around aggregate boundaries and identifying any roots.</p>
<p>Then for persistence, there is the notion of a <i>repository</i>, a collection-like API which is considered part of the domain layer, and applies to aggregate roots rather than to all entities. A repository would have methods for adding, removing or finding entities which are determined by the design to be aggregate roots. Developers sometimes question the repository notion, finding it indistinguishable from a Data Access Object, or DAO. Although repository methods are often simple pass-throughs to a DAO, I believe that one distinction is validation and other business logic that wouldn&#8217;t be appropriate in a DAO, which can be thought of as part of the infrastructure rather than the domain. For example, UserRepository.addUser(User user) might throw a DuplicateUserException. I&#8217;d use generic DAOs or drop the DAO implementation detail before I dropped the repository abstraction. With the automatic persistence of &#8220;dirty&#8221; object graphs in an ORM like Hibernate, this pattern works very cleanly. When creating new aggregates, persist the root by adding it to the repository, and let the ORM take care of the rest. Note the absence of methods called &#8220;save&#8221;.</p>
<p>I&#8217;m not sure yet whether DDD has much applicability to the client side of RIAs, but I find it to be a helpful tool in designing object models, including persistence.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/flexygen.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/flexygen.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flexygen.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flexygen.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flexygen.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flexygen.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flexygen.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flexygen.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flexygen.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flexygen.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flexygen.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flexygen.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flexygen.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flexygen.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flexygen.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flexygen.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexygen.wordpress.com&amp;blog=2334499&amp;post=7&amp;subd=flexygen&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flexygen.wordpress.com/2008/02/04/ddd-digression/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/694e59d7efd69a8dabb466e51da61f0a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">richard</media:title>
		</media:content>
	</item>
		<item>
		<title>Computed properties and binding</title>
		<link>http://flexygen.wordpress.com/2008/01/24/computed-properties-and-binding/</link>
		<comments>http://flexygen.wordpress.com/2008/01/24/computed-properties-and-binding/#comments</comments>
		<pubDate>Thu, 24 Jan 2008 04:46:01 +0000</pubDate>
		<dc:creator>richard</dc:creator>
				<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://flexygen.wordpress.com/2008/01/24/computed-properties-and-binding/</guid>
		<description><![CDATA[Updating views in response to model changes is a snap with Flex data binding. A model property is set to be [Bindable] and and a view property is set to an expression in curly braces that refers to that property. For example, suppose MyModel.as has the following: [Bindable] public var description: String; Then MyView.mxml can [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexygen.wordpress.com&amp;blog=2334499&amp;post=5&amp;subd=flexygen&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Updating views in response to model changes is a snap with Flex data binding.<br />
A model property is set to be [Bindable] and and a view property is set to an expression in curly braces that refers to that property. For example, suppose MyModel.as has the following:</p>
<pre class="brush: java;">
[Bindable]
public var description: String;</pre>
<p>Then MyView.mxml can have this:</p>
<pre class="brush: xml;">
&lt;mx:Panel title=&quot;{model.description}&quot;&gt;
...
&lt;/mx:Panel&gt; 
</pre>
<p>Flex implements this by dispatching a PropertyChangedEvent when &#8220;description&#8221; changes, but by implementing implicit getter and setter functions, one can customize the event. In the MVC sample I wrote, which I hope to post one of these days, I stumbled upon the following idiom, where several bindable properties are based on a single value changing. In SlideEditorModel.as:</p>
<pre class="brush: java;">
public function selectSlides(slides: Array) : void {
	if (slides == null || slides.length == 0) {
		_selectedSlides = null;
	} else {
		_selectedSlides = slides;
	}
	dispatchEvent(new Event(&quot;selectionChanged&quot;));
}

[Bindable(event=&quot;selectionChanged&quot;, type=&quot;flash.events.Event&quot;)]
public function get currentSlide() : Slide {
	if (_selectedSlides == null) {
		return null;
	} else {
		return _selectedSlides[0];
	}
}

[Bindable(event=&quot;selectionChanged&quot;, type=&quot;flash.events.Event&quot;)]
public function get hasSingleSelection() : Boolean {
	return _selectedSlides != null &amp;&amp; _selectedSlides.length == 1;
}

[Bindable(event=&quot;selectionChanged&quot;, type=&quot;flash.events.Event&quot;)]
public function get hasSelection() : Boolean {
	return _selectedSlides != null &amp;&amp; _selectedSlides.length &gt; 0;
}</pre>
<p>With the above in place, I was able to enable buttons based on &#8220;hasSelection&#8221; or &#8220;hasSingleSelection&#8221; in addition to binding to the current Slide.</p>
<pre class="brush: xml;">
&lt;mx:Button label=&quot;Duplicate Slide&quot;
	click=&quot;handleDuplicateSlide(event)&quot;
	enabled=&quot;{slideShowEditorModel.hasSingleSelection}&quot;/&gt;</pre>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/flexygen.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/flexygen.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flexygen.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flexygen.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flexygen.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flexygen.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flexygen.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flexygen.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flexygen.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flexygen.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flexygen.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flexygen.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flexygen.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flexygen.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flexygen.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flexygen.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexygen.wordpress.com&amp;blog=2334499&amp;post=5&amp;subd=flexygen&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flexygen.wordpress.com/2008/01/24/computed-properties-and-binding/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/694e59d7efd69a8dabb466e51da61f0a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">richard</media:title>
		</media:content>
	</item>
		<item>
		<title>SeaFlex</title>
		<link>http://flexygen.wordpress.com/2008/01/04/seaflex/</link>
		<comments>http://flexygen.wordpress.com/2008/01/04/seaflex/#comments</comments>
		<pubDate>Fri, 04 Jan 2008 16:16:44 +0000</pubDate>
		<dc:creator>richard</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://flexygen.wordpress.com/2008/01/04/seaflex/</guid>
		<description><![CDATA[On Thursday, January 10th, I&#8217;ll be presenting at the Seattle Flex User Group. I&#8217;m working  on a little sample application, and will use it to illustrate the MVC design pattern. Details of the meeting are here.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexygen.wordpress.com&amp;blog=2334499&amp;post=4&amp;subd=flexygen&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>On Thursday, January 10th, I&#8217;ll be presenting at the Seattle Flex User Group. I&#8217;m working  on a little sample application, and will use it to illustrate the MVC design pattern. Details of the meeting are <a href="http://www.seaflexug.org/blog/index.cfm/2008/1/4/January-10-2008-Seattle-Flex-User-Group-Meeting--Model-View-Controller-in-Flex" target="_blank">here</a>.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/flexygen.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/flexygen.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flexygen.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flexygen.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flexygen.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flexygen.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flexygen.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flexygen.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flexygen.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flexygen.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flexygen.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flexygen.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flexygen.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flexygen.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flexygen.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flexygen.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexygen.wordpress.com&amp;blog=2334499&amp;post=4&amp;subd=flexygen&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flexygen.wordpress.com/2008/01/04/seaflex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/694e59d7efd69a8dabb466e51da61f0a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">richard</media:title>
		</media:content>
	</item>
		<item>
		<title>Flex and OpenDoc</title>
		<link>http://flexygen.wordpress.com/2007/12/21/flex-and-opendoc/</link>
		<comments>http://flexygen.wordpress.com/2007/12/21/flex-and-opendoc/#comments</comments>
		<pubDate>Fri, 21 Dec 2007 07:07:41 +0000</pubDate>
		<dc:creator>richard</dc:creator>
				<category><![CDATA[ux]]></category>

		<guid isPermaLink="false">http://flexygen.wordpress.com/2007/12/21/flex-and-opendoc/</guid>
		<description><![CDATA[This post is about in-place editing with user-selected editors. In the early 90s I had the privilege of working with some wonderful developers on a project at Apple called OpenDoc. The Wikipedia description is decent. We made many mistakes and the project was ultimately canceled when Steve Jobs returned to Apple, but I still long [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexygen.wordpress.com&amp;blog=2334499&amp;post=3&amp;subd=flexygen&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This post is about in-place editing with user-selected editors.</p>
<p>In the early 90s I had the privilege of working with some wonderful developers on a project at Apple called <a href="http://en.wikipedia.org/wiki/OpenDoc" target="_blank">OpenDoc</a>. The Wikipedia description is decent. We made many mistakes and the project was ultimately canceled when Steve Jobs returned to Apple, but I still long for the user experience and component market we were trying to create, and I wonder if it will happen on the Web, and what that will  look like.</p>
<p>In a nutshell, OpenDoc allowed you to edit a compound document (eg. image embedded in text) using the editors of your choice (based on preferences), and without leaving the document context or doing any import/export operations. The whole system was document-centric; you never launched an application &#8211; just opened documents (or stationery, if creating a new document).</p>
<p>Microsoft&#8217;s OLE was supposed to accomplish the same thing, but the user experience was poor. In OpenDoc documents, a single click on an image would activate the image (no matter how deeply nested), and the tools of your preferred image editor would appear.</p>
<p>A structured storage API allowed each editor to insert and extract its portion of the document data. Importantly, the overall document type did not need to be linear text or page layout &#8211; it could be a spreadsheet. Nor did all editors need to support the embedding of others &#8211; but all were embeddable in those that did.</p>
<p>I like to think this is still something users would appreciate, but our applications are still monoliths, for the most part. Adobe has worked hard to integrate the applications in its Creative Suite, but they&#8217;re still separate (and large) applications.</p>
<p>Today, Flex is enabling the development of sophisticated online authoring tools. Examples include <a href="http://www.buzzword.com/" target="_blank">Buzzword</a> for word-processing, and <a href="http://www.picnik.com" target="_blank">Picnik</a> for image editing. The ambitious <a href="http://a.viary.com/" target="_blank">Aviary</a> project appears to be re-creating the entire Adobe Creative Suite!</p>
<p>The Picnik image editor does a nice job of integrating with different photo-sharing services. But wouldn&#8217;t it be nice if I could use the Picnik tools (or those of any other image editor) to edit images embedded in my Buzzword document?</p>
<p>Adobe has an excellent platform with Flash, Flex and AIR. It includes a decent imaging model, and the infrastructure  for shared components (Modules and RSLs). I&#8217;d love to see an open extensible authoring platform emerge, rather than a series of rich, but monolithic applications.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/flexygen.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/flexygen.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flexygen.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flexygen.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flexygen.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flexygen.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flexygen.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flexygen.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flexygen.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flexygen.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flexygen.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flexygen.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flexygen.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flexygen.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flexygen.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flexygen.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexygen.wordpress.com&amp;blog=2334499&amp;post=3&amp;subd=flexygen&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flexygen.wordpress.com/2007/12/21/flex-and-opendoc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/694e59d7efd69a8dabb466e51da61f0a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">richard</media:title>
		</media:content>
	</item>
		<item>
		<title>Welcome!</title>
		<link>http://flexygen.wordpress.com/2007/12/16/hello-world/</link>
		<comments>http://flexygen.wordpress.com/2007/12/16/hello-world/#comments</comments>
		<pubDate>Sun, 16 Dec 2007 16:22:00 +0000</pubDate>
		<dc:creator>richard</dc:creator>
				<category><![CDATA[about]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Flexygen is dedicated to building Rich Internet Applications (RIAs) using Adobe Flex and the Adobe Integrated Runtime (AIR). Stay tuned for further information.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexygen.wordpress.com&amp;blog=2334499&amp;post=1&amp;subd=flexygen&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Flexygen is dedicated to building Rich Internet Applications (RIAs) using Adobe Flex and the Adobe Integrated Runtime (AIR). Stay tuned for further information.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/flexygen.wordpress.com/1/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/flexygen.wordpress.com/1/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flexygen.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flexygen.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flexygen.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flexygen.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flexygen.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flexygen.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flexygen.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flexygen.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flexygen.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flexygen.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flexygen.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flexygen.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flexygen.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flexygen.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexygen.wordpress.com&amp;blog=2334499&amp;post=1&amp;subd=flexygen&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flexygen.wordpress.com/2007/12/16/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/694e59d7efd69a8dabb466e51da61f0a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">richard</media:title>
		</media:content>
	</item>
	</channel>
</rss>
