Hi Satish, Thanks for the reply. Let me try and explain my req once more.
I have a set of classes, as an example are named as class A, class B and so on. These classes can belong to a specific hierarchy. Lets name SingleRoute and MultipleRoute. Again the SingleRoute and MultipleRoute have a set of common properties. So I created a CommonClass as a superclass of SingleRoute and MultipleRoute. Right now what I am doing is I create a class A/B depending on user drag and drop operation. Here I also have the info whether it should be of SingleRoute/ MultipleRoute. So once I create class A I use the info to create a SingleRoute/ MultipleRoute(I use CommonClass as the reference variable) in a method call on class A. Once I created the SingleRoute/MultipleRoute, I add it as a child to class A. In all the classes I have set and get methods to get the values of the properties. Depending on the business requirement I might also remove some properties(i.e. mxml elements like checkbox) from SingleRoute/MultipleRoute on a class by class(A, B) basis. As you said this falls into Composite pattern. My question is it possible to deisgn this in any other way. I tried using Decorator Pattern, but it does not fit well into this requirement. Can I deign this using Decorator pattern? Thanks. On Oct 6, 12:36 am, "Sathish Kumar" <[EMAIL PROTECTED]> wrote: > Hi Deepa, > > I am not able to get the exact requriment with the class Names 'A', > 'B','C'... > > "In( A, B, C, D) I create a class One or Two based on a method call and > add it as a child to A/B/C/D as these are mxml files." > > From The above statement, It looks like you want to create set of > containers that can hold each others as their child. In this case, we can > call this as 'Composite' rather 'Decorator'. > > If you can explain your problem with some Business terms, I can try > helping u in this ... > > Thanks & Regards, > Sathish Kumar T. > > > > > > On Thu, Oct 2, 2008 at 3:20 PM, deepa <[EMAIL PROTECTED]> wrote: > > > Hi, > > I have a set of classes A, B, C, D. All are mxml components/files > > > These classes have common properties. They can be of series One or > > Two. > > > A, B, C, D can be of type One and Two. > > > Right now I have one base class CommonOneTwo that has all common > > properties. > > > Class One and Two extend from CommonOneTwo. All these are mxml files. > > > A, B, C, and D also implement a coomon interface that is exposed to > > the calling class/client. > > > In( A, B, C, D) I create a class One or Two based on a method call and > > add it as a child to A/B/C/D as these are mxml files. > > > If A, B, C, D dont need to have some properties I tried to remove/add > > those properties(like checkbox, hbox) in the One or Two Classes. > > > I thought this is the best way of implementing, but someone else was > > of opinion that decorator pattern is an option. > > > I am a bit confused how can I use decorator pattern here. Will that > > pattern suit to my current requirements? > > > Can you explain how can it be implemented. > > > Thanks > > -- > Warm Regards, > Sathish Kumar T- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---

