Archive for the ‘Tutorials’ Category

Custom Events + Robotlegs + dispatch + Overriding the clone() method

Monday, January 4th, 2010

Let me preface this by saying, this approach is certainly not the final say. Any tutorials, demos or information shared on my site should be taken for what they are worth. I love feedback, so feel free to leave a comment below.

[Update: As Amy mentioned in the comments, this is not specific to the Robotlegs framework.]

I have recently been tinkering with the new Robotlegs framework and wanted to share a quick gotcha. It’s really not a gotcha, and really more something I forgot to do. Click here to see the post that helped jog my memory on this one. Hope this will come in handy for someone.

View Demo | View Source

If you can’t read the white print on the demo it says:

This demo serves to explain the need for overriding the clone() method on custom events.

Notice that no output is generated when a user clicks the CustomEventOne button.

When a user clicks CustomEventTwo, the output is generated. This is because the MainMediator must re-dispatch the custom event, and so the developer must remember to Override the clone() method.

Right-Click to View Source, then look in the com.diomampo.rlcustomeventdemo.events package at the differences between both events.

At This Moment I Am…

Thursday, December 24th, 2009

I intend on repurposing this title “At This Moment I Am…” as a series of mile markers about myself. I’ll be breaking it down into two different sections: Working On, and Moving Towards. Both categories are pretty self explanatory, Working On will list what I am doing now in order to get to what I am Moving Towards.

Working On

  • An Android application
  • A modular Flex application
  • Optimizing as3 code
  • Meeting new people

Moving Towards

Mobility

The future is mobile, and at least two of the items I am Working On will get me there. In the world of Mobile Phones, for me it’s all about Android, and if you haven’t heard of Android, something is wrong. Check out this market share prediction. At any rate, the signs are there, and Google as well as the community is really pushing the Android Platform.

How about developing for Android? As a Flex Developer, I’d like to think the learning curve for Android development is slightly reduced. When you start your first project in eclipse, you’ll notice that the xml layout files(located in res/layout/) give two tab options, Layout and someFile.xml. You’ll find these in the bottom left corner in the image below.

Think of the Layout tab as the Design tab in Flex Builder. In this case it is giving you the visual representation of the xml file (registration.xml) versus MXML in Flex, which would be like seeing the Source tab.

On the surface I was able to pick up on some of the similarities, but I was fortunate enough to have some good discussions with Faisal Abid about everything under the hood. He has a strong Flex background and has been working on some heavy Android apps. At some point I will put together a good post on bridging the gaps of Flex and Android.

Another item I’m working on that falls under Mobility for me is, meeting new people. For me to be more mobile in 2010 it will require breaking out of the shell and meeting more people in more places. It’s amazing how much seven days on a cruise ship with complete strangers can really change your perspective on things. See my Stop Encapsulating Yourself!!! post for more on this. At any rate, traveling is a top priority for me this coming year, so meeting people around the world is a big deal. I’ve compiled a list of where I will be traveling in 2010:

  • San Jose, CA (early March) – It’s conference time! This time I get to meet back up with the gang and a couple hundred other members for 360|Flex.
  • Breckenridge, CO (mid-late March) – Snowboarding and friends!!!
  • _____, LA –  Wedding, Congrats @ogreen32!
  • Las Vegas, NV (summer time) – WSOP! I’m looking to get into one of the smaller events like the $1k, we’ll see.
  • _____, VT (October) – Yet another wedding, Congrats Gonzo!
  • Japan (65% chance) – Meet new people, be in a different country.
  • NY and Canada (80% chance) – Visit friends

Be sure to stop by http://www.nowandthere.com/ for some great travel/lifestyle resources (thanks Sam).