More info:

The skin CompASkin is applied to CompA, and all components subclassing CompA 
(CompA1, CompA2... CompA500) get that same skin.

All sublassing components are declared using MXML:
<CompA>
...
</CompA>

I'm pretty sure Flex 4 skins cannot be extended right ? 

If that is true, a response from a Flex SDK engineer who can tell me how can I 
resolve my problem without code duplication would be appreciated. 
I really want to find an elegant solution.

Thank you in advance for your responses :)



--- In [email protected], "astronaute75" <astronaute....@...> wrote:
>
> Hello fellows :)
> 
> The situation:
> Actually I extend an AS component CompA into many other MXML components 
> CompA1, CompA2... CompA500 and so on. They all share same skin CompASkin, 
> because it is convenient and maintainable.
> 
> Now, there is a requirement: small sub part of the skin have to be different 
> for each extended component. That change is always in same zone of the skin, 
> 99% of the skin will never change. Let's call that zone the ChangeZone. For 
> some of components a new TextInput will be added to ChangeZone, for others it 
> will be a Label, or a Button, or some other component or combination of few 
> of them, nothing too complicated.
> 
> What is the best practice to solve this problem?
> For example, do I have to make 500+ small custom components representing that 
> ChangeZone implementing an interface IChangeZone ? Am I be able to set it in 
> the skin separately for each extended component?
> 
> I hope you understand that having 500+ skins that are almost identical except 
> for this small zone is not an option as it will be a real nightmare to apply 
> change to all of them each time... well, something changes.
> 
> I know there is a solution without code duplication as Flex 4 is meant to be 
> extensible, but I just can't find it. I hope you can give me some help on 
> this one :)
> 
> Thank you in advance for your help,
> Adnan
>


Reply via email to