[flexcoders] Bug in ByteArray?

2009-12-08 Thread jnewport
So I have some code (below) that clones an arrayCollection. It works the first 
time through doesn't work the next time through.  The objects that are getting 
cloned are a custom object called Node. So my AC has a list of Nodes in it.  
The first time the clone returns an Object of type:Object (so pass in Nodes out 
comes Objects).  The second time through I pass in another list of Nodes and 
out comes Nodes. Not what I want.

Why would the code below spit out two different things?  I have debugged this 
and walked it through and yes I know nodes are going in each time.

private function clone( source:Object ) :*
{
var myBA:ByteArray = new ByteArray();
myBA.writeObject( source );
myBA.position = 0;
return( myBA.readObject() );
}


private function buildTreeCollection( 
ac:ArrayCollection ) : void
{
var newAC:ArrayCollection = new 
ArrayCollection( clone( ac.source ) );
// add checked to all leaf objects
for each( var o:Object in newAC ){
o.checked = 0;
} 

_sortedTreeCollection = new TreeCollection( 
newAC );
// add checked to all folder objects
for each ( var ob:Object in 
_sortedTreeCollection ) {
ob.checked = 0;
}
trace('');
//myTree.dataProvider = tree;
if( _sortedTreeCollection.length  0 ) { 
typeTree.visible = true; 
typeTree.includeInLayout = true;
}
//this.height = Math.max( 150, 
typeTree.measureHeightOfItems(0, _sortedTreeCollection.length) + this.height );

}



[flexcoders] Re: bytearray.readObject doesn't convert my objects back

2009-10-31 Thread jnewport

How would I go about doing that?  Would I need to null out the transform object 
first before converting to a bytearray?  Here is my object structure I am 
trying to save:

Data
  NodeDatalist (list of nodes like an array)
 Node (think graph or tree vertice)
   Nodedata ( children nodes, parent node) 
   Visualdata ( transform etc)
 Node (think graph or tree vertice)
   Nodedata ( children nodes, parent node) 
   Visualdata ( rendered, transform etc)
 n..
  Edgedatalist
 Edge(think graph or tree vertice)
   Edgedata ( children nodes, parent node) 
   Visualdata ( rendered, transform etc)
 Edgedata ( children nodes, parent node) 
   Visualdata ( rendered, transform etc)
 n...
  Tree (tree structure data)




 
--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 To handle classes like transform, I would come up with a custom encoding for 
 the transform (or skip it entirely as the transform can usually be derived 
 from other properties like scale, x, y, width, height, rotation).  I didn't 
 know you were trying to serialize display objects.  Generally that's not 
 advisable as there is a lot of redundancy and circular references in the 
 properties.  It is better to save away the data they present and some notion 
 of which class to use to present the data.
 
 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of flexaustin
 Sent: Friday, October 30, 2009 6:08 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: bytearray.readObject doesn't convert my objects back
 
 
 
 Alex, first thanks for spending so much time helping me with this.
 
 How do I handle all the rest? Flex specific classes? Should I monkey patch? 
 See error below my custom object needs to have all this serialized and 
 dematerialized as well.:
 
 ArgumentError: Error #1063: Argument count mismatch on 
 flash.geom::Transform(). Expected 1, got 0.
 
 Jason
 
 --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex 
 Harui aharui@ wrote:
 
  Serialization requires that the constructor handle zero parameters. So just 
  try:
 
  public function DataList(name:String = null)
 
 
  Alex Harui
  Flex SDK Developer
  Adobe Systems Inc.http://www.adobe.com/
  Blog: http://blogs.adobe.com/aharui
 
  From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com 
  [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On 
  Behalf Of flexaustin
  Sent: Friday, October 30, 2009 11:42 AM
  To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] Re: bytearray.readObject doesn't convert my objects 
  back
 
 
 
  I don't think so. Its just that it isn't just a generic simple Object or 
  Array but rather a large Class file which contains other large class files.
 
  So imagine saving something like your entire displaylist, but not the 
  visual just the data behind it.
 
  The object I am saving cotains over 100 over objects and these 100 objects 
  contains a handful of objects.
 
  Jason
 
  --- In 
  flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com,
   seanmcmonahan sean@ wrote:
  
   Do you think the class being dynamic is causing this issue? I ask because 
   I have a similar problem with a dynamic class that extends Dictionary. It 
   works fine in Flash Player 9.0.28 but not in 10.
  
   --- In 
   flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com,
Alex Harui aharui@ wrote:
   
Yeah, I think that's because Proxy is an odd beast. It is dynamic and 
can have any property and you're responsible for implementing all 
those methods that help iterate the object.
   
Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui
   
From: 
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com
 
[mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com]
 On Behalf Of flexaustin
Sent: Friday, October 30, 2009 9:40 AM
To: 
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com
Subject: [flexcoders] Re: bytearray.readObject doesn't convert my 
objects back
   
   
   
   
Can't even use an JSON encoding
   
at com.adobe.serialization.json::JSONEncoder/objectToString()
   
jason
   
--- In 
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com,
 flexaustin flexaustin@ wrote:

 What about using the JSONEncoder and JSONDecoder? Will I have the 
 same issue?

 Jason



 --- In 
 

[flexcoders] Using CSS for forms

2007-02-26 Thread jnewport
I was wondering if anyone knows how to style a Flex 2.0 form with CSS.
 I had read an article on it once, but I can't seem to find it now.  

I am looking to layout my form elements with CSS so that if I need to
bump the elements to left or right I can do it in one place without
having to move each one over separately.

Thanks in advance.

J



[flexcoders] Re: Display Object BUG?

2007-01-22 Thread jnewport
I guess nobody has the answer?

J




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

 Ok, did some shallow digging and the problem only shows up in Firefox
 (2.0.0.1) not in IE 7.0.  In firefox if you have the bookmarks toolbar
  showing it causes this issue. If you uncheck (turnoff) the bookmarks
 toolbar the problem goes away.
 
 Not sure why this would affect only the datagrid? Or datagrids as a
 whole? I guess its some sort of scaling issue.  
 
 Not sure how to make the entire movie scale, but will have to dig for
 that.
 
 In the meantime, can anyone explain why a toolbar would affect a
 datagrid like this? Any Adobe Flex employees on this board wanting to
 take a stab at this?
 
 Jason
 
 
 
 --- In flexcoders@yahoogroups.com, jnewport jason_newport@ wrote:
 
  Wish this would have been fixed in 2.0.1, I can't turn in projects
  when they are showing a glaring bug like this. 
  
  Anyone else have any input?
  
  Jason
  
  
  
   In flexcoders@yahoogroups.com, wayne_badu_johnson
  Wayne.A.Johnson@ wrote:
  
   Hi Jason
   
   You are not alone, I have experienced this as well.
   sorry no workarounds to give you though.
   
   Cheers
   Wayne
   
   --- In flexcoders@yahoogroups.com, jnewport jason_newport@ 
   wrote:
   
Wondering if anyone else has seen this issue?  Whenever you
 scroll in
a datagrid it shows information outside or above the datagrid 
   container. 

See example here:

http://www.adhder.com/test/DBone.jpg

Scroll to the bottom to see the BUG.  

This datagrid contains item renders, but it has happened in normal
datagrids as well.
   
  
 





[flexcoders] Re: Display Object BUG?

2007-01-17 Thread jnewport
Wish this would have been fixed in 2.0.1, I can't turn in projects
when they are showing a glaring bug like this. 

Anyone else have any input?

Jason



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

 Hi Jason
 
 You are not alone, I have experienced this as well.
 sorry no workarounds to give you though.
 
 Cheers
 Wayne
 
 --- In flexcoders@yahoogroups.com, jnewport jason_newport@ 
 wrote:
 
  Wondering if anyone else has seen this issue?  Whenever you scroll in
  a datagrid it shows information outside or above the datagrid 
 container. 
  
  See example here:
  
  http://www.adhder.com/test/DBone.jpg
  
  Scroll to the bottom to see the BUG.  
  
  This datagrid contains item renders, but it has happened in normal
  datagrids as well.
 





[flexcoders] Re: Display Object BUG?

2007-01-17 Thread jnewport
Ok, did some shallow digging and the problem only shows up in Firefox
(2.0.0.1) not in IE 7.0.  In firefox if you have the bookmarks toolbar
 showing it causes this issue. If you uncheck (turnoff) the bookmarks
toolbar the problem goes away.

Not sure why this would affect only the datagrid? Or datagrids as a
whole? I guess its some sort of scaling issue.  

Not sure how to make the entire movie scale, but will have to dig for
that.

In the meantime, can anyone explain why a toolbar would affect a
datagrid like this? Any Adobe Flex employees on this board wanting to
take a stab at this?

Jason



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

 Wish this would have been fixed in 2.0.1, I can't turn in projects
 when they are showing a glaring bug like this. 
 
 Anyone else have any input?
 
 Jason
 
 
 
  In flexcoders@yahoogroups.com, wayne_badu_johnson
 Wayne.A.Johnson@ wrote:
 
  Hi Jason
  
  You are not alone, I have experienced this as well.
  sorry no workarounds to give you though.
  
  Cheers
  Wayne
  
  --- In flexcoders@yahoogroups.com, jnewport jason_newport@ 
  wrote:
  
   Wondering if anyone else has seen this issue?  Whenever you
scroll in
   a datagrid it shows information outside or above the datagrid 
  container. 
   
   See example here:
   
   http://www.adhder.com/test/DBone.jpg
   
   Scroll to the bottom to see the BUG.  
   
   This datagrid contains item renders, but it has happened in normal
   datagrids as well.
  
 





[flexcoders] Display Object BUG?

2007-01-16 Thread jnewport
Wondering if anyone else has seen this issue?  Whenever you scroll in
a datagrid it shows information outside or above the datagrid container. 

See example here:

http://www.adhder.com/test/DBone.jpg

Scroll to the bottom to see the BUG.  

This datagrid contains item renders, but it has happened in normal
datagrids as well.  



[flexcoders] Re: Chart as an itemRenderer in a datagrid.

2007-01-02 Thread jnewport
Or would it better to create the graph with data seperately and insert
it into a datagrid if that is possible?

Thanks, Jason



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

 I was wondering if anyone has seen a tutorial on using a linechart or
 any chart as an itemRenderer in a datagrid?
 
 I have my own version working, but it isn't modular?  I cannot reuse
 it across projects easily as I have hardcoded the data to match my
 current arrayCollection, which is being used to populate my linechart.
 
 Just wonder if anyone else has had this issue or seen a tut.
 
 Thanks in advance.  Happy New Year!
 
 J





[flexcoders] Re: row data overlaps the datagrid header while scrolling ?

2007-01-02 Thread jnewport
This overlap has happened to me also, but only when using certain CSS
files. I did not resize any text in the datagrid it just happens on
its own.  When it happened to me it was when I was using the MAC OS
css file, which you can download from the web. 

If you are using your own defined css try using the standard halo.

Jason


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

 Hi all,
 
 I facing a lot of problem with datagrid, in my datagrid user can
 change the fontsize of the text in the rows, and row height varies to
 reflect that change. 
 
 
 
 example : if I change the font size from 8 to 12 then the rowheight
will increase by some amount. 
 
 
 
 Now when row height increases or decreases, the datagrid height remains
 contant, but rowcount varies.Everything working fine but when I scroll
 the datagrid, at some point while scrolling the row data come over the
 header, it overlapps the header. and when i reach the last, there is an
 empty row at the bottom.
 
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around 
 http://mail.yahoo.com





[flexcoders] Graphs: Can you remove all x y axis information from a lineChart?

2007-01-02 Thread jnewport
Is it possible to remove all the labeling x  y labels and data from
showing on a linechart?  What I am trying to achieve is to just have
the line show and nothing else, until you mouse of the line thus
seeing a dataTip.

I don't want to see any numbers on the x or y axis or see the x or y
axis line.

I am not sure if this is possible without extending the current
lineChart. Is it?

Thanks, Jason



[flexcoders] Re: Graphs: Can you remove all x y axis information from a lineChart?

2007-01-02 Thread jnewport
Jim, thanks for the tip.  How do you get rid of the
horizontalGridLines?  I was able to remove the x  y axis but the
small grid lines in the chart are still there. 

Any suggestions?  horizontalGridLines=false' doesn't work as it is
datagrid property.

Thanks, Jason



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

 Hi Jason,
 
 You can do this using AxisRenderers, as follows:
 
 !-- Set look  feel for y-axis --
 mx:verticalAxisRenderer
 mx:AxisRenderer showLabels=false showLine=false
 tickPlacement=none /
 /mx:verticalAxisRenderer
 
 !-- Set look  feel for x-axis --
 mx:horizontalAxisRenderer
 mx:AxisRenderer showLabels=false showLine=false 
 tickPlacement=none
 /mx:AxisRenderer
 /mx:horizontalAxisRenderer
 
 HTH
 Jim





[flexcoders] Chart as an itemRenderer in a datagrid.

2006-12-29 Thread jnewport
I was wondering if anyone has seen a tutorial on using a linechart or
any chart as an itemRenderer in a datagrid?

I have my own version working, but it isn't modular?  I cannot reuse
it across projects easily as I have hardcoded the data to match my
current arrayCollection, which is being used to populate my linechart.

Just wonder if anyone else has had this issue or seen a tut.

Thanks in advance.  Happy New Year!

J



[flexcoders] Re: itemRenderer issues

2006-12-15 Thread jnewport
Ok, a night of sleep and your comments cleared things up. I have the
else if statement because in the future we might add a third image
yellow_dot.jpg if all the other conditions fail.

