[flexcoders] Re: Overriding function not marked for override? Why ...

2008-08-01 Thread Amy
--- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote:

 Not sure I follow what you want, but could you manipulate a view of 
your
 data, rather than having to mess about with charting internals? I 
don't know
 much about charting so I don't know how much you can customize without
 getting into the secret sauce :)

I'd think you could use a data function on the lineSeries to force it 
to use the axis of the bar series.

Just a thought;

Amy



[flexcoders] Re: Overriding function not marked for override? Why ...

2008-08-01 Thread chigwell23
Hi Amy, both the column series and the line series use the same
horizontal axis

mx:horizontalAxis
  mx:CategoryAxis id=hAxis categoryField=mfg/
/mx:horizontalAxis

mx:series
  mx:ColumnSeries id=colPrevSeries 
  horizontalAxis={hAxis} ...

  mx:ColumnSeries id=colCurrSeries
horizontalAxis={hAxis} ...

 mx:LineSeries id=percSeries
 horizontalAxis={hAxis} ...


--- In flexcoders@yahoogroups.com, Amy [EMAIL PROTECTED] wrote:

 --- In flexcoders@yahoogroups.com, Josh McDonald dznuts@ wrote:
 
  Not sure I follow what you want, but could you manipulate a view of 
 your
  data, rather than having to mess about with charting internals? I 
 don't know
  much about charting so I don't know how much you can customize without
  getting into the secret sauce :)
 
 I'd think you could use a data function on the lineSeries to force it 
 to use the axis of the bar series.
 
 Just a thought;
 
 Amy





[flexcoders] Re: Overriding function not marked for override? Why ...

2008-08-01 Thread Amy
--- In flexcoders@yahoogroups.com, chigwell23 [EMAIL PROTECTED] 
wrote:

 Hi Amy, both the column series and the line series use the same
 horizontal axis
 
 mx:horizontalAxis
   mx:CategoryAxis id=hAxis categoryField=mfg/
 /mx:horizontalAxis
 
 mx:series
   mx:ColumnSeries id=colPrevSeries 
   horizontalAxis={hAxis} ...
 
   mx:ColumnSeries id=colCurrSeries   
 
 horizontalAxis={hAxis} ...
 
  mx:LineSeries id=percSeries
  horizontalAxis={hAxis} ...

If the Category axis is the same and the Category is the same, I'd 
expect it to line up?



[flexcoders] Re: Overriding function not marked for override?

2008-07-31 Thread Amy
--- In flexcoders@yahoogroups.com, chigwell23 [EMAIL PROTECTED] 
wrote:

 Again thanks for all the help so far ... turns out that
 
 LineSeries.RenderData is a protected property
 
 renderDataproperty 
 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...



Re: [flexcoders] Re: Overriding function not marked for override?

2008-07-31 Thread Josh McDonald
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 [EMAIL PROTECTED] wrote:

 --- In flexcoders@yahoogroups.com, chigwell23 [EMAIL PROTECTED]
 wrote:
 
  Again thanks for all the help so far ... turns out that
 
  LineSeries.RenderData is a protected property
 
  renderDataproperty
  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
 Search Archives:
 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 :: [EMAIL PROTECTED]


[flexcoders] Re: Overriding function not marked for override?

2008-07-31 Thread chigwell23
Yes Josh it is protected read-only  why would the flex developers
intentionally cripple the functionality like this? Rhetorical question
I guess :-(

--- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] 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 [EMAIL PROTECTED] wrote:
 
  --- In flexcoders@yahoogroups.com, chigwell23 chigwell23@
  wrote:
  
   Again thanks for all the help so far ... turns out that
  
   LineSeries.RenderData is a protected property
  
   renderDataproperty
   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
  Search Archives:
  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 :: [EMAIL PROTECTED]





Re: [flexcoders] Re: Overriding function not marked for override?

2008-07-31 Thread Josh McDonald
If it's actually read-only, and doesn't have an mx_internal way to mess with
it, then it probably means that it's not really a variable, because it's
immutable. Think of it as a late-set constant. If they've written a bunch of
logic that depends on the immutability of a property and you mess with it,
things will almost certainly break.

-Josh

On Fri, Aug 1, 2008 at 10:06 AM, 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 flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] 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 [EMAIL PROTECTED] wrote:
 
   --- In flexcoders@yahoogroups.com, chigwell23 chigwell23@
   wrote:
   
