March 29, 2006

Adventures in Flex 2

Over the last month I’ve had to put OpenLaszlo away, and adopt Flex 2 as my RIA platform.

I would have preferred to stay with Laszlo, but I’ve discovered that the way that Laszlo manages data sources seems fundamentally broken, forcing one to build applications instead of frameworks, and limit reuse. I may be wrong, it may turn out that you can “alias” datasources in a standard way, but I was not able to find it.

But enough about Laszlo. Now it is time to complain about Flex!

Bug: Selection Highlight bar on my DataGrid is stuck at the bottom of the list

Description:

  • Create an Array of custom objects - for example, Alerts (your definition) , and make that array the dataprovider for a DataGrid control
  • Show it on the screen. Verify that the blue highlight bar is stuck to the bottom element in the list

Resolution:

  • In order for the DataGrid or other list-style component to do highlighting properly, the objects in the Array need to implement the IUID interface. Using ObjectProxy, here’s an easy way to do that:
public function addAlert( alert:Alert,
array:ArrayCollection):void
{
array.addItem( new ObjectProxy( alert ));
}

Now, your list should highlight properly.

4 Comments »

  1. hi,

    could you tell us a little more about what specific problem you ran into with openlaszlo? from this, it sounds like global datasets were a problem, but local datasets are supported now…. anyway, would appreciate any feedback!

    thanks,

    david temkin
    founder/cto, laszlo systems
    temkin at laszlosystems.com

    Comment by David Temkin — March 29, 2006 @ 7:59 pm

  2. Hi David,

    Thanks for stopping by. Yes, I think you got the gist of the problem. Essentially, I had to build a component that could handle ‘N’ comboboxes (chosen dynamically), each of which had a pulldown menu of data measurements.

    I couldn’t pass the datasets or datapaths through the application, and although I tried many times, I couldn’t pass “arbitrary” datapointers as the sources to the combobox lists.

    Comment by jb — March 29, 2006 @ 8:34 pm

  3. Sorry, I got cut off.

    The passing of datasets as objects, instead of as global names was a huge problem for us.

    The other main frustration I had was dynamically adding objects to views, dynamically adding tabs to tab panes and so forth. It just never seemed to work properly.

    Lastly, Laszlo always seemed to take a long time to load. While our apps were fairly sophisticated, they weren’t huge, and the 15+ second wait for the application to load was very frustrating. Having said that, I’m sure it could have been optimized down eventually. It was just another frustration that made it harder to continue to work with Laszlo w/out spending some time trying out Flex.

    Flex may turn out to be bitterly disappointing. Who knows?

    Comment by jb — March 29, 2006 @ 8:44 pm

  4. JB — thanks! this is useful.

    Comment by David Temkin — March 31, 2006 @ 10:36 pm

RSS feed for comments on this post. | TrackBack URI
You can also bookmark this on del.icio.us or check the cosmos

Leave a comment

XHTML ( You can use these tags): <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .