Flex: Introspecting An Object By Name

Say you have an object reference in your class:

var button1:Button;

How do you introspect it? One way is to use the Introspection API as described in the Flex 3: Performing Object Introspection doc:

var classInfo:XML = describeType(button1);

But what if you want to use the object name, a string, instead of a class reference? Simply use the ff:

var objectName:String = “button1”;
var objectInfo:XML = describeType(this[objectName]);

From there it’s as simple as going through the XML object as described the rest of the Flex 3 doc.

Bonding

Last night, Michelle was off to an office dinner. I took the opportunity to buy an iPad case as well as diapers and water for Jeanne. When I got home around 9:30M,  Jeanne and I played till she got tired and we started watching Brainy Baby. I lay on my side while she leaned back on my tummy. She watched while I slowly fell asleep. I woke up to see that she’d fallen asleep. I lay her down on the bed and went back to sleep. Only Michelle’s arrival awakened us but not for long.

The iPad 2 That Reading Bought

I had thought of getting Jeanne an iPod touch but I’ve pushed back the purchase time and time again. But recently, Michelle and I have been reading ebooks a lot and although it’s reasonable on the iPhone because of its retina display, it’s not exactly ideal on Michelle’s Nokia 5800 where your squint at the small low-resolution display and tapping the not-so-sensitive resistive touchscreen so often. And there’s also Jeanne taking over the iPhone especially when I’m reading. And yet, the display is too small and she ends up hunching over it. So I finally decided to get an iPad. Now Michelle can read on the iPad, Jeanne can play with a bigger screen, and I have the iPhone all to myself. Now that’s a win-win-win situation! :P

Nokia N9

I read the GSMArena review of the upcoming Nokia N9 and I was quite impressed. The hardware, as with the Nokia N8, is quite good. The software, MeeGo, seems to be as good, if not at par, with iOS and Android. And with Alien Dalvik, it can actually run Android apps via emulation. Yet, the N9 will be coming out under planned obsolescence: it was confirmed to be the final MeeGo phone as Nokia’s dark union with Microsoft bears fruit to the N9’s lesser twin. Nokia already knew what MeeGo was and what MeeGo will be when they decided to go to bed with Microsoft. MeeGo was even then better than WP7. And yet they pushed on. What’s up with that?