What I did is just put in return statements after each assignment
statement and it works perfectly.

Thanks for your help.

J

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

 Hey Jason,
 
 It looks like you are setting the image source to null everytime, 
 after your conditional statements.  Also, you don't need else if.  
 Just using else would work in this situation.
 
 -TH
 
 --- In flexcoders@yahoogroups.com, jnewport jason_newport@ 
 wrote:
 
  Ok I am going nuts here.  Can use another set of eyes for something
  that should be easy.  I am overwriting the set data method for my
  itemRenderer like so:
  
  //Overrride the set method for the data property so 
 that when
  scrolling nothing changes
  override public function set data(value:Object):void
  {
  super.data = value;
  if(value != null)
  {
  var currentValue:Number = 
 value.perchange;
  trace(currentValue);
  toolTip=currentValue.toString
 ();
  if(currentValue  0)
  {
  image.source = 
 negativeAmountSymbol;
  } else if(currentValue = 0){
  image.source = 
 positiveAmountSymbol;
  }
  image.source = null;
  }
  }
  }
  
  
  Here is my data provider:
  
  public var CityData:ArrayCollection = new ArrayCollection([
  {
title: cycle 1, perchange: -32,
revenue:[
  { Month: Jan, Revenue: 2000 },
  { Month: Feb, Revenue: 1000 },
  { Month: Mar, Revenue: 1500 },
  { Month: Apr, Revenue: 1800 },
  { Month: May, Revenue: 2400 }
], percentage: 33
  },
  {
title: cycle 2, perchange: 33,
revenue:[
  { Month: Jan, Revenue: 1000 },
  { Month: Feb, Revenue: 230 },
  { Month: Mar, Revenue: 1500 },
  { Month: Apr, Revenue: 2800 },
  { Month: May, Revenue: 2400 }
], percentage: 15
  }
]);
  
  When I run the tooTip shows the perchange Number correctly (-32 and
  33), but the images don't show so up in the itemRenderer so 
 according
  to my code currentValue must be null.  If take out the else if
  statement and the image.source=null then it will show the
  positiveAmountSymbol because it says it isn't less than 0.
  
  What gives? Thanks in advance.
  
  jason
 





[flexcoders] itemRenderer issues

2006-12-14 Thread jnewport
Ok I am going nuts here.  Can use another set of eyes for something
that should be easy.  I am overwriting the set data method for my
itemRenderer like so:

//Overrride the set method for the data property so that when
scrolling nothing changes
override public function set data(value:Object):void
{
super.data = value;
if(value != null)
{
var currentValue:Number = 
value.perchange;
trace(currentValue);
toolTip=currentValue.toString();
if(currentValue  0)
{
image.source = 
negativeAmountSymbol;
} else if(currentValue = 0){
image.source = 
positiveAmountSymbol;
}
image.source = null;
}
}
}


Here is my data provider:

public var CityData:ArrayCollection = new ArrayCollection([
{
  title: cycle 1, perchange: -32,
  revenue:[
{ Month: Jan, Revenue: 2000 },
{ Month: Feb, Revenue: 1000 },
{ Month: Mar, Revenue: 1500 },
{ Month: Apr, Revenue: 1800 },
{ Month: May, Revenue: 2400 }
  ], percentage: 33
},
{
  title: cycle 2, perchange: 33,
  revenue:[
{ Month: Jan, Revenue: 1000 },
{ Month: Feb, Revenue: 230 },
{ Month: Mar, Revenue: 1500 },
{ Month: Apr, Revenue: 2800 },
{ Month: May, Revenue: 2400 }
  ], percentage: 15
}
  ]);

When I run the tooTip shows the perchange Number correctly (-32 and
33), but the images don't show so up in the itemRenderer so according
to my code currentValue must be null.  If take out the else if
statement and the image.source=null then it will show the
positiveAmountSymbol because it says it isn't less than 0.

What gives? Thanks in advance.

jason



[flexcoders] Chart inside a datagrid

2006-12-12 Thread jnewport
Wondering if anyone has seen a tutorial or example of how to place a
chart inside a dataGridColumn?

I assume it would be via itemRenderer, but not sure how you would set
the data property to accept multiple values.

Maybe its just as easy as sending the dataGridColumn an array of
values to plot on the chart?

Thx for you suggestions.



[flexcoders] cornerRadius and datagrid

2006-12-04 Thread jnewport
Wondering if anyone else has this issue or if its a bug or if flex
isn't capable?

I am trying to set the the attribute cornerRadius=8 for a dataGrid,
but it appear the a top layer follows the attribute, but a bottom
layer still has pointed corners. So you end up with these pointed
corners sticking out of rounded corners.

Am I missing something?

Thanks in advance, Jason



[flexcoders] Re: custom Panels original size

2006-11-07 Thread jnewport
Gordan, the code you provided has one small issue, since
originalHeight is set everytime minimize is called it resets the
minimum each time.

Is there a way to set the minimum size on creationComplete or another
function inside the custom panel? 

So for instance:

  protected override function createChildren(): void {  
 super.createChildren();
 originalHeight = this.height;
trace(originalHeight);
}

I tried the following, but it didn't work.  When the trace is called
it returns 0 so I assume this in createChildren isn't refering to
the my custom Panel or is it something else?  

This might be another subject, but can you do this parent.this.height? 





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

 'this' is always the component or application represented by the top tag
 in the file.
 
  
 
 - Gordon
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of jnewport
 Sent: Monday, November 06, 2006 1:18 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: custom Panels original size
 
  
 
 That is it thank you. I didn't know you could use this in your
 script tag. I wasn't sure it would know what this referred to.
 
 Thank, J
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Daniel Freiman FreimanCQ@ wrote:
 
  I'm a little confused at what you are doing. Posting code would
 probably
  help. But if I understand what you're trying to do correctly, you can
  probably add the following code to the panel. It should create save
 the
  hight before minimizing and then restore it later. You just need to
 call
  the two functions when you want to restore/minimize the panel.
  
  - Dan
  
  mx:Script
  ![CDATA[
  
  public var originalHeight:Number;
  
  public function minimize(event:Event):void {
  originalHeight = this.height;
  height = getStyle(headerHeight);
  }
  
  public function restore(event:Event):void {
  height = originalHeight;
  }
  ]]
  /mx:Script
  
  On 11/6/06, jnewport jason_newport@ wrote:
  
   I was wondering if any has come across this problem or solution. I
   have create a custom component that is resizable. I am able to make
   the panel smaller, but when I want it to restore back to the
 original
   size it end ups 500+ pixels long.
  
   To make it smaller I am using minimize=getStyle('headerHeight')
   but my restore function doesn't work. Is there a way to capture the
   original size of the panel on creationComplete? I tried restoring
 the
   height to the Panels child Vbox component, but it didn't work
 either.
  
   Any help or a tutorial would be greatly appreciated.
  
   Thanks, J
  
  
  
  
   --
   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.com
 http://www.mail-archive.com/flexcoders%40yahoogroups.com 
   Yahoo! Groups Links
  
  
  
  
  
 






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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] Re: custom Panels original size

2006-11-07 Thread jnewport
 Freiman [EMAIL PROTECTED] wrote:

 i don't know if this will work, but try childrenCreated(), if all
else fails
 you can override measure like this:
 
 override protected function measure():void {
super.measure();
if (isNaN(originalHeight)) {
   originalHeight = height;
}
 }
 
 this will only set originalHeight the first time it is measured.
 
 Disclaimer, I'm in a rush so I'm sorry if I screwed something up.
 
 - Dan
 
 On 11/7/06, jnewport [EMAIL PROTECTED] wrote:
 
  Gordan, the code you provided has one small issue, since
  originalHeight is set everytime minimize is called it resets the
  minimum each time.
 
  Is there a way to set the minimum size on creationComplete or another
  function inside the custom panel?
 
  So for instance:
 
protected override function createChildren(): void {
   super.createChildren();
   originalHeight = this.height;
  trace(originalHeight);
  }
 
  I tried the following, but it didn't work.  When the trace is called
  it returns 0 so I assume this in createChildren isn't refering to
  the my custom Panel or is it something else?
 
  This might be another subject, but can you do this parent.this.height?
 
 
 
 
 
  --- In flexcoders@yahoogroups.com, Gordon Smith gosmith@ wrote:
  
   'this' is always the component or application represented by the
top tag
   in the file.
  
  
  
   - Gordon
  
  
  
   
  
   From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On
   Behalf Of jnewport
   Sent: Monday, November 06, 2006 1:18 PM
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] Re: custom Panels original size
  
  
  
   That is it thank you. I didn't know you could use this in your
   script tag. I wasn't sure it would know what this referred to.
  
   Thank, J
  
   --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
   , Daniel Freiman FreimanCQ@ wrote:
   
I'm a little confused at what you are doing. Posting code would
   probably
help. But if I understand what you're trying to do correctly,
you can
probably add the following code to the panel. It should create
save
   the
hight before minimizing and then restore it later. You just
need to
   call
the two functions when you want to restore/minimize the panel.
   
- Dan
   
mx:Script
![CDATA[
   
public var originalHeight:Number;
   
public function minimize(event:Event):void {
originalHeight = this.height;
height = getStyle(headerHeight);
}
   
public function restore(event:Event):void {
height = originalHeight;
}
]]
/mx:Script
   
On 11/6/06, jnewport jason_newport@ wrote:

 I was wondering if any has come across this problem or
solution. I
 have create a custom component that is resizable. I am able
to make
 the panel smaller, but when I want it to restore back to the
   original
 size it end ups 500+ pixels long.

 To make it smaller I am using
minimize=getStyle('headerHeight')
 but my restore function doesn't work. Is there a way to
capture the
 original size of the panel on creationComplete? I tried
restoring
   the
 height to the Panels child Vbox component, but it didn't work
   either.

 Any help or a tutorial would be greatly appreciated.

 Thanks, J




 --
 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.com
   http://www.mail-archive.com/flexcoders%40yahoogroups.com
 Yahoo! Groups Links





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






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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] Re: Eclipse becoming HORRIBLY slow??

2006-11-07 Thread jnewport
Do you let Eclipse sit for a while, say checking email or other items?

You have probably tried this but...

There was blog somewhere that said XP holds the memory or something
when not using Flex Builder.  Try to minimize and restore Flex Builder
two or three times and see if that doesn't help (release usage).  

j

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

 Are there any includes in the class hierarchy?
 
 -- 
 Best regards,
  Constantinermailto:[EMAIL PROTECTED]
 
 
 SKPS Hello,
 SKPS I'm using FB2 on WinXP on a fairly modern laptop (core duo).
 SKPS I seem to be having a great deal of trouble lately with
 SKPS FlexBuilder's TEXT EDITOR (in SOURCE MODE) getting VERY VERY
 SKPS SLOW.š Slow means that I can type a 32 character line, and see a
 SKPS 10-15 second delay before all of the characters show up on the
screen.
 SKPS
 SKPS Is there some sort of GARBAGE COLLECTION that might be getting
 SKPS in the way of smooth operation?š Are there any known
conditions that I should be avoiding?
 SKPS
 SKPS Thanks in advance,
 SKPS
 SKPS Steve
 SKPS
 SKPS Steve Kellogg
 SKPS Peak8 Solutions
 SKPS 1401 14th Street
 SKPS Boulder, Colorado
 SKPS 80302, USA
 SKPS Fax: 303.415.2597
 SKPS E-Mail: [EMAIL PROTECTED]






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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] Re: Eclipse becoming HORRIBLY slow??

2006-11-07 Thread jnewport
also are you running Flex Data Services?  My maching XP laptop has
issues when running FDS for a long time and running Outlook at the
same time.  If so try leaving Flex Builder open but close down FDS and
restart FDS.



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

 Are there any includes in the class hierarchy?
 
 -- 
 Best regards,
  Constantinermailto:[EMAIL PROTECTED]
 
 
 SKPS Hello,
 SKPS I'm using FB2 on WinXP on a fairly modern laptop (core duo).
 SKPS I seem to be having a great deal of trouble lately with
 SKPS FlexBuilder's TEXT EDITOR (in SOURCE MODE) getting VERY VERY
 SKPS SLOW.š Slow means that I can type a 32 character line, and see a
 SKPS 10-15 second delay before all of the characters show up on the
screen.
 SKPS
 SKPS Is there some sort of GARBAGE COLLECTION that might be getting
 SKPS in the way of smooth operation?š Are there any known
conditions that I should be avoiding?
 SKPS
 SKPS Thanks in advance,
 SKPS
 SKPS Steve
 SKPS
 SKPS Steve Kellogg
 SKPS Peak8 Solutions
 SKPS 1401 14th Street
 SKPS Boulder, Colorado
 SKPS 80302, USA
 SKPS Fax: 303.415.2597
 SKPS E-Mail: [EMAIL PROTECTED]






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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] Re: custom Panels original size

2006-11-07 Thread jnewport
Ok, figured it out.  I call my getSized() function, which captures the
original height inside the updateDisplayList.

For those who want a resizeable panel here is what I came up with
using others work. I haven't found any bugs with it yet.  If you run
across anything let me know.

/Final code///

// ActionScript file
package components{
  import mx.containers.Panel;
  import mx.controls.Button;
  import flash.events.Event;
  import flash.display.DisplayObject;
  
  [Event(name=restore)]
  [Event(name=minimize)]
  public class MaxRestorePanel extends Panel {
private var state:int = 0; 
private var btStateUp: Button;
private var btStateDown: Button;
private var originalHeight:Number;
private var boolSized:Boolean = false;
private var hdHeight:Number;
 
[Embed(../assets/upArrow.gif)]
private var buttonUpIcon:Class;
[Embed(../assets/downArrow.gif)]
private var buttonDownIcon:Class;


private function getSized():void
{
if(boolSized == false){
originalHeight = this.height;
trace(originalHeight);
boolSized = true;
trace(boolSized);
}

}
 
private function minimizePanel():void {
   getSized();
   hdHeight = this.getStyle('headerHeight');
   this.height = hdHeight + 15;
 }   

 private function restorePanel():void {
this.percentHeight = 100;
}

 


private function setState(state:int):void{
   this.state=state;
   if (state==0){ // Minimized
  this.dispatchEvent(new Event('restore'));
   } else {
this.dispatchEvent(new Event('minimize'));
   }
}

private function doMinimize(event:Event) :void{
 setState(1);
 btStateUp.visible = false;
 btStateDown.visible = true;
 minimizePanel();

}

private function doRestore(event:Event) :void{
 setState(0);
 btStateUp.visible = true;
 btStateDown.visible = false;
 restorePanel();

}

protected override function createChildren(): void {  
 super.createChildren();
 btStateUp = new Button();
 btStateDown = new Button();
 btStateUp.addEventListener(click,doMinimize);
 btStateDown.addEventListener(click,doRestore);
 btStateUp.setStyle(overIcon,buttonUpIcon);
 btStateUp.setStyle(downIcon,buttonUpIcon);
 btStateUp.setStyle(upIcon,buttonUpIcon);
 btStateDown.setStyle(overIcon,buttonDownIcon);
 btStateDown.setStyle(downIcon,buttonDownIcon);
 btStateDown.setStyle(upIcon,buttonDownIcon);
 btStateUp.visible =true;
 btStateDown.visible =false;
 rawChildren.addChild(btStateUp);
 rawChildren.addChild(btStateDown);
  }
  
  protected override function updateDisplayList(unscaledWidth: Number,
unscaledHeight:Number):void  {
super.updateDisplayList(unscaledWidth, unscaledHeight);
  if(unscaledWidth  0){
this.visible = true;
  } else {
this.visible = false
 }
 var upAsset:DisplayObject = btStateUp.getChildByName(upIcon);
 var downAsset:DisplayObject = btStateDown.getChildByName(upIcon);
 var margin:int = 4;
 btStateUp.setActualSize(upAsset.width+margin, upAsset.height+margin);
 btStateDown.setActualSize(downAsset.width+margin,
downAsset.height+margin);
 var pixelsFromTop:int = 5;
 var pixelsFromRight:int = 10;
 var buttonWidth:int=btStateUp.width;
 var x:Number = unscaledWidth - buttonWidth - pixelsFromRight;
 var y:Number = pixelsFromTop;
 btStateDown.move(x, y);
 btStateUp.move(x, y);
 getSized();
}
  }
}

/End final code //




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

 I tried both your overrides, but they caputer the height property as
 0.  Maybe they are trying to read the height before the compenent is
 created?
 
 Although I would think that childrenCreated() would be one of last
 methods called when a panel is created?
 
 Anyone else have anys suggestions?  Here is my entire code for the
 custom resizeable Panel taken from
 http://jeff.mxdj.com/flex_2_maxrestorepanel_class.htm
 
 I have made some enhancements so that the resizing code is in the
 class rather than using the restore and minimize events. 
 
 The issue is that I am using two of these custom panels per view, one
 on top of the other.  So if you minimize say the top customPanel1 the
 lower customPanel2 expands automatically to take up the space (which
 it should do), but if you then try to minimize the bottom customPanel2
 (so both are minimized) it will set the bottom customPanel2's
 originalHeight to the expanded version (caused when it expanded to
 take up the extra space). 
 
 That probably confused you..what I am trying to do is capture the
 height when the customPanel.as compenent is first

[flexcoders] custom Panels original size

2006-11-06 Thread jnewport
I was wondering if any has come across this problem or solution.  I
have create a custom component that is resizable.  I am able to make
the panel smaller, but when I want it to restore back to the original
size it end ups 500+ pixels long.

To make it smaller I am using  minimize=getStyle('headerHeight')
but my restore function doesn't work. Is there a way to capture the
original size of the panel on creationComplete? I tried restoring the
height to the Panels child Vbox component, but it didn't work either.

Any help or a tutorial would be greatly appreciated.

Thanks, J




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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] Re: custom Panels original size

2006-11-06 Thread jnewport
That is it thank you.  I didn't know you could use this in your
script tag.  I wasn't sure it would know what this referred to.

Thank, J



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

 I'm a little confused at what you are doing.  Posting code would
probably
 help.  But if I understand what you're trying to do correctly, you can
 probably add the following code to the panel.  It should create save the
 hight before minimizing and then restore it later.  You just need to
call
 the two functions when you want to restore/minimize the panel.
 
 - Dan
 
 mx:Script
 ![CDATA[
 
 public var originalHeight:Number;
 
 public function minimize(event:Event):void {
 originalHeight = this.height;
 height = getStyle(headerHeight);
 }
 
 public function restore(event:Event):void {
 height = originalHeight;
 }
 ]]
 /mx:Script
 
 On 11/6/06, jnewport [EMAIL PROTECTED] wrote:
 
  I was wondering if any has come across this problem or solution.  I
  have create a custom component that is resizable.  I am able to make
  the panel smaller, but when I want it to restore back to the original
  size it end ups 500+ pixels long.
 
  To make it smaller I am using  minimize=getStyle('headerHeight')
  but my restore function doesn't work. Is there a way to capture the
  original size of the panel on creationComplete? I tried restoring the
  height to the Panels child Vbox component, but it didn't work either.
 
  Any help or a tutorial would be greatly appreciated.
 
  Thanks, J
 
 
 
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
  Yahoo! Groups Links
 
 
 
 
 






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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] Re: Anyone know how this is accomplished?

2006-11-02 Thread jnewport
there I go again over complicating things.  Thanks this works.

J

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

 You can just set the height property of an internal container to 0.
 
 Here is a sample:
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
   
   mx:Panel title=Hello World id=p
   mx:VBox id=vBox height=150
   mx:Label text=Just/
   mx:Label text=Some/
   mx:Label text=Filler/
   mx:Label text=for the/
   mx:Label text=Panel/
   /mx:VBox
   /mx:Panel
   
   mx:Button click=vBox.height=150 label=Open/
   mx:Button click=vBox.height=0 label=Close/
   
 /mx:Application
 
 Rich
 
 
 
 
 On 10/27/06, jnewport [EMAIL PROTECTED] wrote:
  I found this link on dashboardSPY.
 
 
http://adb.crowecs.com/flex/activeDashboard/dashBoard.mxml?versionChecked=true
 
 
  Does anyone know how they collapse the panels?  I am assuming it is by
  removing the contents of the panel, thus allowing the panel to
  collapse because its empty?  Does anyone know of an example?
 
  If you remove the child components from the panel does that kill it
  for good, meaning when you bring it back do you have to call an
  function to repopulate the child components of panel?  Or will they
  repopulate on their own when brought back?
 
  Thanks in advance?
 
  J
 
 
 
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
  Yahoo! Groups Links
 
 
 
 
 
 
 
 -- 
 Rich Tretola
 mx:EverythingFlex/
 http://www.EverythingFlex.com






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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] Re: Anyone know how this is accomplished?

2006-11-02 Thread jnewport
So if the panel is a custom component and that panelcomponent is in
another component how do you set the initial size without it pushing
out of the viewable area?

So what I have is this:

Mainapp
  - customCanvas
 - regPanel
 - customBubblepanel(panel I need to resize)

When I don't use height or width on the customCanvas, my regPanel 
customBubblepanel end up extemely long (causing scrolling).

Is there a way to tell all the components to only take up the correct
amount of space?

J 



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

 You can just set the height property of an internal container to 0.
 
 Here is a sample:
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
   
   mx:Panel title=Hello World id=p
   mx:VBox id=vBox height=150
   mx:Label text=Just/
   mx:Label text=Some/
   mx:Label text=Filler/
   mx:Label text=for the/
   mx:Label text=Panel/
   /mx:VBox
   /mx:Panel
   
   mx:Button click=vBox.height=150 label=Open/
   mx:Button click=vBox.height=0 label=Close/
   
 /mx:Application
 
 Rich
 
 
 
 
 On 10/27/06, jnewport [EMAIL PROTECTED] wrote:
  I found this link on dashboardSPY.
 
 
http://adb.crowecs.com/flex/activeDashboard/dashBoard.mxml?versionChecked=true
 
 
  Does anyone know how they collapse the panels?  I am assuming it is by
  removing the contents of the panel, thus allowing the panel to
  collapse because its empty?  Does anyone know of an example?
 
  If you remove the child components from the panel does that kill it
  for good, meaning when you bring it back do you have to call an
  function to repopulate the child components of panel?  Or will they
  repopulate on their own when brought back?
 
  Thanks in advance?
 
  J
 
 
 
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
  Yahoo! Groups Links
 
 
 
 
 
 
 
 -- 
 Rich Tretola
 mx:EverythingFlex/
 http://www.EverythingFlex.com






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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] Re: sortCompareFunction issues when dealing with $.

2006-10-27 Thread jnewport
Figured it out.  Good example here. 
http://tech.groups.yahoo.com/group/flexcoders/message/40149

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

 I was wondering if any had an easy to follow sortCompareFunction tut
 or example to follow.
 
 I am trying to sort datagrid columns that have had a labelFunction
 applied to them.  Since teh labelFunction is being used I need to
 create a custom sortCompareFunctionaccording to the Flex
 documentation.  
 
 I cannot seem to get it to work correctly.  My $ in my revenue
 Column seems to be causing issues.
 
 my data provider is as follows
 mx:DataGridColumn
 headerText={(selectioncombobox.selectedItem.toString())}
 dataField=@{lowerCase(selectioncombobox.selectedItem.toString())} 
 
 My dataProvider is an XMLListCollection so I have to use the @ symbol.
 
 So this is what I have as my sort function:
 
 public static function sortDifference(obj1:Object, obj2:Object):Number
 {
   if ([EMAIL PROTECTED] == [EMAIL PROTECTED]){
 return 0;
 }else if ([EMAIL PROTECTED]  [EMAIL PROTECTED]){
 return -1;
 }else{
 return 1;
 }
 }
 
 This is not working correctly.  Any suggestions?






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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] Anyone know how this is accomplished?

2006-10-27 Thread jnewport
I found this link on dashboardSPY.

http://adb.crowecs.com/flex/activeDashboard/dashBoard.mxml?versionChecked=true


Does anyone know how they collapse the panels?  I am assuming it is by
removing the contents of the panel, thus allowing the panel to
collapse because its empty?  Does anyone know of an example?

If you remove the child components from the panel does that kill it
for good, meaning when you bring it back do you have to call an
function to repopulate the child components of panel?  Or will they
repopulate on their own when brought back?

Thanks in advance?

J




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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] Re: array of arrays and XML

2006-10-26 Thread jnewport
Thanks Gordon that did it.  

Final outcome:  var numData:Number = hitData.item[@ + strRegDataSrc];






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

 You use square-bracket syntax to access a child tag or an attribute
 whose name you don't know at compile time: hitdata.item[@ + someVar].
 If someVar is revenue, then hitdata.item[@revenue] is the same as
 [EMAIL PROTECTED], in the same way that when o is a plain Object
 o[foo] is the same as o.foo.
 
  
 
 - Gordon
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of jnewport
 Sent: Monday, October 23, 2006 8:47 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: array of arrays and XML
 
  
 
 Well the reason is because when trying to get to the
 hitdata.item.(object) I cause problems when using XML. Since
 everything in my app is dynamic I cannot hardcode the hitdata.item
 statements in my dataTipformat function. So I cannot use
 [EMAIL PROTECTED] or [EMAIL PROTECTED] I have tried
 hitdata.item.(@ + someVar), but it doesn't work. I would be more
 than happy to use XMLlist or XMLListCollection, but it causes problems
 with hitdata and other thingsseems to cause more work later on
 though it saves me from having to turn it into an ArrayCollection.
 
 If you can tell me how to make XMLlist work using hitData.item
 statement I would be greatful.
 
 Thanks, J
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Douglas Knudsen
 douglasknudsen@ wrote:
 
  Curious, why convert to ArrayCollection at all? you can pass XML
 direct to
  a chart. Any Class supporting the dataProvider attribute can except
 any
  Collection.
  
  DK
  
  On 10/23/06, Tracy Spratt tspratt@ wrote:
  
   Use for..in loop.
  
  
  
   See the examples:
  
   http://livedocs.macromedia.com/flex/2/langref/XMLList.html
 http://livedocs.macromedia.com/flex/2/langref/XMLList.html 
  
  
  
   Tracy
  
  
   --
  
   *From:* flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] *On
   Behalf Of *jnewport
   *Sent:* Friday, October 20, 2006 4:56 PM
   *To:* flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
   *Subject:* [flexcoders] Re: array of arrays and XML
  
  
  
   Thanks for the quick response.
  
   I know its possible to loop over the XMLList, but I am not sure how
 to
   do it. I have used the XMLListCollection, but then when I try to use
   the XMLListCollection as a data provider I have use the @ symbol
 as
   you suggested below.
  
   Using the @ cause more problems because when try to make my app
   dynamic I have to try things like [EMAIL PROTECTED]) and it gets
   messy when I have to try to capitalize things like
   [EMAIL PROTECTED]({somevar}).
  
   So if you could help with how to loop through the XMLList it would
   make my code much cleaner.
  
   Thanks, J
  
   --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com  flexcoders%40yahoogroups.com,
 Tracy
   Spratt tspratt@ wrote:
   
You can loop over the XMLList and build that ArrayCollection.
   
   
   
Alternatively, you could use an XMLListCollection and do:
   
var xlcBills:XMLListCollection = new
XMLListCollection(myXMLBillsList.month.bill)
   
...no loop required. A labelField spec might be:@name or @Amount.
   
   
   
I don't do charts yet so you are on your own there.
   
   
   
Tracy
   
   
   

   
From: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com  flexcoders%40yahoogroups.com
 [mailto:
   flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 flexcoders%40yahoogroups.com] On
Behalf Of jnewport
Sent: Thursday, October 19, 2006 12:13 PM
To: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com  flexcoders%40yahoogroups.com
Subject: [flexcoders] array of arrays and XML
   
   
   
Hoping to figure this out. What I am trying to do is get a
 result like
this (ArrayCollection).
   
public var expenses:ArrayCollection = new ArrayCollection([
{Expense: Taxes, Amount: 106976},
{Expense: Rent, Amount: 147776},
{Expense: Car, Amount: 79554},
{Expense: Gas, Amount: 39252},
{Expense: Food, Amount: 128351}
   
from this XML:
   
list
   
month monthname=Jan-04 income=14000263 average=80052
bill name=Taxes Amount=106976 customers=25670/
bill name=Rent Amount=147776 customers=25670/
bill name=Car Amount=79554 customers=25670/
bill name=Gas Amount=39252 customers=25670/
bill name=Food Amount=128351 customers=25670/
/month
   
/list
   
Then use it to plot data on a piechart. I am pulling the xml in
 via a
httpservice. So I am guessing I need to iterate through the xml
 and
create an arrayCollection of arrays? But I can't figure that out

[flexcoders] sortCompareFunction issues when dealing with $.

2006-10-26 Thread jnewport
I was wondering if any had an easy to follow sortCompareFunction tut
or example to follow.

I am trying to sort datagrid columns that have had a labelFunction
applied to them.  Since teh labelFunction is being used I need to
create a custom sortCompareFunctionaccording to the Flex
documentation.  

I cannot seem to get it to work correctly.  My $ in my revenue
Column seems to be causing issues.

my data provider is as follows
mx:DataGridColumn
headerText={(selectioncombobox.selectedItem.toString())}
dataField=@{lowerCase(selectioncombobox.selectedItem.toString())} 

My dataProvider is an XMLListCollection so I have to use the @ symbol.

So this is what I have as my sort function:

public static function sortDifference(obj1:Object, obj2:Object):Number
{
if ([EMAIL PROTECTED] == [EMAIL PROTECTED]){
return 0;
}else if ([EMAIL PROTECTED]  [EMAIL PROTECTED]){
return -1;
}else{
return 1;
}
}

This is not working correctly.  Any suggestions? 




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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] Re: hitData.item.(variable)

2006-10-24 Thread jnewport
Yes, I have read the docs.  The problem is I am using
XMLListCOllection and/or XMLList to populate my graph.  So the
dataField=@revenue.

So when trying to create your own dataTipFormat I am trying to find a
way to get the [EMAIL PROTECTED], which of course does not work.

Any suggestions?

Thanks,J

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

 On Friday 20 October 2006 15:20, jnewport wrote:
  Is it possible to use a code like the following to create a dataTip?
  somePublicVariable = revenue
 
 I wouldn't have thought so, as you only get HitData after the user
has clicked 
 on the graph point.
 Have you seen the Charting docs on this very topic ?
 
 -- 
 Tom Chiverton
 Helping to elementarily transform 24/365 platforms
 
 
 
 This email is sent for and on behalf of Halliwells LLP.
 
 Halliwells LLP is a limited liability partnership registered in
England and Wales under registered number OC307980 whose registered
office address is at St James's Court Brown Street Manchester M2 2JF.
 A list of members is available for inspection at the registered
office. Any reference to a partner in relation to Halliwells LLP means
a member of Halliwells LLP. Regulated by the Law Society.
 
 CONFIDENTIALITY
 
 This email is intended only for the use of the addressee named above
and may be confidential or legally privileged.  If you are not the
addressee you must not read it and must not use any information
contained in nor copy it nor inform any person other than Halliwells
LLP or the addressee of its existence or contents.  If you have
received this email in error please delete it and notify Halliwells
LLP IT Department on 0870 365 8008.
 
 For more information about Halliwells LLP visit www.halliwells.com.







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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] Re: Errors exist in required project(s)

2006-10-24 Thread jnewport
Yes, but sometimes it doesn't show the errors.  Mabey this is bug?



Does anyone know of a best practices in testing or bug fixing in Flex?

J


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

 Do you have the problems panel showing in the bottom?  Any errors should
 be listed there.
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of jnewport
 Sent: Friday, October 20, 2006 10:02 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Errors exist in required project(s)
 
  
 
 Is there a way to find out what error is when you are not given a red
 X? I have searched my code inside and out of a very large project and
 I cannot find the problem.
 
 Is there a log file somewhere that will tell you where the problem lies?
 
 
 I am new to Flex and to programming. Does setting breakpoints help
 when you are just trying to compile the flex application?
 
 J







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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] Re: array of arrays and XML

2006-10-24 Thread jnewport
Well the reason is because when trying to get to the
hitdata.item.(object) I cause problems when using XML. Since
everything in my app is dynamic I cannot hardcode the hitdata.item
statements in my dataTipformat function. So I cannot use
[EMAIL PROTECTED] or [EMAIL PROTECTED]  I have tried
hitdata.item.(@ + someVar), but it doesn't work.  I would be more
than happy to use XMLlist or XMLListCollection, but it causes problems
 with hitdata and other thingsseems to cause more work later on
though it saves me from having to turn it into an ArrayCollection.

If you can tell me how to make XMLlist work using hitData.item
statement I would be greatful.

Thanks, J

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

 Curious, why convert to ArrayCollection at all?  you can pass XML
direct to
 a chart.  Any Class supporting the dataProvider attribute can except any
 Collection.
 
 DK
 
 On 10/23/06, Tracy Spratt [EMAIL PROTECTED] wrote:
 
   Use for..in loop.
 
 
 
  See the examples:
 
  http://livedocs.macromedia.com/flex/2/langref/XMLList.html
 
 
 
  Tracy
 
 
   --
 
  *From:* flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] *On
  Behalf Of *jnewport
  *Sent:* Friday, October 20, 2006 4:56 PM
  *To:* flexcoders@yahoogroups.com
  *Subject:* [flexcoders] Re: array of arrays and XML
 
 
 
  Thanks for the quick response.
 
  I know its possible to loop over the XMLList, but I am not sure how to
  do it. I have used the XMLListCollection, but then when I try to use
  the XMLListCollection as a data provider I have use the @ symbol as
  you suggested below.
 
  Using the @ cause more problems because when try to make my app
  dynamic I have to try things like [EMAIL PROTECTED]) and it gets
  messy when I have to try to capitalize things like
  [EMAIL PROTECTED]({somevar}).
 
  So if you could help with how to loop through the XMLList it would
  make my code much cleaner.
 
  Thanks, J
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Tracy
  Spratt tspratt@ wrote:
  
   You can loop over the XMLList and build that ArrayCollection.
  
  
  
   Alternatively, you could use an XMLListCollection and do:
  
   var xlcBills:XMLListCollection = new
   XMLListCollection(myXMLBillsList.month.bill)
  
   ...no loop required. A labelField spec might be:@name or @Amount.
  
  
  
   I don't do charts yet so you are on your own there.
  
  
  
   Tracy
  
  
  
   
  
   From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
[mailto:
  flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On
   Behalf Of jnewport
   Sent: Thursday, October 19, 2006 12:13 PM
   To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
   Subject: [flexcoders] array of arrays and XML
  
  
  
   Hoping to figure this out. What I am trying to do is get a
result like
   this (ArrayCollection).
  
   public var expenses:ArrayCollection = new ArrayCollection([
   {Expense: Taxes, Amount: 106976},
   {Expense: Rent, Amount: 147776},
   {Expense: Car, Amount: 79554},
   {Expense: Gas, Amount: 39252},
   {Expense: Food, Amount: 128351}
  
   from this XML:
  
   list
  
   month monthname=Jan-04 income=14000263 average=80052
   bill name=Taxes Amount=106976 customers=25670/
   bill name=Rent Amount=147776 customers=25670/
   bill name=Car Amount=79554 customers=25670/
   bill name=Gas Amount=39252 customers=25670/
   bill name=Food Amount=128351 customers=25670/
   /month
  
   /list
  
   Then use it to plot data on a piechart. I am pulling the xml in
via a
   httpservice. So I am guessing I need to iterate through the xml and
   create an arrayCollection of arrays? But I can't figure that out.
   Then how to use the Expenses:arrayCollection as a piechart
dataprovider.
  
   Thanks in advance.
  
 
  
 
 
 
 
 -- 
 Douglas Knudsen
 http://www.cubicleman.com
 this is my signature, like it?







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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] hitData.item.(variable)

2006-10-20 Thread jnewport
Syntax problem. 

Is it possible to use a code like the following to create a dataTip?
somePublicVariable = revenue

var strRegData:String = (@ + somePublicVariable)
hitData.item.strRegData

My somePublicVariable is set when using my custom component.  I am
trying to get strRegData to = @revenue.  

hitData.item.strRegData = [EMAIL PROTECTED]


I though valueOf() was the way to go, but it doesn't work either.

TIA!

J




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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] Errors exist in required project(s)

2006-10-20 Thread jnewport
Is there a way to find out what error is when you are not given a red
X?  I have searched my code inside and out of a very large project and
I cannot find the problem.

Is there a log file somewhere that will tell you where the problem lies? 

I am new to Flex and to programming.  Does setting breakpoints help
when you are just trying to compile the flex application?

J




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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] Re: array of arrays and XML

2006-10-20 Thread jnewport
Thanks for the quick response.  

I know its possible to loop over the XMLList, but I am not sure how to
do it. I have used the XMLListCollection, but then when I try to use
the XMLListCollection as a data provider I have use the @ symbol as
you suggested below.

Using the @ cause more problems because when try to make my app
dynamic I have to try things like [EMAIL PROTECTED]) and it gets
messy when I have to try to capitalize things like
[EMAIL PROTECTED]({somevar}).


So if you could help with how to loop through the XMLList it would
make my code much cleaner.  

Thanks, J

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

 You can loop over the XMLList and build that ArrayCollection.
 
  
 
 Alternatively, you could use an XMLListCollection and do:
 
 var xlcBills:XMLListCollection = new
 XMLListCollection(myXMLBillsList.month.bill)
 
 ...no loop required.  A labelField spec might be:@name or @Amount. 
 
  
 
 I don't do charts yet so you are on your own there.
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of jnewport
 Sent: Thursday, October 19, 2006 12:13 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] array of arrays and XML
 
  
 
 Hoping to figure this out. What I am trying to do is get a result like
 this (ArrayCollection).
 
 public var expenses:ArrayCollection = new ArrayCollection([
 {Expense: Taxes, Amount: 106976},
 {Expense: Rent, Amount: 147776},
 {Expense: Car, Amount: 79554},
 {Expense: Gas, Amount: 39252},
 {Expense: Food, Amount: 128351}
 
 from this XML:
 
 list
 
 month monthname=Jan-04 income=14000263 average=80052
 bill name=Taxes Amount=106976 customers=25670/
 bill name=Rent Amount=147776 customers=25670/
 bill name=Car Amount=79554 customers=25670/
 bill name=Gas Amount=39252 customers=25670/
 bill name=Food Amount=128351 customers=25670/
 /month
 
 /list
 
 Then use it to plot data on a piechart. I am pulling the xml in via a
 httpservice. So I am guessing I need to iterate through the xml and
 create an arrayCollection of arrays? But I can't figure that out. 
 Then how to use the Expenses:arrayCollection as a piechart dataprovider.
 
 Thanks in advance.






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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] array of arrays and XML

2006-10-19 Thread jnewport
Hoping to figure this out. What I am trying to do is get a result like
this (ArrayCollection).

   public var expenses:ArrayCollection = new ArrayCollection([
{Expense: Taxes, Amount: 106976},
{Expense: Rent, Amount: 147776},
{Expense: Car, Amount: 79554},
{Expense: Gas, Amount: 39252},
{Expense: Food, Amount: 128351}

from this XML:

list

month monthname=Jan-04 income=14000263 average=80052
bill name=Taxes Amount=106976 customers=25670/
bill name=Rent Amount=147776 customers=25670/
bill name=Car Amount=79554 customers=25670/
bill name=Gas Amount=39252 customers=25670/
bill name=Food Amount=128351 customers=25670/
/month

/list

Then use it to plot data on a piechart.  I am pulling the xml in via a
httpservice. So I am guessing I need to iterate through the xml and
create an arrayCollection of arrays?  But I can't figure that out. 
Then how to use the Expenses:arrayCollection as a piechart dataprovider.

Thanks in advance.




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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] Viewstack and creation policy

2006-10-17 Thread jnewport
Hello all.

I was wondering if I can get some help on a viewstack issue? 

In my main app file I have an applicationcontrolbar, which contains a
combobox.  The combobox is being used to navigate my viewstack.  In my
viewstack I have four custom canvas components. So something like the
following (short hand).

VS
 Canvas1
   LineChartA/
 /Canvas1
 Canvas2
   LineChartB/
 /Canvas1
 Canvas3
   LineChartC/
 /Canvas1
 Canvas4
   LineChartD/
 /Canvas1
VS/

The viewstacks initial selectedIndex is set to 0 which is Canvas1.
The Canvas1 shows my LineChart without the linedata, so no actual
graph. If you use the comboBox navigation to go to any of the other 3
canvas's the graphs show. The LineChart is getting its data via binding.

I am assuming it has to do with the creation policy, but I have tried
using creationPolicy=all and creationIndex, but no luck. I have
tried swaping canvas1 and canvas2 in the view stack (so canvas2 is the
initial view), but then canvas2's graph is blank and canvas1 is
showing corretcly.

Any ideas? 


Thanks, in advance.

J




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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] Re: Viewstack and creation policy

2006-10-17 Thread jnewport
I have done some digging and it appears it is that my dataprovider of
all the canvas's (Canvas1, Canvas2, etc...), which is the same for all
four canvas's isn't  being created before my viewstack is created.  Is
there a way to tell the Viewstack to wait to be created last and then
tell Canvas1 inside the Viewstack to be created 2nd?

I put another canvas in front of Canvas1 and so Canvas0 and now
Canvas1 correctly populates with the data.  

J  

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

 Hello all.
 
 I was wondering if I can get some help on a viewstack issue? 
 
 In my main app file I have an applicationcontrolbar, which contains a
 combobox.  The combobox is being used to navigate my viewstack.  In my
 viewstack I have four custom canvas components. So something like the
 following (short hand).
 
 VS
  Canvas1
LineChartA/
  /Canvas1
  Canvas2
LineChartB/
  /Canvas1
  Canvas3
LineChartC/
  /Canvas1
  Canvas4
LineChartD/
  /Canvas1
 VS/
 
 The viewstacks initial selectedIndex is set to 0 which is Canvas1.
 The Canvas1 shows my LineChart without the linedata, so no actual
 graph. If you use the comboBox navigation to go to any of the other 3
 canvas's the graphs show. The LineChart is getting its data via binding.
 
 I am assuming it has to do with the creation policy, but I have tried
 using creationPolicy=all and creationIndex, but no luck. I have
 tried swaping canvas1 and canvas2 in the view stack (so canvas2 is the
 initial view), but then canvas2's graph is blank and canvas1 is
 showing corretcly.
 
 Any ideas? 
 
 
 Thanks, in advance.
 
 J






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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] Re: Format a datatip.