Again thanks for all the help so far ... turns out that
   
LineSeries.RenderData is a protected property
   
renderDataproperty
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
   Search Archives:
   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 :: [EMAIL PROTECTED]
 



 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives:
 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 :: [EMAIL PROTECTED]


[flexcoders] Re: Overriding function not marked for override?

2008-07-31 Thread zyzzx00_99
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 flexcoders@yahoogroups.com, 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 flexcoders@yahoogroups.com, 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 flexcoders@yahoogroups.com, chigwell23 chigwell23@
   wrote:
   
Again thanks for all the help so far ... turns out that
   
LineSeries.RenderData is a protected property
   
renderDataproperty
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
   Search Archives:
   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@
 





Re: [flexcoders] Re: Overriding function not marked for override?

2008-07-31 Thread Josh McDonald
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] 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 flexcoders@yahoogroups.com, 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 flexcoders@yahoogroups.com, 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 flexcoders@yahoogroups.com, chigwell23 chigwell23@
wrote:

 Again thanks for all the help so far ... turns out that

 LineSeries.RenderData is a protected property

 renderDataproperty
 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
Search Archives:
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
 Search Archives:
 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 :: [EMAIL PROTECTED]


RE: [flexcoders] Re: Overriding function not marked for override?

2008-07-31 Thread Alex Harui
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: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh McDonald
Sent: Thursday, July 31, 2008 8:19 PM
To: flexcoders@yahoogroups.com
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 flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ,
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 flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com
, 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 flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com , chigwell23 chigwell23@
   wrote:
   
Again thanks for all the help so far ... turns out that
   
LineSeries.RenderData is a protected property
   
renderDataproperty
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] 

 



[flexcoders] Re: Overriding function not marked for override? Why ...

2008-07-31 Thread chigwell23
Thank you all for your continued patience ... and here's the why:

Column chart, 3 series, first 2 =  column series of manufacturer prev
sales, current sales clustered so the chart shows prev and curr
sales for each manufacturer as dual columns. The third series is
percent, a line series whose data equates to the difference between
prev and curr for each manufacturer as a %. The percent data points 
must be line segments above their respective column cluster
_
 _ _
 __
_   | |_ | |
  _| |  | | |   _| |
 | | |  | | |  | | |

mx:LineSeries id=percSeries form=horizontal /

draws a line segment fragment very nicely, but the line starts above
the middle of the second/curr column and continues to the next data
point. I tried to break into horizontal in lineseries.as but lost
the trail. So on to 

mx:LineSeries id=percSeries lineSegmentRenderer=PercentLineRenderer/

and within the renderer 

g.drawRect(item.x - adjustment, item.y, 50 - adjustment,5);

where the adjustments must manipulate the starting point and length of
the line to position it above the column pair. Column pairs move
around horizontally on a Flex chart depending on the underlying data,
so even though the manufacturers are constant for each view the time
periods alter, if curr sales = 0 for 1 manufacturer, there is no
column and all the other columns move about. So there must be series
interaction - the percent series renderer needs information about the
column series to make its adjustments. 
   Learning from you guys I was able to access the chart object from
within the renderer

override protected function updateDisplayList(unscaledWidth:Number,
 
unscaledHeight:Number):void
  { 
var lc:ColumnChart;
var ls:LineSeries = parent as LineSeries;
lc = ls.owner as ColumnChart;

and inspecting lc to see what I could use, I found

lc.series[0].seriesRenderData

which contained renderedXOffset and renderedhalfWidth, the actual
params used to render the column series. Since renderedXOffset changes
when the columns reposition themselves, I thought it was likely I had
found an attribute I could use to tell me what was going on with the
columns so I could calculate the adjustment in 

g.drawRect(item.x - adjustment, item.y, 50 - adjustment2,5);

i.e. knowledge of the column series by the line series. When I found
out that seriesRenderData (renderData in LineSeries.as) was protected
I attempted to subclass LineSeries .as with this stuff

public class myLineSeries extends LineSeries
{

// overriding a function not marked for override
// incompatible override
private function get renderData():Object{
return super.renderData;
}

// incompatible override
override protected function get renderData():Object { return
 super.renderData; }

Synopsis: Percent line segments must hover symetrically over the
associated column pairs

TIA in 64 point font,

Mic

--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 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: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Josh McDonald
 Sent: Thursday, July 31, 2008 8:19 PM
 To: flexcoders@yahoogroups.com
 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