— Forest and the Trees

Archive
Code

[UPDATE 26 Jun 2008] – view source is now fully functional

I made some enhancements to the DataGrid footer posted in Alex’s Flex Closet. This supports resizing columns, locked columns, and horizontal scrolling. It is also implemented in both the Data Grid and the Advanced Data Grid. Licensed under MIT (which I believe is the do whatever the hell you want license – commercial, non-commercial, sell it unedited to someone (although that would be morally wrong)).

I haven’t tested these very much. If you find a bug, please comment.

Demo here. The functions that calculate the content of the footers are in the main mxml. Right click to view source.

Read More

Here is the swf – right-click to view source. And here’s the preso. The source has very little commenting and the preso doesn’t have any notes. But, it still might make sense. Feel free to contact me if you have any questions. Presentation is in OpenOffice. Here’s a PDF version as well.

Read More

I’ll be giving a talk on the Bridge Pattern at the BFPUG Design Patterns Group(I really need to update that page) this Wednesday (May 7, 2008). As always, it’ll take place at Brightcove and will start at 7pm. And as always, we will get together for beers afterwards at Characters (which is located beneath Brightcove). Please stop by. These are really fun nights. Map here.

Read More

I had been working w/ the Flex beta (where you couldn’t get at the source) for so long, I just gave up. But, you can get at the charting component source if you buy Flex Builder Pro. Not open source, but, all I want to do is override methods. (via Pearls of Flex)

Check out this link if you need to extract the source. For 3.0 it seemed to auto-extract. But, for Flex 3.1, I needed to extract.

Also, check this post for the command to type into terminal.

Read More

I’ve finally found a way to blog regularly – update primary data. Mississippi data added to the Election Dashboard.

Read More

Entered the latest state info from CNN. Again, I can’t figure this data out: Is it wrong? (state totals don’t add up to overall totals) Is it sloppy? (Texas 12 superdelegates, but, 12 to Clinton and 9 to Obama) Well, it’s updated anyway. I changed the colors a bit – don’t love them, but, at least Clinton and Obama colors are consistent.

Also – the source is a mess, but, if anyone’s interested – here’s the xml file adn the xsd. If you make a chart, please send me an email.

Dashboard here.

Read More

Combination of being annoyed that I couldn’t find the data I wanted on-line and playing around w/ Flex 3 Charting, led to this.

Still very incomplete, but, figured I should post in case Obama wins Texas and no one cares about delegate counts any more.

Read More

Colin Moock posted his “What’s new in ECMA Script 4” lecture. Looks great. Personally, I can’t wait for array types and overloaded methods. I guess there’s no guarantee that Flash will support all the new functionality, but that would be my guess.

Official (40p) pdf of the ECMA spec here.

Read More

File this under either RTFM or “can I get that hour of my life back”, maybe both. To trace xml that is simple (e.g., one node), you need to use toXMLString.

public var myXML:XML =<root>
<item id=’1′/>
<item id=’2′/>
<item id=’2′/></root>

public function init(): void {
trace(myXML);
trace(‘*************@mID_n==2**************’);
trace(myXML.item.(@id==2));//traces 2 nodes
trace(‘************@mID_n==1***************’);
trace(myXML.item.(@id==1));//traces nothing
trace(‘***************************’);
trace(myXML.item.(@id==1).toXMLString());//traces the node
}

Read More

I was doing some coding where optimization really mattered and made a little loop test. The ‘for each’ loop is the fastest – even when you need an index.

Also of note, the debug player has ‘incrementing while’ as faster than the ‘do while.’ And both as faster than ‘for each with counter.’ There is a huge difference between the performance of the debug and the release player in Flex. (Using the Flex Beta 3 Release 3 here.) Check out my friend James’ test for more info on the diffs. He has a lot of benchmarking around typing vars here. Those posts completely refute some earlier, widely read, posts that suggested you should never use int. Lesson here is, make sure you test performance with a version published for release. Unfortunately, that means you can’t trust trace statements for your benchmarking. You need to put your time displays in a text field.

Also, I did some tests, and it appears that ‘for each’ preserves order – which is obviously very important to know. If you have found different, please post a comment. Example here. View source enabled.

Read More