Monkey-patching is a necessary evil because Adobe didn't want to fully
document every API used to build the framework because then we'd be
locked into supporting it forever, and then we'd be really restricted on
making improvements to the framework.

 

Depending on what you monkey-patch, you might eliminate your ability to
take advantage of the shared framework RSLs.

 

Amazingly, I've helped answer 1000's of customer issues with only maybe
one or two answers requiring monkey-patching.  I've been able to find
ways around most problems in ways that still let you use the shared
RSLs.  But monkey-patching can be faster than figuring out a clever
workaround w/o monkey-patching.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Josh McDonald
Sent: Thursday, July 31, 2008 8:19 PM
To: [email protected]
Subject: Re: [flexcoders] Re: Overriding function not marked for
override?

 

Indeed, hence my monkey-patch recommendation. I've got several
monkey-patches in the SOAP encoder code that we include in all our
projects. When and if my fixes all make it into svn then we'll
monkey-patch with the official file, and when they make it into a
release we'll use that. But don't be afraid to monkey-patch stuff from
the framework if you need to!

However, in this case you're probably trying to do something in the
wrong way, so perhaps you should post some stuff about what you're
actually trying to achieve and somebody might be able to help in a way
that doesn't require modifying any framework code.

-Josh

On Fri, Aug 1, 2008 at 12:13 PM, zyzzx00_99 <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:

If you need to override functions in framework components that are
private (or what have you), why not just copy all of the code from
that component and make your own?  Sure, future functionality might be
in-the-air, but for Flex3 stuff certain off-limits stuff is sometimes
needed.




--- In [email protected] <mailto:[email protected]> ,
"chigwell23" <[EMAIL PROTECTED]> wrote:
>
> Yes Josh it is protected read-only .... why would the flex developers
> intentionally cripple the functionality like this? Rhetorical question
> I guess :-(
>
> --- In [email protected] <mailto:[email protected]>
, "Josh McDonald" <dznuts@> wrote:
> >
> > If it's a protected read-only, you won't be able to expose it
without
> > monkey-patching the original file, as _renderData is almost
> certainly going
> > to be private, so you can never set it.
> >
> > -Josh
> >
> > On Fri, Aug 1, 2008 at 8:37 AM, Amy <amyblankenship@> wrote:
> >
> > > --- In [email protected]
<mailto:[email protected]> , "chigwell23" <chigwell23@>
> > > wrote:
> > > >
> > > > Again thanks for all the help so far ... turns out that
> > > >
> > > > LineSeries.RenderData is a protected property
> > > >
> > > > renderData    property
> > > > renderData:Object  [read-only]
> > > >
> > > > Stores the information necessary to render this series.
> > > >
> > > > Implementation
> > > >     protected function get renderData():Object
> > > >
> > > > ... so I presume I have to subclass LineSeries to make it
publicly
> > > > available which gives errors on both attempts:
> > > >
> > > > package
> > > > {
> > > >       import mx.charts.series.LineSeries;
> > > >
> > > >       public class myLineSeries extends LineSeries
> > > >       {
> > > >
> > > >               // overriding a function not marked for override
> > > >               // incompatible override
> > > >               public function get renderData():Object{
> > > >                       return super.renderData;
> > > >               }
> > > >
> > > >               // incompatible override
> > > >               override public function get renderData():Object {
> > > return
> > > > super.renderData; }
> > > >
> > > >
> > > >       }
> > > > }
> > >
> > > try
> > >
> > > override protected function get...
> > >
> > >
> > > ------------------------------------
> > >
> > > --
> > > Flexcoders Mailing List
> > > FAQ:
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
<http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt> 
> > > Search Archives:
> > > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo
<http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo> !
Groups
> > > Links
> > >
> > >
> > >
> > >
> >
> >
> > --
> > "Therefore, send not to know For whom the bell tolls. It tolls for
> thee."
> >
> > :: Josh 'G-Funk' McDonald
> > :: 0437 221 380 :: josh@
> >
>



------------------------------------

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
<http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt> 
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo
<http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo> ! Groups
Links


   (Yahoo! ID required)

   mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> 






-- 
"Therefore, send not to know For whom the bell tolls. It tolls for
thee."

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 

 

Reply via email to