Tater Salad

You can chop em up, mash em up, or boil em in a stew.

FlexBook Conquers the World.

Posted by caseyrayl on March 28, 2007

So I began learning AS3 and Flex2 recently in order to support a native Flex2 RIA. My first task was to integrate Ely Greenfields new FlexBook component into several areas of the application. The work is probably 80% done now and I thought I would share a few interesting things about my odyssey into the component. FlexBook uses an ICollectionView as its content and specific elements for the front and back cover. These elements need to be UIComponent instances. However, the code in the FlexBook used to set the content collection expected it as either a primitive array type or an XMLList. I had to pass in a native ICollectionView, so an update to the component was required. Also, Ely distributed several interesting examples along with the component source, and I noticed that in several of them there were utility methods specified to flip the pages of the book forward or backward. I wanted to use these but did not want to rewrite them each time, so I took the logic and inserted it directly into the FlexBook class. Along the way I had to update the “turn to previous page” method because it would not move to the cover, if one existed. Other than that, the FlexBook worked quite well. I did notice some odd logic in its updateContent function, but Ely has said this is rough code, so that type of thing can be expected.

I have also started experimenting with WPF/E for an upcoming project using the technology. I have never used JavaScript before so I have to learn it along with the WPF/E framework. So far it has been a mixed bag for me. Syntactically and semantically JavaScript feels like a step backwards from working in languages like Java and ActionScript 3. On the other hand the WPF/E framework is interesting. The drawing API is fairly robust and the animation system is straightforward. I have not yet seen what it is truly capable of. Some tech specific things that I have encountered that I thought were odd are that the WPF/E Image object cannot have its source set more than once without throwing a JavaScript error. Also, the new Blend application for generating vector art assets in XAML only supports scripting in C# for WPF applications, which is a bummer.

Hopefully I will have a meatier post about WPF/E next time.

One Response to “FlexBook Conquers the World.”

  1. Levi said

    Hi there, we are trying to get this component to scale with a container, while scaling the content of the pages as well. I know it may have been a while since you worked with this component, but do you have any insight? Thanks.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>