« Flex 3,LiveCycle Data Services and Adobe AIR sessions at the MAX 2007 Conference | Main | Enterprise RIA development with Flex/LiveCycle Data Services and Java persistence »

Migrate from Flex 2 to Flex 3 beta

Some important notes you have to keep in mind when migrating Flex 2 to Flex 3 (via
http://kuwamoto.org/2006/05/08/tips-for-flex-2-beta-3/) :

* flash.util has been renamed flash.utils
* Several things have been renamed from hXXX to horizontalXXX.
* There are times when you have to cast Application.application to DisplayObject
* DataProvider APIs are no longer on the list classes. For example, you can no longer say myList.getItemAt(index). Instead, say myList.dataProvider.getItemAt(index).
* ICollectionView.getCursor() has been renamed ICollectionView.createCursor().
* You no longer have to manually release the iterators you get back from the createCursor() function.
* The constructor for CollectionEvent now takes an attribute to specify the event type.

There were a couple things that tripped me up during migration that you might want to watch out for:

* If you use states… the “target” property of the AddChild tag has been renamed “relativeTo”. Unfortunately, the “target” property still exists, but it now means something different. My suggestion is to do a search for AddChild and change “target” to “relativeTo” as one of the first things you do in moving to beta 3. If you forget to do this, you get a somewhat cryptic runtime error (”Cannot add a child that is already parented”) when you switch into that state.
* If you use trace… Don’t worry when it tells you that flash.util.trace is an invalid import. You no longer need to import anything to use trace.


TrackBack

TrackBack URL for this entry:
http://blog.comtaste.com/mt-tb.cgi/13

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

This page contains a single entry from the blog posted on June 29, 2007 10:39 AM.

The previous post in this blog was Flex 3,LiveCycle Data Services and Adobe AIR sessions at the MAX 2007 Conference.

The next post in this blog is Enterprise RIA development with Flex/LiveCycle Data Services and Java persistence.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.33