2006-10-11 Thread jnewport
 Code to use the dataTip

mx:CurrencyFormatter id=cf/

mx:Panel id=ComparePanel title=State Comparison width=75%
height=100%
mx:LineChart id=revlinechart
dataProvider={slicedMonthData.source}
 
showDataTips=true dataTipFunction=formatDataTip width=100% 
height=100%

mx:horizontalAxis
mx:CategoryAxis 
categoryField=month/
/mx:horizontalAxis
mx:verticalAxis
mx:LinearAxis 
maximum=16 minimum=0
labelFunction=currencyFormat/
/mx:verticalAxis


/mx:LineChart

/mx:Panel

//End MXML Code to use the dataTip

J

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

 Ok got it.  Thanks for all your help Ely!  I decided to rework my
 ArrayCollection and now can just use month for the categoryAxis
 instead of month:, which means I can just use hitData.item.month to
 get the month for the dataTip.
 
 J :)
 
 
 
 --- In flexcoders@yahoogroups.com, jnewport jason_newport@ wrote:
 
  Can you get direct access of horizontalAxis?  No matter what I try it
  does not like horizontalAxis.  Maybe giving it an id and directly
  accessing it by reference?
  
  J
  
  --- In flexcoders@yahoogroups.com, Ely Greenfield egreenfi@ wrote:
  



   Yup. If you don't specify an x value, it assumes the item's ordinal
   position in the data is its x value. The Cateogry Axis then lines
 up the
   value N to the nth category in _its_ data.

   The Axis objects all implement a function called formatForScreen().
   Pass it a value (i.e., like the value in xValue) and it will
 return what
   it considers to be an appropriate string to represent that value on
   string (in this case, the category name).  So get access to the
   horizontal axis, and call formatForScreen on it.

   Ely.

   
   
   
   From: flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] On
   Behalf Of jnewport
   Sent: Friday, October 06, 2006 2:12 PM
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] Re: Format a datatip.
   
   
   
   Ok, I have the revenue part working and formatting it. Thank you.
   But, I cannot get the MONTH to show. Month is my categoryField.
   
   categoryField=month:
   
   Below is what I have for my formatDataTip, but I cannot seem to find
   the MONTH. I have tried useing hitData.element and hitData.item.
   I thought it would be LineSeriesItem(hitData.chartItem).xValue, but
   that just gives me 0, 1, 2, n (guessing it is the position
of data
   in the ArrayCollection I am using to populate my graph.
   
   Any suggestions?
   
   private function formatDataTip(hitData:HitData):String{
   //var months:String = LineSeries(hitData.element);//Not working
   var name:String = LineSeries(hitData.element).yField;
   var revenue:Object = LineSeriesItem(hitData.chartItem).yValue;
   return b+name+/bbr+months+br+cf.format(revenue);
   }
   
   --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
   , Ely Greenfield egreenfi@ wrote:
   


Sorry...try:

LineSeriesItem(hitData.chartItem).y.value;

Ely.




From: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
   [mailto:flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
   ] On
Behalf Of jnewport
Sent: Tuesday, October 03, 2006 12:47 PM
To: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
Subject: [flexcoders] Re: Format a datatip.



This throws an error.

Cannot convert Object@ to mx.chart.series.items.LineSeriesItem

/Start of datatipcode///
private function formatDataTip(hitData:HitData):String{

var months:String = LineSeriesItem(hitData.item).yValue;
var name:String = hitData.item.toString();
var revenue:Number = hitData.item.revenue;
return b+name+/bbr+months+br+cf.format(revenue);
}

//End datatip code

Any suggestions?

--- In flexcoders@yahoogroups.com
   mailto:flexcoders%40yahoogroups.com
   mailto:flexcoders%40yahoogroups.com
, Ely Greenfield egreenfi@ wrote:

 
 
 
 LineSeriesItem(hitData.item).yValue
 
 Ely

[flexcoders] Re: Format a datatip.

2006-10-10 Thread jnewport
Can you get direct access of horizontalAxis?  No matter what I try it
does not like horizontalAxis.  Maybe giving it an id and directly
accessing it by reference?

J

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

  
  
  
 Yup. If you don't specify an x value, it assumes the item's ordinal
 position in the data is its x value. The Cateogry Axis then lines up the
 value N to the nth category in _its_ data.
  
 The Axis objects all implement a function called formatForScreen().
 Pass it a value (i.e., like the value in xValue) and it will return what
 it considers to be an appropriate string to represent that value on
 string (in this case, the category name).  So get access to the
 horizontal axis, and call formatForScreen on it.
  
 Ely.
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of jnewport
 Sent: Friday, October 06, 2006 2:12 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Format a datatip.
 
 
 
 Ok, I have the revenue part working and formatting it. Thank you.
 But, I cannot get the MONTH to show. Month is my categoryField.
 
 categoryField=month:
 
 Below is what I have for my formatDataTip, but I cannot seem to find
 the MONTH. I have tried useing hitData.element and hitData.item.
 I thought it would be LineSeriesItem(hitData.chartItem).xValue, but
 that just gives me 0, 1, 2, n (guessing it is the position of data
 in the ArrayCollection I am using to populate my graph.
 
 Any suggestions?
 
 private function formatDataTip(hitData:HitData):String{
 //var months:String = LineSeries(hitData.element);//Not working
 var name:String = LineSeries(hitData.element).yField;
 var revenue:Object = LineSeriesItem(hitData.chartItem).yValue;
 return b+name+/bbr+months+br+cf.format(revenue);
 }
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Ely Greenfield egreenfi@ wrote:
 
  
  
  Sorry...try:
  
  LineSeriesItem(hitData.chartItem).y.value;
  
  Ely.
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of jnewport
  Sent: Tuesday, October 03, 2006 12:47 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: Format a datatip.
  
  
  
  This throws an error.
  
  Cannot convert Object@ to mx.chart.series.items.LineSeriesItem
  
  /Start of datatipcode///
  private function formatDataTip(hitData:HitData):String{
  
  var months:String = LineSeriesItem(hitData.item).yValue;
  var name:String = hitData.item.toString();
  var revenue:Number = hitData.item.revenue;
  return b+name+/bbr+months+br+cf.format(revenue);
  }
  
  //End datatip code
  
  Any suggestions?
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , Ely Greenfield egreenfi@ wrote:
  
   
   
   
   LineSeriesItem(hitData.item).yValue
   
   Ely.
   
   
   
   
   From: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  [mailto:flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  ] On
   Behalf Of jnewport
   Sent: Friday, September 29, 2006 12:35 PM
   To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
   Subject: [flexcoders] Re: Format a datatip.
   
   
   
   I tried that, but didn't work correctly.
   
   LineSeries.(hitData.element).yField. which gave me the State name,
   but it won't give me the amount, which is what I am trying to get to
   do format.
   
   I have been trying to use chartItem, but no success. Flex can get me
   all the data on its own with the showDataTips=true, so it knows how
 to
   get the data out of my ArrayCollection. I just want to be able to
 get
   at what Flex knows. 
   
   I need to get at what showDataTips is doing when set to True. 
   
   Anyone know what it is?
   
   --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com
  mailto:flexcoders%40yahoogroups.com
   , Mehdi, Agha Agha.Mehdi@ wrote:
   
J,

Try event.hitData.element.yField/.xField

Agha Mehdi
IDT - eBusiness Program Manager

-Original Message-
From: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com
  mailto:flexcoders%40yahoogroups.com
   [mailto:flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com
  mailto:flexcoders%40yahoogroups.com
   ] On
Behalf Of jnewport
Sent: Friday, September 29, 2006 9:11 AM
To: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders

[flexcoders] Re: Format a datatip.

2006-10-10 Thread jnewport
Ok got it.  Thanks for all your help Ely!  I decided to rework my
ArrayCollection and now can just use month for the categoryAxis
instead of month:, which means I can just use hitData.item.month to
get the month for the dataTip.

J :)



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

 Can you get direct access of horizontalAxis?  No matter what I try it
 does not like horizontalAxis.  Maybe giving it an id and directly
 accessing it by reference?
 
 J
 
 --- In flexcoders@yahoogroups.com, Ely Greenfield egreenfi@ wrote:
 
   
   
   
  Yup. If you don't specify an x value, it assumes the item's ordinal
  position in the data is its x value. The Cateogry Axis then lines
up the
  value N to the nth category in _its_ data.
   
  The Axis objects all implement a function called formatForScreen().
  Pass it a value (i.e., like the value in xValue) and it will
return what
  it considers to be an appropriate string to represent that value on
  string (in this case, the category name).  So get access to the
  horizontal axis, and call formatForScreen on it.
   
  Ely.
   
  
  
  
  From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On
  Behalf Of jnewport
  Sent: Friday, October 06, 2006 2:12 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Re: Format a datatip.
  
  
  
  Ok, I have the revenue part working and formatting it. Thank you.
  But, I cannot get the MONTH to show. Month is my categoryField.
  
  categoryField=month:
  
  Below is what I have for my formatDataTip, but I cannot seem to find
  the MONTH. I have tried useing hitData.element and hitData.item.
  I thought it would be LineSeriesItem(hitData.chartItem).xValue, but
  that just gives me 0, 1, 2, n (guessing it is the position of data
  in the ArrayCollection I am using to populate my graph.
  
  Any suggestions?
  
  private function formatDataTip(hitData:HitData):String{
  //var months:String = LineSeries(hitData.element);//Not working
  var name:String = LineSeries(hitData.element).yField;
  var revenue:Object = LineSeriesItem(hitData.chartItem).yValue;
  return b+name+/bbr+months+br+cf.format(revenue);
  }
  
  --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
  , Ely Greenfield egreenfi@ wrote:
  
   
   
   Sorry...try:
   
   LineSeriesItem(hitData.chartItem).y.value;
   
   Ely.
   
   
   
   
   From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
  [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
  ] On
   Behalf Of jnewport
   Sent: Tuesday, October 03, 2006 12:47 PM
   To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
   Subject: [flexcoders] Re: Format a datatip.
   
   
   
   This throws an error.
   
   Cannot convert Object@ to mx.chart.series.items.LineSeriesItem
   
   /Start of datatipcode///
   private function formatDataTip(hitData:HitData):String{
   
   var months:String = LineSeriesItem(hitData.item).yValue;
   var name:String = hitData.item.toString();
   var revenue:Number = hitData.item.revenue;
   return b+name+/bbr+months+br+cf.format(revenue);
   }
   
   //End datatip code
   
   Any suggestions?
   
   --- In flexcoders@yahoogroups.com
  mailto:flexcoders%40yahoogroups.com
  mailto:flexcoders%40yahoogroups.com
   , Ely Greenfield egreenfi@ wrote:
   



LineSeriesItem(hitData.item).yValue

Ely.




From: flexcoders@yahoogroups.com
  mailto:flexcoders%40yahoogroups.com
  mailto:flexcoders%40yahoogroups.com
   [mailto:flexcoders@yahoogroups.com
  mailto:flexcoders%40yahoogroups.com
  mailto:flexcoders%40yahoogroups.com
   ] On
Behalf Of jnewport
Sent: Friday, September 29, 2006 12:35 PM
To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
  mailto:flexcoders%40yahoogroups.com 
Subject: [flexcoders] Re: Format a datatip.



I tried that, but didn't work correctly.

LineSeries.(hitData.element).yField. which gave me the State name,
but it won't give me the amount, which is what I am trying to
get to
do format.

I have been trying to use chartItem, but no success. Flex can
get me
all the data on its own with the showDataTips=true, so it
knows how
  to
get the data out of my ArrayCollection. I just want to be able to
  get
at what Flex knows. 

I need to get at what showDataTips is doing when set to True. 

Anyone know what it is?

--- In flexcoders@yahoogroups.com
  mailto:flexcoders%40yahoogroups.com 
   mailto:flexcoders%40yahoogroups.com
   mailto:flexcoders%40yahoogroups.com
, Mehdi, Agha Agha.Mehdi@ wrote:

 J,
 
 Try event.hitData.element.yField/.xField
 
 Agha Mehdi
 IDT - eBusiness Program Manager
 
 -Original Message-
 From

[flexcoders] Re: Format a datatip.

2006-10-06 Thread jnewport
Ok, I have the revenue part working and formatting it.  Thank you.
But, I cannot get the MONTH to show.  Month is my categoryField.

 categoryField=month:

Below is what I have for my formatDataTip, but I cannot seem to find
the MONTH.  I have tried useing hitData.element and hitData.item.
I thought it would be LineSeriesItem(hitData.chartItem).xValue, but
that just gives me 0, 1, 2, n (guessing it is the position of data
in the ArrayCollection I am using to populate my graph.

Any suggestions?

private function formatDataTip(hitData:HitData):String{
   //var months:String = LineSeries(hitData.element);//Not working
   var name:String = LineSeries(hitData.element).yField;
   var revenue:Object = LineSeriesItem(hitData.chartItem).yValue;
   return b+name+/bbr+months+br+cf.format(revenue);
}






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

  
  
 Sorry...try:
  
 LineSeriesItem(hitData.chartItem).y.value;
  
 Ely.
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of jnewport
 Sent: Tuesday, October 03, 2006 12:47 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Format a datatip.
 
 
 
 This throws an error.
 
 Cannot convert Object@ to mx.chart.series.items.LineSeriesItem
 
 /Start of datatipcode///
 private function formatDataTip(hitData:HitData):String{
 
 var months:String = LineSeriesItem(hitData.item).yValue;
 var name:String = hitData.item.toString();
 var revenue:Number = hitData.item.revenue;
 return b+name+/bbr+months+br+cf.format(revenue);
 }
 
 //End datatip code
 
 Any suggestions?
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Ely Greenfield egreenfi@ wrote:
 
  
  
  
  LineSeriesItem(hitData.item).yValue
  
  Ely.
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of jnewport
  Sent: Friday, September 29, 2006 12:35 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: Format a datatip.
  
  
  
  I tried that, but didn't work correctly.
  
  LineSeries.(hitData.element).yField. which gave me the State name,
  but it won't give me the amount, which is what I am trying to get to
  do format.
  
  I have been trying to use chartItem, but no success. Flex can get me
  all the data on its own with the showDataTips=true, so it knows how to
  get the data out of my ArrayCollection. I just want to be able to get
  at what Flex knows. 
  
  I need to get at what showDataTips is doing when set to True. 
  
  Anyone know what it is?
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , Mehdi, Agha Agha.Mehdi@ wrote:
  
   J,
   
   Try event.hitData.element.yField/.xField
   
   Agha Mehdi
   IDT - eBusiness Program Manager
   
   -Original Message-
   From: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  [mailto:flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  ] On
   Behalf Of jnewport
   Sent: Friday, September 29, 2006 9:11 AM
   To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
   Subject: [flexcoders] Format a datatip.
   
   I was wondering how to format a datatip for a LineChart. If I use
   showDataTips everything looks good but the amounts are not formatted
   to $##,###. I have created an ArrayCollection that looks like the
   following.
   
   private var expensesAC:ArrayCollection = new ArrayCollection( [
   { Month: Jan, Texas: 2000, Utah: 1500, Kansas: 450 },
   { Month: Feb, Texas: 1000, Utah: 200, Kansas: 600 },
   { Month: Mar, Texas: 1500, Utah: 500, Kansas: 300 },
   { Month: Apr, Texas: 1800, Utah: 1200, Kansas: 900 },
   { Month: May, Texas: 2400, Utah: 575, Kansas: 500 } ]);
   
   I have tried to use cf.format(); on the data before its put into the
   ArrayCollection, which works so I get something like this.
   
   private var expensesAC:ArrayCollection = new ArrayCollection( [
   { Month: Jan, Texas: $2,000, Utah: $1,500, Kansas: $450 },
   
   But then Flex won't plot the dataguessing it doesn't like the
 $.
  
   
   
   So I am trying to use a function like this
   
   private function formatDataTip(hitData:HitData):String {
   var month:String = hitData.item.DONTKNOWWHATSHOULDGOHERE
   
   but I don't know what should come after item. I have tried to do a
   trace(hitData.item.toString), but I get object object. Is there a
 way
   to trace out whats in the hitData.item? 
   
   J
   
   
   
   
   
   
   --
   Flexcoders Mailing List
   FAQ:
 http://groups.yahoo.com/group/flexcoders/files

[flexcoders] Re: Format a datatip.

2006-10-03 Thread jnewport
This throws an error.

Cannot convert [EMAIL PROTECTED] to mx.chart.series.items.LineSeriesItem

/Start of datatipcode///
private function formatDataTip(hitData:HitData):String{

   var months:String = LineSeriesItem(hitData.item).yValue;
   var name:String = hitData.item.toString();
   var revenue:Number = hitData.item.revenue;
   return b+name+/bbr+months+br+cf.format(revenue);
}

//End datatip code

Any suggestions?

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

  
  
  
 LineSeriesItem(hitData.item).yValue
  
 Ely.
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of jnewport
 Sent: Friday, September 29, 2006 12:35 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Format a datatip.
 
 
 
 I tried that, but didn't work correctly.
 
 LineSeries.(hitData.element).yField. which gave me the State name,
 but it won't give me the amount, which is what I am trying to get to
 do format.
 
 I have been trying to use chartItem, but no success. Flex can get me
 all the data on its own with the showDataTips=true, so it knows how to
 get the data out of my ArrayCollection. I just want to be able to get
 at what Flex knows. 
 
 I need to get at what showDataTips is doing when set to True. 
 
 Anyone know what it is?
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Mehdi, Agha Agha.Mehdi@ wrote:
 
  J,
  
  Try event.hitData.element.yField/.xField
  
  Agha Mehdi
  IDT - eBusiness Program Manager
  
  -Original Message-
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of jnewport
  Sent: Friday, September 29, 2006 9:11 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Format a datatip.
  
  I was wondering how to format a datatip for a LineChart. If I use
  showDataTips everything looks good but the amounts are not formatted
  to $##,###. I have created an ArrayCollection that looks like the
  following.
  
  private var expensesAC:ArrayCollection = new ArrayCollection( [
  { Month: Jan, Texas: 2000, Utah: 1500, Kansas: 450 },
  { Month: Feb, Texas: 1000, Utah: 200, Kansas: 600 },
  { Month: Mar, Texas: 1500, Utah: 500, Kansas: 300 },
  { Month: Apr, Texas: 1800, Utah: 1200, Kansas: 900 },
  { Month: May, Texas: 2400, Utah: 575, Kansas: 500 } ]);
  
  I have tried to use cf.format(); on the data before its put into the
  ArrayCollection, which works so I get something like this.
  
  private var expensesAC:ArrayCollection = new ArrayCollection( [
  { Month: Jan, Texas: $2,000, Utah: $1,500, Kansas: $450 },
  
  But then Flex won't plot the dataguessing it doesn't like the $.
 
  
  
  So I am trying to use a function like this
  
  private function formatDataTip(hitData:HitData):String {
  var month:String = hitData.item.DONTKNOWWHATSHOULDGOHERE
  
  but I don't know what should come after item. I have tried to do a
  trace(hitData.item.toString), but I get object object. Is there a way
  to trace out whats in the hitData.item? 
  
  J
  
  
  
  
  
  
  --
  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.com
 http://www.mail-archive.com/flexcoders%40yahoogroups.com  
  Yahoo! Groups Links
 








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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: Format a datatip.

2006-09-29 Thread jnewport
I tried that, but didn't work correctly.

LineSeries.(hitData.element).yField.  which gave me the State name,
but it won't give me the amount, which is what I am trying to get to
do format.

I have been trying to use chartItem, but no success.  Flex can get me
all the data on its own with the showDataTips=true, so it knows how to
get the data out of my ArrayCollection.  I just want to be able to get
at what Flex knows.  

I need to get at what showDataTips is doing when set to True.  

Anyone know what it is?




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

 J,
 
 Try event.hitData.element.yField/.xField
 
 Agha Mehdi
 IDT - eBusiness Program Manager
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of jnewport
 Sent: Friday, September 29, 2006 9:11 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Format a datatip.
 
 I was wondering how to format a datatip for a LineChart. If I use
 showDataTips everything looks good but the amounts are not formatted
 to $##,###.  I have created an ArrayCollection that looks like the
 following.
 
 private var expensesAC:ArrayCollection = new ArrayCollection( [
 { Month: Jan, Texas: 2000, Utah: 1500, Kansas: 450 },
 { Month: Feb, Texas: 1000, Utah: 200, Kansas: 600 },
 { Month: Mar, Texas: 1500, Utah: 500, Kansas: 300 },
 { Month: Apr, Texas: 1800, Utah: 1200, Kansas: 900 },
 { Month: May, Texas: 2400, Utah: 575, Kansas: 500 } ]);
 
 I have tried to use cf.format(); on the data before its put into the
 ArrayCollection, which works so I get something like this.
 
 private var expensesAC:ArrayCollection = new ArrayCollection( [
 { Month: Jan, Texas: $2,000, Utah: $1,500, Kansas: $450 },
 
 But then Flex won't plot the dataguessing it doesn't like the $.  
 
 
 So I am trying to use a function like this
 
 private function formatDataTip(hitData:HitData):String {
 var month:String = hitData.item.DONTKNOWWHATSHOULDGOHERE
 
 but I don't know what should come after item. I have tried to do a
 trace(hitData.item.toString), but I get object object.  Is there a way
 to trace out whats in the hitData.item? 
 
 J
 
 
 
 
 
 
 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.com 
 Yahoo! Groups Links







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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Re: Bug?: Array not populating List.

2006-09-28 Thread jnewport
Thank you. Thank you. Thank you.  

Does it show that I am just a beginner here?  All that code gone with
just your one line.  You rock!  If you worked for me you just got a
$1000.00 raise.

Thank you, Jason

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

 The syntax you are using is a bit odd:
 
NumberOfDistricts = new Number(xmldpAddress.month
 [0].child(*).length());
 
tempDistricts = new Array(NumberOfDistricts);
for (var i:Number = 0; i  NumberOfDistricts;
i++){
tempDistricts[i] = (xmldpAddress.month
 [EMAIL PROTECTED]);
}
 
districts = tempDistricts;
 
 
trace(districts);
 
 I would write it (in your code style) as:
 
NumberOfDistricts = xmldpAddress.month[0].region.length();
 
tempDistricts = new Array();
var i:int = 0;
for (i = 0; i  NumberOfDistricts; i++)
{
tempDistricts[i] =
[EMAIL PROTECTED]();
}
 
districts = tempDistricts;
 
 
 However its probably easier to do something like this (didnt test):
 
districts = new XMLListCollection(xmldpAddress.month[0].region);
 
 with
 
   mx:List id=districtList dataProvider={districts}
labelField=@name
 /
 
 districts should be desclared as a XMLListCollection.
 
 Greetz Erik








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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: Expression for an array object name?

2006-09-28 Thread jnewport
How can I print out what obj contains?  I have tried
trace(obj.toString()), but I get [object object].


Thanks for your help you don't know how much I appreciate it.

J



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

 Hello,
 
 maybe something like this:
 
 monthlysVO = new Array()
 
 var children:XMLList = xmldpAddress.month;
 var child:XML;
 var obj:Object;
 var j:int;
 var length_int:int = chilren.length();
 
 for  (j = 0; j  length; j++)
 {
 child = children[j];
 
 obj = new Object();
 [EMAIL PROTECTED] = [EMAIL PROTECTED];
 monthlysVO.push(obj);
 }
 
 
 Greetz Erik








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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Bug?: Array not populating List.

2006-09-27 Thread jnewport
Why is my list not being populated with the data in my array? My trace
statement shows that the Array districts (and I have tried
districts as ArrayCollection) contains the data, but with my
mx:List dataprovider={districts} it shows the list as empty?

Is this a bug in flex?



NumberOfDistricts = new
Number(xmldpAddress.month[0].child(*).length());

tempDistricts = new Array(NumberOfDistricts);
for (var i:Number = 0; i  NumberOfDistricts; i++){
tempDistricts[i] = ([EMAIL PROTECTED]);
} 

districts = tempDistricts;


trace(districts);   


partial mxml code//

mx:Panel maxWidth=135 width=25% height=100%
mx:List id=districtList dataProvider={districts}
width=100 height=100% resize=false allowMultipleSelection=true
dragEnabled=true/
/mx:Panel






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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Re: Bug?: Array not populating List.

2006-09-27 Thread jnewport
Yes, districts is set to 

[Bindable]
public var districts:Array;

j :)

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

  
   Did you declare districts as  [Bindable]? 
 
   
 
 --- In flexcoders@yahoogroups.com, jnewport jason_newport@ 
 wrote:
 
  Why is my list not being populated with the data in my array? My 
 trace
  statement shows that the Array districts (and I have tried
  districts as ArrayCollection) contains the data, but with my
  mx:List dataprovider={districts} it shows the list as empty?
  
  Is this a bug in flex?
  
  
  
  NumberOfDistricts = new
  Number(xmldpAddress.month[0].child(*).length());
  
  tempDistricts = new Array(NumberOfDistricts);
  for (var i:Number = 0; i  NumberOfDistricts; 
 i++){
  tempDistricts[i] = (xmldpAddress.month
 [EMAIL PROTECTED]);
  } 
  
  districts = tempDistricts;
  
  
  trace(districts);   
  
  
  partial mxml code//
  
  mx:Panel maxWidth=135 width=25% height=100%
  mx:List id=districtList dataProvider={districts}
  width=100 height=100% resize=false 
 allowMultipleSelection=true
  dragEnabled=true/
  /mx:Panel
 








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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Expression for an array object name?

2006-09-27 Thread jnewport
Is it possible to have an array object name be an expression?  See
below?  

I am getting errors if I try to use a word with spaces such as New
Orleans: it works if I use NewOrleans:.  Alternatively, I tried the
expression, [EMAIL PROTECTED]:,below to replace New
Orleans: and Flex gave me errors.  



monthlysVO = new Array(xmldpAddress.child(*).length());
  for (var j:Number = 0; j  xmldpAddress.child(*).length(); j++)
{ 
   monthlysVO[j] = {
[EMAIL PROTECTED]: [EMAIL PROTECTED], 
New Orleans: [EMAIL PROTECTED];
}






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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: Bug?: Array not populating List.

2006-09-27 Thread jnewport
On the result of my httpService call(see below).


private function LoadXML(event:ResultEvent):void{
xmldpAddress = new XML(event.target.lastResult);


NumberOfDistricts = new Number(xmldpAddress.month[0].child(*).length());

tempDistricts = new Array(NumberOfDistricts);
for (var i:Number = 0; i  NumberOfDistricts; i++){
tempDistricts[i] = ([EMAIL PROTECTED]);
} 

districts = tempDistricts;


trace(districts);


}



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

 
   When and where are you calling the function that 
 populates districts
 
This is a working example I put together based on you code below.
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
 layout=absolute
   creationComplete=init()
 mx:Script
   ![CDATA[
   [Bindable]
   public var districts:Array;
   
   public function init():void{
   var NumberOfDistricts:Number = new Number(4);
   var tempDistricts:Array = new Array
 (NumberOfDistricts);
   
   for (var i:Number = 0; i  NumberOfDistricts; i++){
   tempDistricts[i] = (June +i);
   }
   districts = tempDistricts;  
   
   trace(districts);
   }
 
   ]]
 /mx:Script
 
 mx:Panel maxWidth=135 width=25% height=100%
   mx:List id=districtList dataProvider={districts}
   width=100 height=100% resize=false 
 allowMultipleSelection=true
   dragEnabled=true/
 /mx:Panel
 
 
   
 /mx:Application
 
 --- In flexcoders@yahoogroups.com, jnewport jason_newport@ 
 wrote:
 
  Yes, districts is set to 
  
  [Bindable]
  public var districts:Array;
  
  j :)
  
  --- In flexcoders@yahoogroups.com, Oscar oscar_cortes@ wrote:
  

 Did you declare districts as  [Bindable]? 
   
 
   
   --- In flexcoders@yahoogroups.com, jnewport jason_newport@ 
   wrote:
   
Why is my list not being populated with the data in my array? 
 My 
   trace
statement shows that the Array districts (and I have tried
districts as ArrayCollection) contains the data, but with my
mx:List dataprovider={districts} it shows the list as empty?

Is this a bug in flex?



NumberOfDistricts = new
Number(xmldpAddress.month[0].child(*).length());

tempDistricts = new Array
 (NumberOfDistricts);
for (var i:Number = 0; i  
 NumberOfDistricts; 
   i++){
tempDistricts[i] = 
 (xmldpAddress.month
   [EMAIL PROTECTED]);
} 

districts = tempDistricts;


trace(districts);   


partial mxml code//

mx:Panel maxWidth=135 width=25% height=100%
mx:List id=districtList dataProvider={districts}
width=100 height=100% resize=false 
   allowMultipleSelection=true
dragEnabled=true/
/mx:Panel
   
  
 






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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Drag and Drop from a List to a LineChart

2006-09-26 Thread jnewport
Rookie here! I was wondering if some can take a shot at solution on
this?  

I am trying to drag a list of states from a List to a LineChart and
then have the LineChart display the data for each USState dragged in.

I am thinking there are two ways:

#1 Put the each USStates data into an Array from an xml file, which I
tried but then the List show all the data instead of just the name of
the USState (so you get Texas: 423, 367, 987 instead of just Texas). 
This, if I can get it to work would be easiest since the Array
containing the USState data would just populate the LineChart easily.

#2 The second option, which I am using, is pull in the xml and placing
into USStates Arrays (TexasArray, MontanaArray,etc...).  Then I am
creating a seperate Array with just the name of the State (Texas,
Montana,etc...)  I have all this working, but of course when I drag
selected List items and drag them into the LineChart it is just
dragging in the name of the State (eg. Texas) not any data to plot on
the LineChart. 

The problem I am have using #2 is how can I tell the line LineChart to
 grab the appropriate USState data Array from the name of State passed
by the drag and drop.  So the List passes the LineChart Texas and
the Linechart plots Texas: 423, 367, 987.

Please tell me there is a way to do #1?

Let me thank you ahead of time for your help.

J  :(






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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Re: XML issues

2006-09-25 Thread jnewport
/
region name=Marble revenue=88912/
region name=Bert revenue=69677/
region name=Cedar revenue=59428/
region name=Bill revenue=90804/
/month

list

END XML///

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

 It is not the XML structure.  Either of those two examples would be
 fine.
 
  
 
 Can you take this a step at a time?
 
  
 
 Can you get data into a datagrid at all?  I don't do much charting, but
 can the line chart use the same dataProvider that the data grid does?
 Hard code a sample XML structure into an XML variable.
 
  
 
 Structure your code so that the two controls are bound to a global
 variable dataProvider, probably an XMLListCollection.  Code a function
 that uses an e4x expression against the XML variable to set the value of
 that collection (use the collection API).
 
  
 
 The slider dataProvider needs to ba a different var. A different e4x
 expression can return that collection or XMLList from the same base XML
 data  On the change event of the slider, call the function that uses the
 e4x expression to set the dataProvider for the grid and chart, filtering
 for the data you want.
 
  
 
 You haven't said what problems you have been having. Or posted any code,
 so I can't be more specific.
 
  
 
 What debugging techniques do you have available?
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of jnewport
 Sent: Friday, September 22, 2006 4:00 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] XML issues
 
  
 
 Ok, I have just wasted an entire week.and I think I am going to go
 insane. I have read every livedoc, flex doc and still no solution is
 working. 
 
 Either the issue is my XML structure (though tried several)
 Or its my code or could be both.
 
 Below are both xml structures. What I am trying to do is use the data
 (via a httpService) in BOTH a datagrid and linechart. And tie the
 datagrid and linechart to a slider. So I can map out the data for
 each state on a chart for the year and then let the slider control the
 months shown on the datagrid and linechart. I can't seem to pull the
 data out of the xml and use it to populate the datagrid, line chart,
 and slider. I tried e4x and bringing the data.xml file into an array
 like the example Adobe dashboard example. I would prefer not having
 to parse through the xml file and create several arrays for each
 region in the xml file unless I have to. I tried the new dot
 notation, but then I had issue with the slider and trying to convert
 the xml object into an array to populate the slider.
 
 What is the best format for xml and what is the easiest way to
 populate the datagrid, slider, and linechart? 
 
 [First Try XML]
 list
 month name=Jan-04 revenue=400263 average=80052
 region name=Maine revenue=46130/
 region name=Nebraska revenue=106976/
 region name=Montana revenue=79554/
 region name=Texas revenue=39252/
 region name=Kansas revenue=128351/
 /month
 
 month name=Feb-04 revenue=379145 average=75829
 region name=Maine revenue=70324/
 region name=Nebraska revenue=88912/
 region name=Montana revenue=69677/
 region name=Texas revenue=59428/
 region name=Kansas revenue=90804/
 /month
 /list
 
 [Second Try XML]
 list
 month name=Jan-04
 state
 nameMaine/name
 revenue34343/revenue
 /state
 state
 nameNebraska/name
 revenue23232/revenue
 /state
 state
 nameMontana/name
 revenue6/revenue
 /state
 /month
 month name=Feb-04
 state
 nameMaine/name
 revenue11343/revenue
 /state
 state
 nameNebraska/name
 revenue29932/revenue
 /state
 state
 nameMontana/name
 revenue55644/revenue
 /state
 /month
 /list






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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] XML issues

2006-09-22 Thread jnewport
Ok, I have just wasted an entire week.and I think I am going to go
insane.  I have read every livedoc, flex doc and still no solution is
working.  

Either the issue is my XML structure (though tried several)
Or its my code or could be both.

Below are both xml structures.  What I am trying to do is use the data
(via a httpService) in BOTH a datagrid and linechart. And tie the
datagrid and linechart to a slider.  So I can map out the data for
each state on a chart for the year and then let the slider control the
months shown on the datagrid and linechart.  I can't seem to pull the
data out of the xml and use it to populate the datagrid, line chart,
and slider.  I tried e4x and bringing the data.xml file into an array
like the example Adobe dashboard example.  I would prefer not having
to parse through the xml file and create several arrays for each
region in the xml file unless I have to.  I tried the new dot
notation, but then I had issue with the slider and trying to convert
the xml object into an array to populate the slider.

What is the best format for xml and what is the easiest way to
populate the datagrid, slider, and linechart? 

[First Try XML]
list
month name=Jan-04 revenue=400263 average=80052
region name=Maine revenue=46130/
region name=Nebraska revenue=106976/
region name=Montana revenue=79554/
region name=Texas revenue=39252/
region name=Kansas revenue=128351/
/month

month name=Feb-04 revenue=379145 average=75829
region name=Maine revenue=70324/
region name=Nebraska revenue=88912/
region name=Montana revenue=69677/
region name=Texas revenue=59428/
region name=Kansas revenue=90804/
/month
/list

[Second Try  XML]
list
month name=Jan-04
state
nameMaine/name
revenue34343/revenue
/state
state
nameNebraska/name
revenue23232/revenue
/state
state
nameMontana/name
revenue6/revenue
/state
/month
month name=Feb-04
state
nameMaine/name
revenue11343/revenue
/state
state
nameNebraska/name
revenue29932/revenue
/state
state
nameMontana/name
revenue55644/revenue
/state
/month
/list






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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Re: ArrayCollection returns object Object

2006-09-21 Thread jnewport
--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 Yes, like that, especially the resultFormat=e4x, that is key.  Forget
 mx:Model forever.  
 
Tried this, but non of it worked. the trace function call throws an
error...not sure if I am doing it correctly.  I put the trace call in
the resultHandler function and then told it to print to a text area
through binding.  Still throws error...doesn't like the trace statement.

I tried the other items you suggested and continously throws errors. 
It says the XMLListColletion doesnt' exist.  Think you mean XMLList
which I also tried and still throwing errors.


I have used Jamies so far and it is working so far, but still having
issues with getting out the XML I want.  Trying different XML format.

Thanks, Jason

  
 
 Just use evt.result.  Use lastResult only in binding expressions.
 
  
 
 Also, in the resultHandler (your argument is typed correctly, Jamie's
 example is not), do:
 
 trace(event.result.toXMLString())
 
 To see exactly what your XML is.  I think you will find that result is
 already at the root node, so your would have:
 
 var monthData:XML = event.result.month;
 
  
 
 Would give you an XMLList or Month nodes.  To use that for a list
 dataprovider, do:
 
 var xlcDP:XMLListCollection = new XMLListCollection(monthData);
 
  
 
 Tracy
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Jamie O
 Sent: Wednesday, September 20, 2006 1:43 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: ArrayCollection returns object Object
 
  
 
 I'll take my best attempt.
 
 1) Create the XML variable you will need to map the HTTPService object
 data to and create a function that will handle the result call of your
 HTTPService call.
 mx:Script
 ![CDATA[
 import mx.rpc.events.ResultEvent;
 
 [Bindable]
 private var xmldpAddress:XML;
 
 public function LoadXML(evt:Event):void {
 xmldpAddress = new XML(evt.target.lastResult);
 //Do other result-driven actions here
 }
 ]]
 
 2) In your HTTPService call a function to handle the result event:
 mx:HTTPService
 id=feedRequest 
 url = [PATH GOES HERE]
 useProxy=false
 resultFormat=e4x 
 result=LoadXML(event)
 /
 
 3) So when you trigger the request via feedRequest.send() function
 from either the creationComplete part of the application or a button
 event, it calls the service, the service calls your result function
 and the result function maps that service data object into an XML
 format.
 
 4) As a result, you can then use dot notation for the XML in any
 dataprovider you want.
 
 mx:TextInput x=139 y=143 width=151 id=txtProv
 editable=false enabled=false text=[EMAIL PROTECTED]/
 
 At that point, the help page under Programming ActionScript 3.0  Core
 ActionScript 3.0 Data Types and Classes  Working with XML 
 Traversing XML Structures should give you all the examples you need to
 bind the particular data you're looking for.
 
 Good luck!
 Jamie
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , jnewport jason_newport@ wrote:
 
  I was wondering if someone can help me (preference) or point me to a
  tutorial on xml and data structures that are not hardcoded.
  
  I am using an HttpService to retreive xml and I can get result, but
  when I use it to populate a List I get object Object. All livedocs
  and info tells you how to use arrays, arraycollections, and xml when
  the xml is hardcoded in the app.
  
  Here is my file and xml.
  
  FILE
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
 http://www.adobe.com/2006/mxml  xmlns=*
  paddingTop=3
  creationComplete=initApp()
  pageTitle=Dashboard
  
  mx:Style source=OSX.css/
  
  mx:Script
  ![CDATA[
  import mx.rpc.events.ResultEvent;
  import mx.collections.ArrayCollection;
  import mx.rpc.*;
  import mx.charts.*;
  
  
  [Bindable]
  public var slicedMonthData:ArrayCollection;
  
  [Bindable]
  public var slicedRegionData:ArrayCollection;
  
  [Bindable]
  public var JasonsAC:ArrayCollection;
  
  private var monthData:Array;
  private var regionData:Array;
  
  private function initApp():void
  {
  srv.send();
  slicedMonthData = new ArrayCollection();
  slicedRegionData = new ArrayCollection();
  }
  
  
  private function resultHandler(event:ResultEvent):void
  {
  monthData = event.result.list.month.source as Array;
  slider.maximum = monthData.length - 1;
  slider.values = [0, monthData.length - 1];
  slicedMonthData.source = monthData;
  JasonsAC = new ArrayCollection(slicedMonthData.source);
  //regionBreakdown.month = monthData[0];//
  
  }
  
  private function getSliderLabel(value:String):String
  {
  return monthData[parseInt(value)].name;
  }
  
  
  
  private function rangeChange():void
  {
  if (monthData != null)
  slicedMonthData.source =
  monthData.slice(slider.values[0], slider.values[1] + 1);
  if (regionData != null)
  slicedRegionData.source = regionData.slice(slider.values[0

[flexcoders] Re: ArrayCollection returns object Object

2006-09-21 Thread jnewport
That would explain why it cannot find it.  -doh


Thanks for all your help.



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

 Regarding trace, I am pretty sure that whatever you mean by ...told it
 to print to a text area through binding., won't work. Trace() sends
 output to the flashlog.txt file.  Seting up tracing involves creating /
 modifying the mm.cfg file.  Its documented in the developer's guide.
 
  
 
 Instead of tracing you can use Alert, or you can assign whatever data
 you want to the textArea.text property. Or you can use the debugger.
 Whatever debugging method you choose, you want to be able to see exactly
 what your result object contains.  Otherwise you just have to guess
 until you get the references right.
 
  
 
 One major benefit of XMLListCollection (or ArrayCollection) is that
 their methods, like addItem(), emit the necessary events to make the
 Flex controls visually update. XMLList and Array methods do not.
 
  
 
 Also, if you are using e4x with XMLLIstCollection, at any point you need
 you can trace out myXMLItem.toXMLString() and see exactly what the
 current node contains.
 
  
 
 To use these classes you must import them:
 
 import mx.collections.XMLListCollection;
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of jnewport
 Sent: Thursday, September 21, 2006 10:03 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: ArrayCollection returns object Object
 
  
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Tracy Spratt tspratt@ wrote:
 
  Yes, like that, especially the resultFormat=e4x, that is key. Forget
  mx:Model forever. 
  
 Tried this, but non of it worked. the trace function call throws an
 error...not sure if I am doing it correctly. I put the trace call in
 the resultHandler function and then told it to print to a text area
 through binding. Still throws error...doesn't like the trace statement.
 
 I tried the other items you suggested and continously throws errors. 
 It says the XMLListColletion doesnt' exist. Think you mean XMLList
 which I also tried and still throwing errors.
 
 I have used Jamies so far and it is working so far, but still having
 issues with getting out the XML I want. Trying different XML format.
 
 Thanks, Jason
 
  
  Just use evt.result. Use lastResult only in binding expressions.
  
  
  
  Also, in the resultHandler (your argument is typed correctly, Jamie's
  example is not), do:
  
  trace(event.result.toXMLString())
  
  To see exactly what your XML is. I think you will find that result is
  already at the root node, so your would have:
  
  var monthData:XML = event.result.month;
  
  
  
  Would give you an XMLList or Month nodes. To use that for a list
  dataprovider, do:
  
  var xlcDP:XMLListCollection = new XMLListCollection(monthData);
  
  
  
  Tracy
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of Jamie O
  Sent: Wednesday, September 20, 2006 1:43 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: ArrayCollection returns object Object
  
  
  
  I'll take my best attempt.
  
  1) Create the XML variable you will need to map the HTTPService object
  data to and create a function that will handle the result call of your
  HTTPService call.
  mx:Script
  ![CDATA[
  import mx.rpc.events.ResultEvent;
  
  [Bindable]
  private var xmldpAddress:XML;
  
  public function LoadXML(evt:Event):void {
  xmldpAddress = new XML(evt.target.lastResult);
  //Do other result-driven actions here
  }
  ]]
  
  2) In your HTTPService call a function to handle the result event:
  mx:HTTPService
  id=feedRequest 
  url = [PATH GOES HERE]
  useProxy=false
  resultFormat=e4x 
  result=LoadXML(event)
  /
  
  3) So when you trigger the request via feedRequest.send() function
  from either the creationComplete part of the application or a button
  event, it calls the service, the service calls your result function
  and the result function maps that service data object into an XML
  format.
  
  4) As a result, you can then use dot notation for the XML in any
  dataprovider you want.
  
  mx:TextInput x=139 y=143 width=151 id=txtProv
  editable=false enabled=false text=[EMAIL PROTECTED]/
  
  At that point, the help page under Programming ActionScript 3.0  Core
  ActionScript 3.0 Data Types and Classes  Working with XML 
  Traversing XML Structures should give you all the examples you need to
  bind the particular data you're looking for.
  
  Good luck!
  Jamie
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , jnewport jason_newport@ wrote:
  
   I was wondering if someone can help me (preference) or point me to a
   tutorial on xml and data

[flexcoders] Re: ArrayCollection returns object Object

2006-09-21 Thread jnewport
Jamie, thanks for you help.  I now have the data being pulled in and
showing in the list.  I can't seem to get the nodeName to populate my
list?  Any suggestions?  Maybe I need to structure my XML differently?

This is what I am trying to do (see the misc tech - Series selection
(drag and drop):

http://flexapps.macromedia.com/flex15/chartexplorer/explorer.mxml?versionChecked=true


The above link is verions flex 1.5., which of course I am using Flex
2. I am also trying to use my xml below though.  I am think I might
need to loop through the xml in order to get all the childnode data
into one array or arraycollection?  So for instance say I want region
Japan data to be dragable and plot into the graph I would need to
loop through all the xml and put the japan node data into a
JapanArray:Array.  Then do this for each region (region = see data in
bottom post; below)?

Or am I over thinking this?

Thanks again for everyones help.

Jason


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

 I'll take my best attempt.
 
 1) Create the XML variable you will need to map the HTTPService object
 data to and create a function that will handle the result call of your
 HTTPService call.
 mx:Script
 ![CDATA[
 import mx.rpc.events.ResultEvent;
 
 [Bindable]
 private var xmldpAddress:XML;
  
 public function LoadXML(evt:Event):void {
   xmldpAddress = new XML(evt.target.lastResult);
 //Do other result-driven actions here
 }
 ]]
 
 2) In your HTTPService call a function to handle the result event:
 mx:HTTPService
   id=feedRequest 
   url = [PATH GOES HERE]
 useProxy=false
 resultFormat=e4x 
 result=LoadXML(event)
 /
 
 3) So when you trigger the request via feedRequest.send() function
 from either the creationComplete part of the application or a button
 event, it calls the service, the service calls your result function
 and the result function maps that service data object into an XML
format.
 
 4) As a result, you can then use dot notation for the XML in any
 dataprovider you want.
 
 mx:TextInput x=139 y=143 width=151 id=txtProv
 editable=false enabled=false text=[EMAIL PROTECTED]/
 
 At that point, the help page under Programming ActionScript 3.0  Core
 ActionScript 3.0 Data Types and Classes  Working with XML 
 Traversing XML Structures should give you all the examples you need to
 bind the particular data you're looking for.
 
 Good luck!
 Jamie
 
 --- In flexcoders@yahoogroups.com, jnewport jason_newport@ wrote:
 
  I was wondering if someone can help me (preference) or point me to a
  tutorial on xml and data structures that are not hardcoded.
  
  I am using an HttpService to retreive xml and I can get result, but
  when I use it to populate a List I get object Object.  All livedocs
  and info tells you how to use arrays, arraycollections, and xml when
  the xml is hardcoded in the app.
  
  Here is my file and xml.
  
  FILE
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; xmlns=*
  paddingTop=3
  creationComplete=initApp()
  pageTitle=Dashboard
  
  mx:Style source=OSX.css/
  
  mx:Script
  ![CDATA[
   import mx.rpc.events.ResultEvent;
   import mx.collections.ArrayCollection;
   import mx.rpc.*;
   import mx.charts.*;
  
  
  [Bindable]
   public var slicedMonthData:ArrayCollection;
  
  [Bindable]
   public var slicedRegionData:ArrayCollection;
  
  [Bindable]
   public var JasonsAC:ArrayCollection;
  
   private var monthData:Array;
   private var regionData:Array;
  
   private function initApp():void
   {
   srv.send();
   slicedMonthData = new ArrayCollection();
   slicedRegionData = new ArrayCollection();
   }
  
  
  private function resultHandler(event:ResultEvent):void
  {
  monthData = event.result.list.month.source as Array;
  slider.maximum = monthData.length - 1;
  slider.values = [0, monthData.length - 1];
  slicedMonthData.source = monthData;
  JasonsAC = new ArrayCollection(slicedMonthData.source);
  //regionBreakdown.month = monthData[0];//
  
  }
  
  private function getSliderLabel(value:String):String
  {
  return monthData[parseInt(value)].name;
  }
  
  
  
  private function rangeChange():void
  {
  if (monthData != null

[flexcoders] ArrayCollection returns object Object

2006-09-20 Thread jnewport
I was wondering if someone can help me (preference) or point me to a
tutorial on xml and data structures that are not hardcoded.

I am using an HttpService to retreive xml and I can get result, but
when I use it to populate a List I get object Object.  All livedocs
and info tells you how to use arrays, arraycollections, and xml when
the xml is hardcoded in the app.

Here is my file and xml.

FILE
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; xmlns=*
paddingTop=3
creationComplete=initApp()
pageTitle=Dashboard

mx:Style source=OSX.css/

mx:Script
![CDATA[
 import mx.rpc.events.ResultEvent;
 import mx.collections.ArrayCollection;
 import mx.rpc.*;
 import mx.charts.*;


[Bindable]
 public var slicedMonthData:ArrayCollection;

[Bindable]
 public var slicedRegionData:ArrayCollection;

[Bindable]
 public var JasonsAC:ArrayCollection;

 private var monthData:Array;
 private var regionData:Array;

 private function initApp():void
 {
 srv.send();
 slicedMonthData = new ArrayCollection();
 slicedRegionData = new ArrayCollection();
 }


private function resultHandler(event:ResultEvent):void
{
monthData = event.result.list.month.source as Array;
slider.maximum = monthData.length - 1;
slider.values = [0, monthData.length - 1];
slicedMonthData.source = monthData;
JasonsAC = new ArrayCollection(slicedMonthData.source);
//regionBreakdown.month = monthData[0];//

}

private function getSliderLabel(value:String):String
{
return monthData[parseInt(value)].name;
}



private function rangeChange():void
{
if (monthData != null)
slicedMonthData.source =
monthData.slice(slider.values[0], slider.values[1] + 1);
if (regionData != null)
slicedRegionData.source = 
regionData.slice(slider.values[0],
slider.values[1] + 1);
}


   
]]
/mx:Script

mx:HTTPService id=srv url=results.xml useProxy=false
result=resultHandler(event)/ 
mx:Model id=dataSet/mx:Model



mx:ApplicationControlBar width=100% height=37
mx:Spacer width=2/
mx:Label text=Dashboard:/
mx:ComboBox width=150
mx:dataProvider
mx:Array
mx:StringRevenue Timeline/mx:String
mx:StringKWH Timeline/mx:String
mx:StringMember Timeline/mx:String
/mx:Array
/mx:dataProvider
/mx:ComboBox
mx:Spacer width=10/
mx:Label text=Select Period:/
mx:HSlider id=slider width=180 thumbCount=2
snapInterval=1 minimum=0 dataTipPlacement=bottom
dataTipFormatFunction=getSliderLabel
change=rangeChange()/
/mx:ApplicationControlBar

mx:HDividedBox width=100% height=100%
mx:HBox width=60% height=100% 

 mx:Panel id=DistrictList title=District List width=25%
height=100%
mx:List id=districtList dataProvider={JasonsAC} width=110
height=100% allowMultipleSelection=true dragEnabled=true/
 /mx:Panel
 
 mx:Panel id=ComparePanel title=District Comparison
width=75% height=100% /
/mx:HBox

mx:VDividedBox width=40% height=100%
mx:Panel id=MonthlyTotal title=Monthly Total width=100%
height=100% /
mx:Panel id=CycelTotals title=Cycle Totals width=100%
height=100% /
/mx:VDividedBox
/mx:HDividedBox


/mx:Application


XML
list

month name=Jan-04 revenue=400263 average=80052
region name=APAC revenue=46130/
region name=Europe revenue=106976/
region name=Japan revenue=79554/
region name=Latin America revenue=39252/
region name=North America revenue=128351/
/month

month name=Feb-04 revenue=379145 average=75829
region name=APAC revenue=70324/
region name=Europe revenue=88912/
region name=Japan revenue=69677/
region name=Latin America revenue=59428/
region name=North America revenue=90804/
/month

month name=Mar-04