IIRC, there was a discussion some time back about separating behaviors from the 
actual components. If we had injectable behaviors, that would solve this 
problem nicely. A single text component could support editing and/or selection, 
but if the behavior is not needed it would have the overhead of the unneeded 
behaviors…

Harbs

On Nov 20, 2012, at 2:42 PM, Sebastian Mohr wrote:

> Hi,
> 
> In a few projects I need the text to be selectable but not editable. 
> Therefore, I usually create a RichSelectableText-Component [1]
> that should help me achieving this task. Obviously, this approach 
> is not optimal because it's extending from RichEditableText to block 
> functionality from its superclass. 
> 
> What about splitting up the functionality of RichEditableText into 2 
> classes? The proposed new inheritance chain could look like this:
> 
>       RichEditableText < RichSelectableText < UIComponent
> 
> If this proposal is not suitable, would you see a better way?
> 
> 
> Sincerely Yours,
> 
> Sebastian Mohr
> Apache Flex Developer (PPMC),  
> Interaction Designer & Musician
> http://www.linkedin.com/in/masuland
> 
> 
> [1] RichEditableText-Component:
> 
> package spark.components
> {
>       import spark.components.RichEditableText;
> 
>       public class RichSelectableText extends RichEditableText
>       {
>               public function RichSelectableText()
>               {
>                       super();
>                       
>                       editable = false;
>               }
>       }
> }
> 
> 
> 

Reply via email to