23.4.07

Booleans - Disturbingly Little

Nice



My apologies to all of you programmers out there who have been developing in real languages all along.

Today I posted to flexcoders that I was a little disturbed by the fact that Booleans initialize to false. Prior to AS3 you could compare a Boolean to undefined. The Flex compiler seems to complain if you even think about Booleans as undefined or null:

"1184: Incompatible default value of type Null where Boolean is expected..."
when creating this function: public function f(b:Boolean = null)

"1012: Variables of type Boolean cannot be undefined... (e.g. )"
when making this comparison: b==undefined

Nice that it acts more like a real programming language, not nice that I have to mend my AS2 ways of using the absence of assignment as some third value for a boolean. In hind-sight, this isnt good programming practice anyway because it requires interpretation to understand the third meaning. Interpretation is always a maintenance nightmare.

End of the day flexcoders answered with something I needed to hear: "use an enum". Don't think the thought wasnt met with some resistance.

"Enum? Shoo-oo-oot those aint in achunscript"

Now earlier today I had concrete ideas about what an Enum is, but I have no real experience creating one. This always drives me nuts because our minds are designed to constantly spin problems with our spare processor cycles (kind of like SETI@home) Unfortunately this intra terrestrial activity tends to reduce the amount of good sleep I get... and it keeps me up at night.

I dove in and came up with an enum example that you can extend to create your own enums. This is pretty straight forward.

I personally think you grasp something 70% by using it 20% by creating it and maybe if you're lucky, 10% wondering about it. In any case, it will be really nice to spend time using enums instead of over-rethinking this really simple concept.

12.4.07

allowNetworking
all | internal | none

Sweet


I recently created a widget for MySpace and other community sites. Some of these sites force the community posting flash widgets to set the object allowNetworking attribute to 'internal'. I needed to know ahead of time wether I could just provide a link or if I would need a button to allow the user to copy the destination to the clipboard.

I couldn't find a built in function to check the value ahead of time, but I noticed that when I tried to call navigateToUrl with this attribute set to 'internal' or 'none', Flex throws a SecurityError...

Cool, using this knowledge I created a simple function that tries to call navigateToUrl with an empty url. Flash won't try to go to '' (empty string) but navigateToUrl still throws the SecurityError. So my function uses a simple try/catch/finally to return true or false.

Check out the sample code here:

allowNetworking Sample

Let me know if AS3 provides other means for testing this value, I couldn't find one.

17.3.07

ApolloCamp (San Francisco, 3/16)

Psick

It looks like another successful alpha release for the Adobe guys. I think the biggest take-home (other than FB2) is that web programmers can now move their creativity from the browser onto the desktop.

So widgets and projectors are nothing new. There is a plethora of projector software out there and most do a pretty good job at the things Adobe is touting about Apollo. I beleive the core advantage to using Apollo is that it extends into JavaScript, HTML and CSS and really the wholeist client picture is being unvieled before our eyes in new applications that are truly awe inspiring.

In the end, the developers that use Apollo will determine the success of it. Thanks to ApolloCamp I have been given a taste of whats to come.

Im both nervous and excited to imagine how this changes everything.

9.3.07

360Flex (San Jose, March 5-7)

High



First Blog Entry Ever!

It seems like a few years ago I just dropped my head into Flash and never took the time to look up or around to see what other people were doing with it.

This week I went to Flex360 (San Jose, March 5-7) and was like "Shia, what happened?"

Now there's Adobe Labs, FlexCoders, Yahoo!, Flex, AS3, Tom Ortega, Roger Gonzalez and Grant Skinner and a huge (super supportive) community built tightly around the technology. I admit, Im blown away by it all.

Where there were two companies ...
It seems like ten years ago now... but when I heard that Macromedia became Adobe I was honestly freaking out. Don't get me wrong, I love all of my built-by-Adobe-it-only-takes-five-minutes-to-initialize-desktop-applications, but like everything else I was fearful that Adobe would bloat my precious little runtime (remember Reader?)

Wednesday at 360Flex Emmy Huang and Justin Everett-Church from Adobe had an open wishlist session during lunch . The topic of player feature creep/bloat briefly reared its head and without going as far as to say they forwardly shared our concern, they did seem quite interested to know where we developers thought that bloat threshold might be. Interestingly enough, someone said "2Mb" (download is currently 1.967.)

Anyway. Kudos to The Man. Thus far I am truly impressed with the takeover, Adobe's involvement with the community, and finally last and not least, free beer / h'orderves ...

To give a little back, I compiled this little list of blogs from the 360Flex schedule. A little directory of gurus and heroes that make these conferences possible.


Please ping me if I got any of this wrong...

360 Flex Presenters Blogs:


Anatole Tartakovsky http://flexblog.faratasystems.com/?author=2
Ben Forta http://www.forta.com/
Ben Lucyk http://esria.com/
Ben Stucki http://blog.benstucki.net/
Chafic Kazoun http://www.rewindlife.com/
Christian Cantrell http://weblogs.macromedia.com/cantrell/
Christophe Coenraets http://coenraets.org/
Clint Modien http://clintm.esria.com/
Danny Patterson: http://dannypatterson.com/Resources/Blog
David Zuckerman http://davidzuckerman.com/adobe/
Deepa Subramaniam (Adobe)
Ely Greenfield http://www.quietlyscheming.com/blog/
Grant Skinner http://www.gskinner.com/blog/
Harris Reynolds http://blog.harrisreynolds.net/
Jason Williams (Adobe)
Jesse Warden http://www.jessewarden.com/
Joe Berkovitz http://joeberkovitz.com/
John Wilker http://www.johnwilker.com/j/
Kevin Hoyt http://weblogs.macromedia.com/khoyt/
Kevin Schmidt http://www.flexinabox.com/
Mansour Raad http://webddj.sys-con.com/read/288053.htm
Mike Chambers http://weblogs.macromedia.com/mesh/
Mike Morearty http://www.morearty.com/blog/
Renaun Erickson http://renaun.com/blog/
Roger Gonzalez http://blogs.adobe.com/rgonzalez/flex/
Ted Patrick http://www.onflex.org/ted/
Tom Ortega http://lordbron.wordpress.com/