3 Replies Latest reply on Nov 21, 2008 11:30 AM by Newsgroup_User

    Modules - late binding

    ethr Level 1
      I've just started reading about modular programming in Flex 3. So far it appears to be fairly similar to v2 in that all objects need to be declared at compile time in order to be available (early binding).

      Is it possible to define and instantiate modules at run-time? IE The main app doesn't know of them at build but can create them from some external reference (like an XML list via RPC)...
        • 1. Re: Modules - late binding
          Level 7

          "ethr" <webforumsuser@macromedia.com> wrote in message
          news:gg6i58$rjc$1@forums.macromedia.com...
          > I've just started reading about modular programming in Flex 3. So far it
          > appears to be fairly similar to v2 in that all objects need to be declared
          > at
          > compile time in order to be available (early binding).
          >
          > Is it possible to define and instantiate modules at run-time? IE The main
          > app
          > doesn't know of them at build but can create them from some external
          > reference
          > (like an XML list via RPC)...
          >
          http://www.magnoliamultimedia.com/flex_examples/Amys_Flex_FAQ.pdf

          Q4


          • 2. Modules - late binding
            ethr Level 1
            I've used this approach in the past. It works but the fact that you need to (pre)reference every component before you can create it is a nuisance.

            From the docs it looks like this new approach takes some strides to amend this.
            • 3. Re: Modules - late binding
              Level 7

              "ethr" <webforumsuser@macromedia.com> wrote in message
              news:gg6qkd$8tr$1@forums.macromedia.com...
              > I've used this approach in the past. It works but the fact that you need
              > to
              > (pre)reference every component before you can create it is a nuisance.
              >
              > What Im curious about is whether this 'modular design' that is touted in
              > v3
              > does anything to amend this. So far I'm guessing not.

              I think you can change your compiler settings to compile in classes you
              haven't referenced at compile time.

              Just curious...do you REALLY want every possible class you could potentially
              use compiled into a giant swf?