2 Replies Latest reply on Dec 4, 2008 1:05 PM by baddcafe

    dumb flex question about mxml arguements

    baddcafe
      Hi all,
      I have two questions for those people who are more experienced than I with flex.
      1. is there any way to make certain arguments into requirements for component instantiation? So if you use my component you have to specify some non default args? similar to in a constructor...
      2. if I define a method in a component, for example, something to add multiple children to a container, how do i make it accessible within the component definition? i'm looking for a way to add multiple items of a predetermined type to a component within the application mxml so that users would define elements using only tags, no scripting.
        • 1. Re: dumb flex question about mxml arguements
          Level 7

          "baddcafe" <webforumsuser@macromedia.com> wrote in message
          news:gh9759$326$1@forums.macromedia.com...
          > Hi all,
          > I have two questions for those people who are more experienced than I with
          > flex.
          > 1. is there any way to make certain arguments into requirements for
          > component
          > instantiation? So if you use my component you have to specify some non
          > default
          > args? similar to in a constructor...

          Probably better to simply handle cases where they're not provided.

          > 2. if I define a method in a component, for example, something to add
          > multiple
          > children to a container, how do i make it accessible within the component
          > definition? i'm looking for a way to add multiple items of a predetermined
          > type
          > to a component within the application mxml so that users would define
          > elements
          > using only tags, no scripting.

          Look in the docs under template components.

          HTH;

          Amy


          • 2. Re: dumb flex question about mxml arguements
            baddcafe Level 1
            hmm, yeah it seems like what i am after isn't possible. Basically i want required attributes for sort of design by contract type interfaces. oh well...