DISQUS

diamondTearz: Architecture Choices for ActionScript Flex Components

  • Bjorn · 1 year ago
    hey M,

    With regards to frameworks, the only framework i would draw dependencies on is the flex framework.

    Then you can use your component in as many cairngorm apps as you want..

    For example a button component.
    The button is self-contained and only really represents the V in MVC, if that makes any sense...
  • Lordy · 1 year ago
    Actully, if you want to add components dynamically at runtime, it should actully be done in the CommitProperties method. The reason, is that, if you added a textfield to a custom uicomponent, the amount of space and size of the component would have to now accomodate the new addition as a child. InvalidateSize/measure can also be called afterwards to measure the child, and finally updatedisplaylist will have proper unscaledwidth and unscaledheight values, were you can finally position the component.
  • Chetan Sachdev · 1 year ago
    If I want to measure the height and width of child components based on the size of component, In which method I should do this ?
  • diamondtearz · 1 year ago
    @Chetan-
    That would depend. The updateDisplayList() is the method where you would pass a component it's size that it was going to be regardless.

    The measure method, however is where a component would tell its container/parent what size it would like to be. I think this needs more clarification and if I get a change I'll post more about it later this week.
    Meanwhile check out Michael Labriola's slideshow
    http://www.slideshare.net/michael.labriola/2007...
    and his blog for many tutorials on the details of this.