~ April, 2006 ~

5
Apr
2006

AS3 — on the lack of private and protected constructors

As I was talking about using objects as enums, someone made a comment about the lack of private and protected constructors. I know that the this is a sore spot, so I thought I’d explain my view of how we got here, and give my two cents.

The problem is that unlike what we did with ActionScript 2, we are working tightly with people from Mozilla and others to standardize on ECMAScript edition 4. The ECMAScript standard is not final, but we are adhering as closely as we can to the spec as it develops.
More »

4
Apr
2006

AS3 technique — using object instances as “enums”

Just after posting the updated version of the CompletionInput control, it occured to me that I should read through the source code to make sure there’s nothing too strange lurking in there.

One thing that might warrant some explanation is why I used object instances to represent “enums”. This is a technique that should be familiar to Java developers but may not be familiar to all AS developers.
More »

3
Apr
2006

Flex auto complete text input control v0.6

[The auto complete text input control has been updated for the beta 3 version of the player. You can find the code here. –Sho, May 11, 2006]

Here is a new version of the auto complete text input control, which is a cross between Google suggest, the “save information I typed in forms” preference found in browsers, and the HTML <select> control.

If you provide a static list of items to the control, the control can do the filtering. Alternatively, you can create a function to give suggestions (which is necessary if you are doing the filtering on the server).

As before, there is a “mustSelect” flag which turns the control into a sort of super version of the HTML <select> tag. The main benefit to using this instead of <select> is that using the keyboard to narrow down your choices is much easier.

Finally, I added the ability to automatically save form data as local storage and provide hints based on this data. This makes it behave similarly to HTML text fields in most browsers.

Unlike how browsers work (so far…) you can individually delete these hints. I hate it when I mistype something into a field and I get a hint for that typo every time I visit the app! With these controls, you can right mouse on any of the hints you don’t like and delete them.

Source code removed. Please use the more recent version referenced above.

More »

3
Apr
2006

Layering Flex over AJAX and collaborating with data services — whoa!

Christophe just posted an example of how to layer Flex over AJAX to do video chat and shared whiteboard as an overlay to Google Maps. You could use this to draw a route on a map for someone else to see, for example.

I think my head is going to explode.

http://coenraets.com/viewarticle.jsp?articleId=100