Who is that quote from? I'm on the last steps of a massive rethinking,
refactoring, and rewriting, and I'm really glad to be able to do
it--I've had to deal with piles upon piles of hackery for long enough.
It feels really good.

-Maciek


-----Original Message-----
From: Michael Schmalle <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: [email protected]
Subject: Re: [flexcoders] Re: Subclassing Components: Theoretical
Question
Date: Fri, 12 Sep 2008 11:17:59 -0400

My favorite quote;

There comes a point in the life cycle of any system when adding one more
patch 
is the wrong solution to every problem. Eventually, it's time to
rethink, refactor, 
and rewrite.

Mike

On Fri, Sep 12, 2008 at 11:09 AM, Tim Hoff <[EMAIL PROTECTED]> wrote:
        Heretofore known as the blahBlahBlahButton. :)
        
        -TH
        
        
        
        --- In [email protected], "Doug McCune" <[EMAIL PROTECTED]>
        wrote:
        >
        
        > heh, that's almost the exact description of what I called the
        > "CanvasButton":
        >
        http://dougmccune.com/blog/2007/06/01/new-component-canvasbutton-
        added-to-flexlib/
        > 
        > Doug
        > 
        
        > On Thu, Sep 11, 2008 at 3:22 PM, Josh McDonald <[EMAIL PROTECTED]>
        wrote:
        > 
        > > Yeah, I'd make one subclass of Button that lets you put 
        whatever you
        > > please as the label, and have "function set labelControl
        (cntrl:*)" as the
        > > [DefaultProperty]. If it finds a string, go with a
        UITextField, 
        if it's a
        > > DisplayObject, use it, if not throw an error. Then you have:
        > >
        > > <pkg:FreeFormButton click="doStuff" width="150">
        > > <mx:text>blah blah blah blah blah blah blah blah
        blah</mx:text>
        > > </pkg:FreeFormButton>
        > >
        > > -Josh
        > >
        > >
        
        
        > > On Fri, Sep 12, 2008 at 8:04 AM, Alex Harui <[EMAIL PROTECTED]>
        wrote:
        > >
        > >> Make one subclass that handles both HTML and multiline?
        > >>
        > >>
        > >>
        > >> *From:* [email protected] 
        [mailto:[EMAIL PROTECTED] *On
        > >> Behalf Of *wnoone01
        > >> *Sent:* Thursday, September 11, 2008 11:17 AM
        > >> *To:* [email protected]
        > >> *Subject:* [flexcoders] Subclassing Components:
        Theoretical 
        Question
        > >>
        > >>
        > >>
        > >> Hey all,
        > >> I've got a theoretical question about subclassing a
        component. 
        Here is
        > >> the use case:
        > >>
        > >> A programmer requires buttons that support multiline
        labels. 
        This is a
        > >> requiement for Button, RadioButton, and CheckBox. Now to
        start, 
        the
        > >> programmer can subclass mx.controls.Button to implement the
        > >> functionality. But now he needs to implement the
        functionality in
        > >> RadioButton and CheckBox.
        > >>
        > >> One way is to subclass RadioButton and CheckBox and then 
        duplicate the
        > >> functionality there. However, not only will he be
        duplicating
        > >> functionality, he is headed down a slippery slope. Let's
        say 
        that for
        > >> his next project, he suddenly requires a button label that 
        supports
        > >> HTML formatting. Now he must subclass again. So now the
        classes 
        grow
        > >> from:
        > >>
        > >> MultilineButton
        > >> MultilineRadioButton
        > >> MultilineCheckBox
        > >>
        > >> To
        > >>
        > >> MultilineButton
        > >> HTMLButton
        > >> MultilineRadioButton
        > >> HTMLRadioButton
        > >> MultilineCheckBox
        > >> HTMLCheckBox
        > >>
        > >> The next project requires a multiline html button. So now
        its:
        > >>
        > >> MultilineButton
        > >> HTMLButton
        > >> MultilineHTMLButton
        > >> MultilineRadioButton
        > >> HTMLRadioButton
        > >> MultilineHTMLRadioButton
        > >> MultilineCheckBox
        > >> HTMLCheckBox
        > >> MultilineHTMLCheckBox
        > >>
        > >> And now its officially out of hand and the programmer is
        mired 
        in a
        > >> subclassing nightmare.
        > >>
        > >> ---
        > >>
        > >> So basically my question is what is the best way to handle
        this
        > >> problem in Flex. Is subclassing the only way or is there a
        more
        > >> efficient solution (decorators, item renderers, etc.)?
        > >>
        > >> Thanks in advance for any guidance
        > >> Bill
        > >>
        > >>
        > >
        > >
        > > --
        > > "Therefore, send not to know For whom the bell tolls. It
        tolls 
        for thee."
        > >
        > > http://flex.joshmcdonald.info/
        > >
        > > :: Josh 'G-Funk' McDonald
        
        > > :: 0437 221 380 :: [EMAIL PROTECTED]
        > > 
        > >
        >
        
        



-- 
Teoti Graphix, LLC
http://www.teotigraphix.com

Teoti Graphix Blog
http://www.blog.teotigraphix.com

You can find more by solving the problem then by 'asking the question'.

 


Reply via email to