3 Replies Latest reply on Jun 17, 2008 9:29 AM by ntsiii

    Plz Help! 4 Screens Displaying the same Component...

    Wingnow Level 1
      Hi all,



      I would like to write a Flex Application with 4 screens as shown below, all the 4 screens displaying the same component:

      ===========================
             |       |
        Screen 1  |  Screen 2  |
             |       |
      ===========================
             |       |
        Screen 3  |  Screen 4  |
             |       |
      ===========================



      I used VDividedBox and HDividedBox to create 4 screens, in each screen I put the same component into it.
      Though the 4 screen showing same component and look entirely the same, the components inside got different IDs and not the same object...
      Therefore, any changes in one of the screen would not affect the others!

      The problem is, I want to have any changes made in the content/property in one of the screen would also shown in the other 3 screens. (Just like one of the function in MS Excel: Split Panel)

      If my component only contain 10 input boxes, it is a good idea to use [Binding].
      Since my component is much more complicated, I think it is not a good idea to use [Binding].
      (Of coz, if [Binding] can handle this complex case, you may suggest that ^_^)



      Is there any way to display an object with same ID in different screen at the same time?
      Or any other suggestion on this issue?

      if nessesary, I don't mind removing the DividedBox, I only want the "one obj displayed in 4 screen at the same time" result !!



      Please Help!

      Thanks All!!
        • 1. Re: Plz Help! 4 Screens Displaying the same Component...
          levancho Level 3
          seperate component and dat that drives it,
          so you will have a emplty ComponentClassA feed by singleDataObject

          ===========================
            dobj123  |  dobj123   |
            Screen 1  |  Screen 2 |
                  |        |
          ===========================
             dobj123 |  dobj123  |
            Screen 3  |  Screen 4  |
                 |        |
          ===========================

          you will still have 4 instances of ComponentClassA but all foure will be driven by [Bindable] class "singleDataObject" all data changes on singleDataObject will be reflected on all classes and their isntances who use that object.
          • 2. Plz Help! 4 Screens Displaying the same Component...
            Wingnow Level 1
            Thx for your answer.

            But I still hope if there is a way to duplicate the screen output. Not only because it help simplifying the program, it also reduced the resources spend. Since they are entirely the same, all I need to do is just duplicate the screen output! (haha, I admit that I am lazy)

            Anyway, if there is no way to duplicate the output, i think i have to adopt yours approach.^_^
            • 3. Re: Plz Help! 4 Screens Displaying the same Component...
              ntsiii Level 3
              A child can have only a single parent, that is, it can only be in a single displayList.

              So levancho's approach, to make the ui data driven, is correct.

              Tracy