Re: [flexcoders] how to implement bread crumbs in flex application

2009-11-17 Thread dorkie dork from dorktown
Flex doesn't support the notion of a hyperlink in the traditional sense. If
you wanted to create breadcrumbs and you were using states and let's say, a
viewstack, then you could bind a text field to the values of the different
states and show or hide the breadcrumb depending if you were on a state or
not:

mx:states
mx:State name=My State /
mx:State name=State 2 /
/mx:states

mx:HBoxmx:Text text={this.currentState} /mx:Text
visible={viewstack.currentState!='view1'}
includeInLayout={viewstack.currentState!='view1'} text= 
{viewstack.currentState}//mx:HBox

The bindings above show the value of the current state, in this example,
either, My State or State 2. It could be blank if you do select either
state at startup. The second text field is either visible or invisible
depending on if the current state is view1 or a different view.

On Mon, Nov 16, 2009 at 9:12 AM, Satish Chowdary chinnu_...@yahoo.co.inwrote:



 Hey Coders,

 give me a idea about how  to implement breadcrumbs in flex application

 Thanks inAdvance
 సతీష్

 --
 The INTERNET now has a personality. YOURS! See your Yahoo! 
 Homepagehttp://in.rd.yahoo.com/tagline_yyi_1/*http://in.yahoo.com/.

 



[flexcoders] how to update a progress bar when uploading an image

2009-11-17 Thread stinasius
hi, am trying to upload and image and i would like to show progress while 
uploading process goes on by updating the progress bar but the progress bar 
seems not to get updated. here is my code

formitem component
?xml version=1.0 encoding=utf-8?
mx:FormItem xmlns:mx=http://www.adobe.com/2006/mxml; 
creationComplete=init()

mx:Script
![CDATA[
import mx.managers.PopUpManager;
import components.progress_popup;

private var fileRef:FileReference;
private var progress_win:progress_popup;

private function init():void{
fileRef = new FileReference();
fileRef.addEventListener(Event.SELECT, fileRef_select);
fileRef.addEventListener(ProgressEvent.PROGRESS, 
progressHandler);
fileRef.addEventListener(Event.COMPLETE, 
fileRef_complete);
}

private function browseAndUpload():void{
fileRef.browse();
message.text = ;
}

private function fileRef_select(event:Event):void{
var request:URLRequest = new 
URLRequest(cfcs/upload.cfm)
try 
{
fileRef.upload(request);
} 
catch (err:Error)
{
message.text = ERROR: zero-byte file;
}   
memPhoto.text = event.currentTarget.name;
createdprogressPopup();
progress_win.uploadProgress.setProgress(0, 100);
progress_win.uploadProgress.label = Loading 0%;
}

private function fileRef_complete(event:Event):void{
message.text +=  (complete);
removeMe();
}

private function createdprogressPopup():void{

progress_win=progress_popup(PopUpManager.createPopUp(this,progress_popup,true));
}

private function removeMe():void {
PopUpManager.removePopUp(progress_win);
}

private function progressHandler(event:ProgressEvent):void{
//var file:FileReference = FileReference(event.target);

progress_win.uploadProgress.setProgress(event.bytesLoaded, event.bytesTotal);   

}

]]
/mx:Script

mx:HBox width=240
mx:TextInput width=155 id=memPhoto enabled=false/
mx:Button label=Browse click=browseAndUpload();/  

/mx:HBox
mx:Label id=message/
/mx:FormItem

popup with progress bar to show progress

?xml version=1.0 encoding=utf-8?
mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical 
creationCompleteEffect={customMove} removedEffect={customHide} 
title=Uploading Image
mx:Script
![CDATA[
import mx.managers.PopUpManager;
import mx.effects.easing.*;
]]
/mx:Script


mx:Parallel id=customMove target={this}
mx:Move yFrom=0 xFrom={(stage.width  - this.width) / 2} 
xTo={(stage.width  - this.width) / 2} yTo={(stage.height - this.height) / 
2} easingFunction=Elastic.easeOut duration=500 /
mx:Fade duration=500 /
/mx:Parallel

mx:Parallel id=customHide target={this}
mx:Move yFrom={(stage.height - this.height) / 2} 
xFrom={(stage.width  - this.width) / 2} xTo={(stage.width  - this.width) / 
2} yTo={stage.height} duration=500 /
mx:Fade alphaFrom=1 alphaTo=0 duration=500 /
/mx:Parallel

mx:ProgressBar id=uploadProgress mode=manual 
labelPlacement=center width=120/
/mx:TitleWindow

is there something am doing wrong?




[flexcoders] Re: How to remove the horizon line which between the datagrid header and content

2009-11-17 Thread chinaloveshisiling
I look forward to your reply.

--- In flexcoders@yahoogroups.com, chinaloveshisiling
chinaloveshisil...@... wrote:

 I am really very anxious. I hope anyone can help me.

 How to remove the horizon line which between the datagrid header and
content.

 --- In flexcoders@yahoogroups.com, chinaloveshisiling
chinaloveshisiling@ wrote:
 
   ---
  |number(Header)|
   --- ---   //I want to remove this line
  | 1  |
   --
  | 2   |
   --
 
  How to delete the top border of the the first row content.
 





[flexcoders] Re: Binding not working in custom class and DataGrid using XMLListCollection

2009-11-17 Thread gers32
The reason for this is explained in Diving in the Data Binding Waters by
Michael Labriola
http://tv.adobe.com/watch/360flex-conference/diving-in-the-data-binding\
-waters-by-michael-labriola/ , but an example using ArrayCollection or
XMLListCollection would be welcome.

Thanks,

Chris.



[flexcoders] Re: Binding not working in custom class and DataGrid using XMLListCollection

2009-11-17 Thread gers32
Although the above discussion about Data Binding is great, you can skip 
directly to 28:24 for the short explanation I was referring to.

Chris.



[flexcoders] Re: How to remove the horizon line which between the datagrid header and content

2009-11-17 Thread Flex Boy


--- In flexcoders@yahoogroups.com, chinaloveshisiling
chinaloveshisil...@... wrote:

 --
 |number(Header)|
 -- //I want to remove this line
 | 1 |
 ---
 | 2 |
 ---

 How to delete the top border of the the first row content.


The SkinClass



package

{

import flash.display.GradientType;



import mx.core.EdgeMetrics;

import mx.core.UIComponent;

import mx.skins.Border;

import mx.skins.halo.HaloColors;

import mx.styles.StyleManager;

import mx.utils.ColorUtil;



/**



* The skin for the background of a datagrid::headerBackgroundSkin.



*/



public class HeadSkin extends Border

{

// include ../../core/Version.as;

//–

//

// Class variables

//

//–



/**

* @private

*/



private static var cache:Object = {};

//–

//

// Class methods

//

//–



/**

* @private

* Several colors used for drawing are calculated from the base colors

* of the component (themeColor, borderColor and fillColors).

* Since these calculations can be a bit expensive,

* we calculate once per color set and cache the results.

*/



private static function
calcDerivedStyles(themeColor:uint,fillColor0:uint,fillColor1:uint):Objec\
t

{

var key:String = HaloColors.getCacheKey(themeColor,fillColor0,
fillColor1);

if (!cache[key])

{

var o:Object = cache[key] = {};

// Cross-component styles.

HaloColors.addHaloColors(o, themeColor, fillColor0, fillColor1);

}

return cache[key];

}



//–

//

// Constructor

//

//–



/**

* Constructor.

*/



public function HeadSkin()

{

super();

}



//–

//

// Overridden properties

//

//–

//———-

// borderMetrics

//———-



/**

* @private

* Storage for the borderMetrics property.

*/



private var _borderMetrics:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0);



/**

* @private

*/



override public function get borderMetrics():EdgeMetrics

{

return _borderMetrics;

}



//———-

// measuredWidth

//———-



/**

* @private

*/



override public function get measuredWidth():Number

{

return UIComponent.DEFAULT_MEASURED_MIN_WIDTH;

}



//———-

// measuredHeight

//———-



/**

* @private

*/



override public function get measuredHeight():Number

{

return UIComponent.DEFAULT_MEASURED_MIN_HEIGHT;

}



//–

//

// Overridden methods

//

//–



/**

* @private

*/



override protected function updateDisplayList(w:Number, h:Number):void

{

super.updateDisplayList(w, h);

// User-defined styles.

var bevel:Boolean = getStyle(bevel);

var borderColor:uint = getStyle(borderColor);

var cornerRadius:Number = getStyle(cornerRadius);

var fillAlphas:Array = getStyle(fillAlphas);

var fillColors:Array = getStyle(fillColors);

StyleManager.getColorNames(fillColors);

var themeColor:uint = getStyle(themeColor);



// Derivative styles.

var derStyles:Object = calcDerivedStyles(themeColor,
fillColors[0],fillColors[1]);

var borderColorDrk1:Number = ColorUtil.adjustBrightness2(borderColor,
-25);

var cr:Number = Math.max(0, cornerRadius);

var cr1:Number = Math.max(0, cornerRadius -1);

var upFillColors:Array = [ fillColors[0], fillColors[1] ];

var upFillAlphas:Array = [ fillAlphas[0], fillAlphas[1] ];

graphics.clear();



// button border/edge



//drawRoundRect(0,0,w,h,cr,[borderColor,borderColorDrk1],1,verticalGradi\
entMatrix(0,0,w,h),GradientType.LINEAR,
null,{x:1,y:1,w:w-2,h:h-2,r:cr1});





// button fill

drawRoundRect(1,1,w-2,h-2,cr1,upFillColors,
upFillAlphas,verticalGradientMatrix(1,1,w-2,h-2));





}



}

}



How to use it

mx:DataGrid headerBackgroundSkin=HeadSkin






[flexcoders] Re: How to remove the horizon line which between the datagrid header and content

2009-11-17 Thread chinaloveshisiling
Thanks very much.

--- In flexcoders@yahoogroups.com, Flex Boy ca...@... wrote:

 
 
 --- In flexcoders@yahoogroups.com, chinaloveshisiling
 chinaloveshisiling@ wrote:
 
  --
  |number(Header)|
  -- //I want to remove this line
  | 1 |
  ---
  | 2 |
  ---
 
  How to delete the top border of the the first row content.
 
 
 The SkinClass
 
 
 
 package
 
 {
 
 import flash.display.GradientType;
 
 
 
 import mx.core.EdgeMetrics;
 
 import mx.core.UIComponent;
 
 import mx.skins.Border;
 
 import mx.skins.halo.HaloColors;
 
 import mx.styles.StyleManager;
 
 import mx.utils.ColorUtil;
 
 
 
 /**
 
 
 
 * The skin for the background of a datagrid::headerBackgroundSkin.
 
 
 
 */
 
 
 
 public class HeadSkin extends Border
 
 {
 
 // include ../../core/Version.as;
 
 //–
 
 //
 
 // Class variables
 
 //
 
 //–
 
 
 
 /**
 
 * @private
 
 */
 
 
 
 private static var cache:Object = {};
 
 //–
 
 //
 
 // Class methods
 
 //
 
 //–
 
 
 
 /**
 
 * @private
 
 * Several colors used for drawing are calculated from the base colors
 
 * of the component (themeColor, borderColor and fillColors).
 
 * Since these calculations can be a bit expensive,
 
 * we calculate once per color set and cache the results.
 
 */
 
 
 
 private static function
 calcDerivedStyles(themeColor:uint,fillColor0:uint,fillColor1:uint):Objec\
 t
 
 {
 
 var key:String = HaloColors.getCacheKey(themeColor,fillColor0,
 fillColor1);
 
 if (!cache[key])
 
 {
 
 var o:Object = cache[key] = {};
 
 // Cross-component styles.
 
 HaloColors.addHaloColors(o, themeColor, fillColor0, fillColor1);
 
 }
 
 return cache[key];
 
 }
 
 
 
 //–
 
 //
 
 // Constructor
 
 //
 
 //–
 
 
 
 /**
 
 * Constructor.
 
 */
 
 
 
 public function HeadSkin()
 
 {
 
 super();
 
 }
 
 
 
 //–
 
 //
 
 // Overridden properties
 
 //
 
 //–
 
 //———-
 
 // borderMetrics
 
 //———-
 
 
 
 /**
 
 * @private
 
 * Storage for the borderMetrics property.
 
 */
 
 
 
 private var _borderMetrics:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0);
 
 
 
 /**
 
 * @private
 
 */
 
 
 
 override public function get borderMetrics():EdgeMetrics
 
 {
 
 return _borderMetrics;
 
 }
 
 
 
 //———-
 
 // measuredWidth
 
 //———-
 
 
 
 /**
 
 * @private
 
 */
 
 
 
 override public function get measuredWidth():Number
 
 {
 
 return UIComponent.DEFAULT_MEASURED_MIN_WIDTH;
 
 }
 
 
 
 //———-
 
 // measuredHeight
 
 //———-
 
 
 
 /**
 
 * @private
 
 */
 
 
 
 override public function get measuredHeight():Number
 
 {
 
 return UIComponent.DEFAULT_MEASURED_MIN_HEIGHT;
 
 }
 
 
 
 //–
 
 //
 
 // Overridden methods
 
 //
 
 //–
 
 
 
 /**
 
 * @private
 
 */
 
 
 
 override protected function updateDisplayList(w:Number, h:Number):void
 
 {
 
 super.updateDisplayList(w, h);
 
 // User-defined styles.
 
 var bevel:Boolean = getStyle(bevel);
 
 var borderColor:uint = getStyle(borderColor);
 
 var cornerRadius:Number = getStyle(cornerRadius);
 
 var fillAlphas:Array = getStyle(fillAlphas);
 
 var fillColors:Array = getStyle(fillColors);
 
 StyleManager.getColorNames(fillColors);
 
 var themeColor:uint = getStyle(themeColor);
 
 
 
 // Derivative styles.
 
 var derStyles:Object = calcDerivedStyles(themeColor,
 fillColors[0],fillColors[1]);
 
 var borderColorDrk1:Number = ColorUtil.adjustBrightness2(borderColor,
 -25);
 
 var cr:Number = Math.max(0, cornerRadius);
 
 var cr1:Number = Math.max(0, cornerRadius -1);
 
 var upFillColors:Array = [ fillColors[0], fillColors[1] ];
 
 var upFillAlphas:Array = [ fillAlphas[0], fillAlphas[1] ];
 
 graphics.clear();
 
 
 
 // button border/edge
 
 
 
 //drawRoundRect(0,0,w,h,cr,[borderColor,borderColorDrk1],1,verticalGradi\
 entMatrix(0,0,w,h),GradientType.LINEAR,
 null,{x:1,y:1,w:w-2,h:h-2,r:cr1});
 
 
 
 
 
 // button fill
 
 drawRoundRect(1,1,w-2,h-2,cr1,upFillColors,
 upFillAlphas,verticalGradientMatrix(1,1,w-2,h-2));
 
 
 
 
 
 }
 
 
 
 }
 
 }
 
 
 
 How to use it
 
 mx:DataGrid headerBackgroundSkin=HeadSkin





[flexcoders] Re: Problem sorting advancedDataGrid after dataprovider updated

2009-11-17 Thread valdhor
I'm glad you have a working solution.

--- In flexcoders@yahoogroups.com, InvertedSpear invertedsp...@... wrote:

 
 Problem Solved... I guess.
 
 
 I was turning my HTTPService result into an XMLList. I just switched it to
 an arrayCollection and I no longer loose the ability to sort when I refresh
 the data. 
 
 Maybe there is some limitation when using an XMLList, I wish I could have
 found out for sure, but at least I have a working product now.
 
 Lesson Learned: use arrayCollection, it's apparently a superior veriable
 type.
 
 Thanks for all the help and time valdhor.
 -- 
 View this message in context: 
 http://old.nabble.com/Problem-sorting-advancedDataGrid-after-dataprovider-updated-tp26326531p26379929.html
 Sent from the FlexCoders mailing list archive at Nabble.com.





[flexcoders] Eclipse and Flex SDK 3.4

2009-11-17 Thread Jansen Hutagalung
Hi all,

My mission is to make a flex project using explipse.
But i headace with the settings.

Can any one help me how to set the eclipse to flex 3 sdk.

I have :

- Eclipse Classic 3.5 and Eclipse for PHP
- Flex SDK 3.4

Please help me with this mess..

Thanks in advance.

Regards,
Hiawata


[flexcoders] Flash Builder 4 for Linux

2009-11-17 Thread feiy
hi,
i had ported the flash builder 4 to linux,more info:
http://code.google.com/p/fb4linux/
闲云孤鹤 - 清冷香中抱膝吟


Re: [flexcoders] Datagrid with rotated headers

2009-11-17 Thread Tino Dai
http://www.badu.ro/?p=19

That should do it.

-Tino


On Mon, Nov 16, 2009 at 9:10 AM, Allan Pichler dreamc...@gmail.com wrote:



  Does anyone have a simple example of a datagrid where the column header
 labels are rotated so they take up minimum space horizontally?



 Thanks in advance



 --Allan
  



[flexcoders] Re: Binding not working in custom class and DataGrid using XMLListCollection

2009-11-17 Thread Greg Lafrance
Thanks for your help on this guys.

I solved it by using [Bindable] before the getter function, and dispatching a 
collectionChange event in the setter.

I was trying to use the event constant CollectionEvent.COLLECTION_CHANGE in the 
dispatchEvent() method, but I should have used collectionChange.

Greg

--- In flexcoders@yahoogroups.com, gers32 c...@... wrote:

 Although the above discussion about Data Binding is great, you can skip 
 directly to 28:24 for the short explanation I was referring to.
 
 Chris.





[flexcoders] Re: how to update a progress bar when uploading an image

2009-11-17 Thread jamesfin

There isn't a way to do this.  You can simulate a progress bar but for whatever 
reason, this functionality doesn't exist.  If you have a look at speedtest.net, 
they show download progress nicely but their upload progress is simulated.

I've thought about making another (different) request to the server to get the 
number of bytes transferred, but that's a nasty hack.  It also depends on how 
big your files that are being uploaded.  If they are all fairly large then that 
might work for you.

Perhaps someone can explain the limitations within the browser framework to 
help us understand why we can't get upload status.  Alternatively, if you are 
ambitious, go get the Firefox source Firefox and figure it out for yourself.

Anyone else have a different opinion/solution?



--- In flexcoders@yahoogroups.com, stinasius stinas...@... wrote:

 hi, am trying to upload and image and i would like to show progress while 
 uploading process goes on by updating the progress bar but the progress bar 
 seems not to get updated. here is my code
 
 formitem component
 ?xml version=1.0 encoding=utf-8?
 mx:FormItem xmlns:mx=http://www.adobe.com/2006/mxml; 
 creationComplete=init()
   
   mx:Script
   ![CDATA[
   import mx.managers.PopUpManager;
   import components.progress_popup;
   
   private var fileRef:FileReference;
   private var progress_win:progress_popup;
   
   private function init():void{
   fileRef = new FileReference();
   fileRef.addEventListener(Event.SELECT, fileRef_select);
   fileRef.addEventListener(ProgressEvent.PROGRESS, 
 progressHandler);
   fileRef.addEventListener(Event.COMPLETE, 
 fileRef_complete);
   }
   
   private function browseAndUpload():void{
   fileRef.browse();
   message.text = ;
   }
 
   private function fileRef_select(event:Event):void{
   var request:URLRequest = new 
 URLRequest(cfcs/upload.cfm)
   try 
   {
   fileRef.upload(request);
   } 
   catch (err:Error)
   {
   message.text = ERROR: zero-byte file;
   }   
   memPhoto.text = event.currentTarget.name;
   createdprogressPopup();
   progress_win.uploadProgress.setProgress(0, 100);
   progress_win.uploadProgress.label = Loading 0%;
   }
   
   private function fileRef_complete(event:Event):void{
   message.text +=  (complete);
   removeMe();
   }
   
   private function createdprogressPopup():void{
   
 progress_win=progress_popup(PopUpManager.createPopUp(this,progress_popup,true));
   }
   
   private function removeMe():void {
   PopUpManager.removePopUp(progress_win);
   }
   
   private function progressHandler(event:ProgressEvent):void{
   //var file:FileReference = FileReference(event.target);
   
 progress_win.uploadProgress.setProgress(event.bytesLoaded, event.bytesTotal); 
   
   }
   
   ]]
   /mx:Script
   
   mx:HBox width=240
   mx:TextInput width=155 id=memPhoto enabled=false/
   mx:Button label=Browse click=browseAndUpload();/  
 
   /mx:HBox
   mx:Label id=message/
 /mx:FormItem
 
 popup with progress bar to show progress
 
 ?xml version=1.0 encoding=utf-8?
 mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical 
 creationCompleteEffect={customMove} removedEffect={customHide} 
 title=Uploading Image
   mx:Script
   ![CDATA[
   import mx.managers.PopUpManager;
   import mx.effects.easing.*;
   ]]
   /mx:Script
 
   
   mx:Parallel id=customMove target={this}
 mx:Move yFrom=0 xFrom={(stage.width  - this.width) / 2} 
 xTo={(stage.width  - this.width) / 2} yTo={(stage.height - this.height) / 
 2} easingFunction=Elastic.easeOut duration=500 /
   mx:Fade duration=500 /
 /mx:Parallel
 
 mx:Parallel id=customHide target={this}
 mx:Move yFrom={(stage.height - this.height) / 2} 
 xFrom={(stage.width  - this.width) / 2} xTo={(stage.width  - this.width) / 
 2} yTo={stage.height} duration=500 /
   mx:Fade alphaFrom=1 alphaTo=0 duration=500 /
 

[flexcoders] Flex linkBar control - multiple lines?

2009-11-17 Thread lanekelly5
Any way to make the linkBar control wrap around to use multiple lines?  I have 
an application where the client wants two rows worth of menu items and it would 
be nice not to have to work around the convoluted logic of using two linkBar 
controls (one for each line) since the links will be built dynamically.



[flexcoders] Re: Problem sorting advancedDataGrid after dataprovider updated

2009-11-17 Thread droponrcll


--- In flexcoders@yahoogroups.com, InvertedSpear invertedsp...@... wrote:

 
 Problem Solved... I guess.
 
 
 I was turning my HTTPService result into an XMLList. I just switched it to
 an arrayCollection and I no longer loose the ability to sort when I refresh
 the data. 
 
 Maybe there is some limitation when using an XMLList, I wish I could have
 found out for sure, but at least I have a working product now.
 
 Lesson Learned: use arrayCollection, it's apparently a superior veriable
 type.

XMLList, unlike, say, XMLListCollection, is not a ListCollectionView, so it 
doesn't generate the proper events to allow anything bound to it to know that 
something has changed.

HTH;

Amy



[flexcoders] AIR - Ascynchronous file deletion - fixed order ?

2009-11-17 Thread thedauntless_ff
Hi,

Simple test:

private function init():void
{
var f:File = File.
applicationStorageDirectory.resolvePath(movie.avi);
f.addEventListener(Event.COMPLETE, com1);
f.deleteFileAsync();
var f2:File = 
File.applicationStorageDirectory.resolvePath(file.txt);
f2.addEventListener(Event.COMPLETE, com2);
f2.deleteFileAsync();
}
   
function com1(e:Event):void
{
trace(movie deleted);
}
function com2(e:Event):void
{
trace(file deleted);
}

Where 'movie.avi' is about 800mb and file.txt is an empty text file. In this 
simple test, the movie deleted is traced before the file deleted. My 
question is: will this always be the case?

In general: Will multiple asynchronous commands be handles in the same order as 
they have been started?

I've spent enough hours googeling, but I couldn't find any documentation 
specific to this problem.

Thanks!



RE: [flexcoders] Comparing Dates: ObjectUtil.dateCompare not working

2009-11-17 Thread Keith Reinfeld
ObjectUtil.dateCompare() function does account for the time portion of the
supplied dates.

 

According to the scenario you describe ObjectUtil.dateCompare() function
never sees the time portion of date_A nor date_B.

 

The DateField.stringToDate() method only evaluates the -MM-DD portion of
the supplied date string and ignores/strips off the time portion of the
date.

 

Regards,

 

Keith Reinfeld
Home Page:  http://keithreinfeld.home.comcast.net/
http://keithreinfeld.home.comcast.net

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of powers
Sent: Monday, November 16, 2009 2:29 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Comparing Dates: ObjectUtil.dateCompare not working

 

  


I'm writing a sort compare function to sort by date. The date format is
-MM-DD HH:NN:SS. I'm converting the dates, in a string format, to a
Date objects like so:

DateField.stringToDate(date_A '-MM-DD HH:NN:SS');
DateField.stringToDate(date_B '-MM-DD HH:NN:SS');

Then comparing the dates like this:

ObjectUtil.dateCompare(date_A, date_B)

It always returns 0 when the date portion of the two date objects are equal,
but the times are different. Does the ObjectUtil.dateCompare function not
account for the time? 

-- 
View this message in context:
http://old.nabble.com/Comparing-Dates%3A-ObjectUtil.dateCompare-not-working-
tp26378917p26378917.html
Sent from the FlexCoders mailing list archive at Nabble.com.



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.425 / Virus Database: 270.14.67/2506 - Release Date: 11/16/09
07:43:00

image001.jpgimage002.jpg

[flexcoders] Re: how to update a progress bar when uploading an image

2009-11-17 Thread stinasius
wow... so the only way is to use the indeterminate to show that smething is 
happening. thanks but in case someone has a solution please share. thanks again 



[flexcoders] Both Flex 3 4 compatible implementation

2009-11-17 Thread Julien Nicoulaud
Hi everyone,
for the flex-iframe project (http://code.google.com/p/flex-iframe/), we use
Application.application to get the current URL (here:
http://code.google.com/p/flex-iframe/source/browse/trunk/flexiframe/src/com/google/code/flexiframe/IFrame.as?spec=svn89r=87#252).
But this is deprecated in Flex 4, and we should use
FlexGlobals.topLevelApplication as spark.components.Application. I really
don't want to create and maintain a Flex 4 branch only for this...

Does anyone see how to get this URL in a way that would be both Flex 3 and
Flex 4 compatible ?

Cheers,
Julien Nicoulaud


[flexcoders] Re: Null data for the last dynamically added lineseries

2009-11-17 Thread lmrudner
I added 

linechart.validateNow(); 

after the  linechart.invalidateSeriesStyles();

and all is fine now (I thought I had tried that earlier).





[flexcoders] Re: how to update a progress bar when uploading an image

2009-11-17 Thread jamesfin

This also assumes you are trying to upload text vs. binary depending on how 
your server is configured.

This is an example that you might be able to leverage if you have binary.

http://www.adobe.com/devnet/flex/articles/file_upload_05.html


--- In flexcoders@yahoogroups.com, stinasius stinas...@... wrote:

 wow... so the only way is to use the indeterminate to show that smething is 
 happening. thanks but in case someone has a solution please share. thanks 
 again





[flexcoders] Re: LineSeries

2009-11-17 Thread turbo_vb
Thanks Vivian,
For the plot chart, you can do the same type of thing, except with more
images, with an itemRenderer.  Just like the way you can change icons,
or images, in a List itemRenderer, the same can be done with a chart. 
In the last sample, you can see how to inspect the data; to determine
which image class to display.  This next Sample
http://www.timothyhoff.com/projects/ChartLabeledRendererSample/ChartLab\
eledRendererSample.html  shows how you can use an itemRenderer that
extends UIComponent.  This is a little different than creating an
itemRenderer that extends ProgrammaticSkin, as it gives you a lot more
flexibility.  Between the two samples, you might be able to come up with
a solution.  If you get stuck, please feel free to reach out. -TH
--- In flexcoders@yahoogroups.com, Vivian Richard kanps...@... wrote:

Liked your example. Sleek!!! By the way I am trying to write an
 itemrenderer
for plot chart. Depending on the value of the plot item I want to
show
 different
icons in the plotted spot. These is an example of plot chart where
you
 can
embed an image but in that way you can only put same image in one
series.
Here is the link:



http://livedocs.adobe.com/flex/3/html/help.html?content=charts_formattin\
g_12.html

 The butterfly example - I am talking about.



 On Mon, Nov 16, 2009 at 3:02 PM, turbo_vb timh...@... wrote:

 
 
  Cool, yeah I should have said custom lineSegmentRenderer.
 
 
  -TH
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Jake
  Churchill reynacho@ wrote:
  
   THANK YOU. I have seen this before and I've been looking for it
forever.
   The stinking chart components are all in the dataviz SWC and I
couldn't
  get
   past a null error I was getting.
  
   On Mon, Nov 16, 2009 at 4:43 PM, turbo_vb TimHoff@ wrote:
  
   
   
Sorry bout that, let's try it again: Sample
 
http://www.timothyhoff.com/projects/LineRendererSample/LineRendererSampl\
e.html
  
 
   
   
-TH
   
--- In flexcoders@yahoogroups.com
flexcoders%40yahoogroups.com, Jake
  Churchill reynacho@ wrote:

 I've been trying something like this but item renders and
actual
  segments
of
 the line seem to be drawn separately. By the way, your link
doesn't
  work.

 On Mon, Nov 16, 2009 at 3:35 PM, turbo_vb TimHoff@ wrote:

 
 
  Hi Jake,
 
  You could do it with a custom itemRenderer and control the
alpha or
actual
  drawing; based on a data property. Here's a custom renderer
sample
  to
get
  you started:
 
  Colored Line Chart Sample
   
http://www.flashcomguru.com/index.cfm/2009/11/11/pdf-for-flex-devs
   
 
 
  -TH
 
  --- In flexcoders@yahoogroups.com
flexcoders%40yahoogroups.com,
  Jake Churchill reynacho@ wrote:
  
   I'm struggling with how to hide a section of a LineSeries.
Does
anyone
  have
   any pointers or links to point me in the right direction?
  
   Thanks!
  
   -Jake
  
 
 
 

   
   
   
  
 
 
 




[flexcoders] AIR 2.0 and Flash 10.2 beta is out

2009-11-17 Thread hworke

  
  Please check this out:

http://tech.yahoo.com/news/nf/20091117/tc_nf/70110



Re: [flexcoders] Re: LineSeries

2009-11-17 Thread Vivian Richard
   Thanks for the reply. I got the logic part. In updateDisplayList I get
the
   data like data.item.type = spider or bee or butterfly .

   so depending on the type I want to show the image of the insects. But
   the problem is since this itemrenderer inherits UIComponent, I cannot
   or do not know how to add an image on it.




On Tue, Nov 17, 2009 at 9:28 AM, turbo_vb timh...@aol.com wrote:



 Thanks Vivian,

 For the plot chart, you can do the same type of thing, except with more
 images, with an itemRenderer.  Just like the way you can change icons, or
 images, in a List itemRenderer, the same can be done with a chart.  In the
 last sample, you can see how to inspect the data; to determine which image
 class to display.  This next 
 http://www.timothyhoff.com/projects/ChartLabeledRendererSample/srcview/index.html
 Samplehttp://www.timothyhoff.com/projects/ChartLabeledRendererSample/ChartLabeledRendererSample.html
  shows how you can use an itemRenderer that extends UIComponent.  This is
 a little different than creating an itemRenderer that extends
 ProgrammaticSkin, as it gives you a lot more flexibility.  Between the two
 samples, you might be able to come up with a solution.  If you get stuck,
 please feel free to reach out.

 -TH

 --- In flexcoders@yahoogroups.com, Vivian Richard kanps...@... wrote:
 
  Liked your example. Sleek!!! By the way I am trying to write an
  itemrenderer
  for plot chart. Depending on the value of the plot item I want to show
  different
  icons in the plotted spot. These is an example of plot chart where you
  can
  embed an image but in that way you can only put same image in one series.
  Here is the link:
 
 
 
 http://livedocs.adobe.com/flex/3/html/help.html?content=charts_formatting_12.html
 
  The butterfly example - I am talking about.
 
 
 
  On Mon, Nov 16, 2009 at 3:02 PM, turbo_vb timh...@... wrote:
 
  
  
   Cool, yeah I should have said custom lineSegmentRenderer.
  
  
   -TH
  
   --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Jake

   Churchill reynacho@ wrote:
   
THANK YOU. I have seen this before and I've been looking for it
 forever.
The stinking chart components are all in the dataviz SWC and I
 couldn't
   get
past a null error I was getting.
   
On Mon, Nov 16, 2009 at 4:43 PM, turbo_vb TimHoff@ wrote:
   


 Sorry bout that, let's try it again: Sample
  
 http://www.timothyhoff.com/projects/LineRendererSample/LineRendererSample.html
   
  


 -TH

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Jake

   Churchill reynacho@ wrote:
 
  I've been trying something like this but item renders and actual
   segments
 of
  the line seem to be drawn separately. By the way, your link
 doesn't
   work.
 
  On Mon, Nov 16, 2009 at 3:35 PM, turbo_vb TimHoff@ wrote:
 
  
  
   Hi Jake,
  
   You could do it with a custom itemRenderer and control the
 alpha or
 actual
   drawing; based on a data property. Here's a custom renderer
 sample
   to
 get
   you started:
  
   Colored Line Chart Sample
 http://www.flashcomguru.com/index.cfm/2009/11/11/pdf-for-flex-devs
 

  
  
   -TH
  
   --- In flexcoders@yahoogroups.com flexcoders%
 40yahoogroups.com,

   Jake Churchill reynacho@ wrote:
   
I'm struggling with how to hide a section of a LineSeries.
 Does
 anyone
   have
any pointers or links to point me in the right direction?
   
Thanks!
   
-Jake
   
  
  
  
 



   
  
  
  
 
  



[flexcoders] Re: LineSeries

2009-11-17 Thread turbo_vb


Ok 2 things, better to change the image in the set data method and then 
invalidateDisplayList(); because updateDisplayList gets called a lot more 
frequently than than the data changes.  And for the image, add an Image control 
to the UIComponent itemRenderer in createChildren.  (remember to setActualSize 
and position in updateDisplayList).  Then when the data changes, inspect it and 
change the source of the image to one of several embedded image classes in the 
itemRenderer.  Something like:

[Embed(source=../assets/butterfly.gif)]
public var myButterfly:Class;

[Embed(source=../assets/grassHopper.gif)]
public var myGrassHopper:Class;

public function set data(value:Object):void
{
// perform conditional logic here
// don't know your code, so psuedo
if ( butterfly )
{  
myImage.source = myButterfly;
}

if ( grasshopper )
{  
myImage.source = myGrasshopper;
}

super.invalidateDisplayList();
}

-TH

--- In flexcoders@yahoogroups.com, Vivian Richard kanps...@... wrote:

Thanks for the reply. I got the logic part. In updateDisplayList I get
 the
data like data.item.type = spider or bee or butterfly .
 
so depending on the type I want to show the image of the insects. But
the problem is since this itemrenderer inherits UIComponent, I cannot
or do not know how to add an image on it.
 
 
 
 
 On Tue, Nov 17, 2009 at 9:28 AM, turbo_vb timh...@... wrote:
 
 
 
  Thanks Vivian,
 
  For the plot chart, you can do the same type of thing, except with more
  images, with an itemRenderer.  Just like the way you can change icons, or
  images, in a List itemRenderer, the same can be done with a chart.  In the
  last sample, you can see how to inspect the data; to determine which image
  class to display.  This next 
  http://www.timothyhoff.com/projects/ChartLabeledRendererSample/srcview/index.html
  Samplehttp://www.timothyhoff.com/projects/ChartLabeledRendererSample/ChartLabeledRendererSample.html
   shows how you can use an itemRenderer that extends UIComponent.  This is
  a little different than creating an itemRenderer that extends
  ProgrammaticSkin, as it gives you a lot more flexibility.  Between the two
  samples, you might be able to come up with a solution.  If you get stuck,
  please feel free to reach out.
 
  -TH
 
  --- In flexcoders@yahoogroups.com, Vivian Richard kanpsack@ wrote:
  
   Liked your example. Sleek!!! By the way I am trying to write an
   itemrenderer
   for plot chart. Depending on the value of the plot item I want to show
   different
   icons in the plotted spot. These is an example of plot chart where you
   can
   embed an image but in that way you can only put same image in one series.
   Here is the link:
  
  
  
  http://livedocs.adobe.com/flex/3/html/help.html?content=charts_formatting_12.html
  
   The butterfly example - I am talking about.
  
  
  
   On Mon, Nov 16, 2009 at 3:02 PM, turbo_vb TimHoff@ wrote:
  
   
   
Cool, yeah I should have said custom lineSegmentRenderer.
   
   
-TH
   
--- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Jake
 
Churchill reynacho@ wrote:

 THANK YOU. I have seen this before and I've been looking for it
  forever.
 The stinking chart components are all in the dataviz SWC and I
  couldn't
get
 past a null error I was getting.

 On Mon, Nov 16, 2009 at 4:43 PM, turbo_vb TimHoff@ wrote:

 
 
  Sorry bout that, let's try it again: Sample
   
  http://www.timothyhoff.com/projects/LineRendererSample/LineRendererSample.html

   
 
 
  -TH
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
  Jake
 
Churchill reynacho@ wrote:
  
   I've been trying something like this but item renders and actual
segments
  of
   the line seem to be drawn separately. By the way, your link
  doesn't
work.
  
   On Mon, Nov 16, 2009 at 3:35 PM, turbo_vb TimHoff@ wrote:
  
   
   
Hi Jake,
   
You could do it with a custom itemRenderer and control the
  alpha or
  actual
drawing; based on a data property. Here's a custom renderer
  sample
to
  get
you started:
   
Colored Line Chart Sample
  http://www.flashcomguru.com/index.cfm/2009/11/11/pdf-for-flex-devs
  
 
   
   
-TH
   
--- In flexcoders@yahoogroups.com flexcoders%
  40yahoogroups.com,
 
Jake Churchill reynacho@ wrote:

 I'm struggling with how to hide a section of a LineSeries.
  Does
  anyone
have
 any pointers or links to point me in the right direction?

 Thanks!

 -Jake

   
   
   
  
 
 
 

   
   
   
  
   
 




[flexcoders] Re: LineSeries

2009-11-17 Thread turbo_vb
Just read your last post a little more.  To add an Image control, first create 
a var:

private var myImage:Image;

Then in createChildren():

override protected function createChildren():void
{
super.createChildren();
 
if ( !myImage )
{
myImage = new Image();
addChild( myImage );
}

}

-TH

--- In flexcoders@yahoogroups.com, turbo_vb timh...@... wrote:

 
 
 Ok 2 things, better to change the image in the set data method and then 
 invalidateDisplayList(); because updateDisplayList gets called a lot more 
 frequently than than the data changes.  And for the image, add an Image 
 control to the UIComponent itemRenderer in createChildren.  (remember to 
 setActualSize and position in updateDisplayList).  Then when the data 
 changes, inspect it and change the source of the image to one of several 
 embedded image classes in the itemRenderer.  Something like:
 
 [Embed(source=../assets/butterfly.gif)]
 public var myButterfly:Class;
 
 [Embed(source=../assets/grassHopper.gif)]
 public var myGrassHopper:Class;
 
 public function set data(value:Object):void
 {
 // perform conditional logic here
 // don't know your code, so psuedo
 if ( butterfly )
 {  
 myImage.source = myButterfly;
 }
 
 if ( grasshopper )
 {  
 myImage.source = myGrasshopper;
 }
 
 super.invalidateDisplayList();
 }
 
 -TH
 
 --- In flexcoders@yahoogroups.com, Vivian Richard kanpsack@ wrote:
 
 Thanks for the reply. I got the logic part. In updateDisplayList I get
  the
 data like data.item.type = spider or bee or butterfly .
  
 so depending on the type I want to show the image of the insects. But
 the problem is since this itemrenderer inherits UIComponent, I cannot
 or do not know how to add an image on it.
  
  
  
  
  On Tue, Nov 17, 2009 at 9:28 AM, turbo_vb TimHoff@ wrote:
  
  
  
   Thanks Vivian,
  
   For the plot chart, you can do the same type of thing, except with more
   images, with an itemRenderer.  Just like the way you can change icons, or
   images, in a List itemRenderer, the same can be done with a chart.  In the
   last sample, you can see how to inspect the data; to determine which image
   class to display.  This next 
   http://www.timothyhoff.com/projects/ChartLabeledRendererSample/srcview/index.html
   Samplehttp://www.timothyhoff.com/projects/ChartLabeledRendererSample/ChartLabeledRendererSample.html
shows how you can use an itemRenderer that extends UIComponent.  This is
   a little different than creating an itemRenderer that extends
   ProgrammaticSkin, as it gives you a lot more flexibility.  Between the two
   samples, you might be able to come up with a solution.  If you get stuck,
   please feel free to reach out.
  
   -TH
  
   --- In flexcoders@yahoogroups.com, Vivian Richard kanpsack@ wrote:
   
Liked your example. Sleek!!! By the way I am trying to write an
itemrenderer
for plot chart. Depending on the value of the plot item I want to show
different
icons in the plotted spot. These is an example of plot chart where you
can
embed an image but in that way you can only put same image in one 
series.
Here is the link:
   
   
   
   http://livedocs.adobe.com/flex/3/html/help.html?content=charts_formatting_12.html
   
The butterfly example - I am talking about.
   
   
   
On Mon, Nov 16, 2009 at 3:02 PM, turbo_vb TimHoff@ wrote:
   


 Cool, yeah I should have said custom lineSegmentRenderer.


 -TH

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Jake
  
 Churchill reynacho@ wrote:
 
  THANK YOU. I have seen this before and I've been looking for it
   forever.
  The stinking chart components are all in the dataviz SWC and I
   couldn't
 get
  past a null error I was getting.
 
  On Mon, Nov 16, 2009 at 4:43 PM, turbo_vb TimHoff@ wrote:
 
  
  
   Sorry bout that, let's try it again: Sample

   http://www.timothyhoff.com/projects/LineRendererSample/LineRendererSample.html
 

  
  
   -TH
  
   --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
   Jake
  
 Churchill reynacho@ wrote:
   
I've been trying something like this but item renders and actual
 segments
   of
the line seem to be drawn separately. By the way, your link
   doesn't
 work.
   
On Mon, Nov 16, 2009 at 3:35 PM, turbo_vb TimHoff@ wrote:
   


 Hi Jake,

 You could do it with a custom itemRenderer and control the
   alpha or
   actual
 drawing; based on a data property. Here's a custom renderer
   sample
 to
   get
 you started:

 Colored Line Chart Sample
   http://www.flashcomguru.com/index.cfm/2009/11/11/pdf-for-flex-devs
   
  


 -TH

 --- In flexcoders@yahoogroups.com flexcoders%
  

[flexcoders] quick XML question

2009-11-17 Thread Pruitt, Byron S
I have a variable named report set to an xml document.

var report : XML = 
dls-configurationsystem/system./dls-configuration
var n1 : XML = report.system as XML;
var n2 : XML = report.children()[0];

n1 = null
n2 = the system node

I have accessed nodes many times like I do for n1 and not a problem with it 
evaluating to null.  I can't figure out what I am doing differently with the 
above.
Any help showing me the obvious is appreciated.


-Steve



Re: [flexcoders] Re: LineSeries

2009-11-17 Thread Vivian Richard
  Is it possible to do it with out embedding the image? Just
  creating am iamge and then pointing the source of the image
  to the image component. Instead Embedding all the images.


On Tue, Nov 17, 2009 at 10:07 AM, turbo_vb timh...@aol.com wrote:



 Just read your last post a little more. To add an Image control, first
 create a var:

 private var myImage:Image;

 Then in createChildren():

 override protected function createChildren():void
 {
 super.createChildren();

 if ( !myImage )
 {
 myImage = new Image();
 addChild( myImage );
 }

 }

 -TH


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 turbo_vb timh...@... wrote:
 
 
 
  Ok 2 things, better to change the image in the set data method and then
 invalidateDisplayList(); because updateDisplayList gets called a lot more
 frequently than than the data changes. And for the image, add an Image
 control to the UIComponent itemRenderer in createChildren. (remember to
 setActualSize and position in updateDisplayList). Then when the data
 changes, inspect it and change the source of the image to one of several
 embedded image classes in the itemRenderer. Something like:
 
  [Embed(source=../assets/butterfly.gif)]
  public var myButterfly:Class;
 
  [Embed(source=../assets/grassHopper.gif)]
  public var myGrassHopper:Class;
 
  public function set data(value:Object):void
  {
  // perform conditional logic here
  // don't know your code, so psuedo
  if ( butterfly )
  {
  myImage.source = myButterfly;
  }
 
  if ( grasshopper )
  {
  myImage.source = myGrasshopper;
  }
 
  super.invalidateDisplayList();
  }
 
  -TH
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Vivian
 Richard kanpsack@ wrote:
  
   Thanks for the reply. I got the logic part. In updateDisplayList I get
   the
   data like data.item.type = spider or bee or butterfly .
  
   so depending on the type I want to show the image of the insects. But
   the problem is since this itemrenderer inherits UIComponent, I cannot
   or do not know how to add an image on it.
  
  
  
  
   On Tue, Nov 17, 2009 at 9:28 AM, turbo_vb TimHoff@ wrote:
  
   
   
Thanks Vivian,
   
For the plot chart, you can do the same type of thing, except with
 more
images, with an itemRenderer. Just like the way you can change icons,
 or
images, in a List itemRenderer, the same can be done with a chart. In
 the
last sample, you can see how to inspect the data; to determine which
 image
class to display. This next 
 http://www.timothyhoff.com/projects/ChartLabeledRendererSample/srcview/index.html
 
Sample
 http://www.timothyhoff.com/projects/ChartLabeledRendererSample/ChartLabeledRendererSample.html
 
shows how you can use an itemRenderer that extends UIComponent. This
 is
a little different than creating an itemRenderer that extends
ProgrammaticSkin, as it gives you a lot more flexibility. Between the
 two
samples, you might be able to come up with a solution. If you get
 stuck,
please feel free to reach out.
   
-TH
   
--- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Vivian Richard kanpsack@ wrote:

 Liked your example. Sleek!!! By the way I am trying to write an
 itemrenderer
 for plot chart. Depending on the value of the plot item I want to
 show
 different
 icons in the plotted spot. These is an example of plot chart where
 you
 can
 embed an image but in that way you can only put same image in one
 series.
 Here is the link:



   
 http://livedocs.adobe.com/flex/3/html/help.html?content=charts_formatting_12.html

 The butterfly example - I am talking about.



 On Mon, Nov 16, 2009 at 3:02 PM, turbo_vb TimHoff@ wrote:

 
 
  Cool, yeah I should have said custom lineSegmentRenderer.
 
 
  -TH
 
  --- In flexcoders@yahoogroups.com 
  flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com, Jake
   
  Churchill reynacho@ wrote:
  
   THANK YOU. I have seen this before and I've been looking for it
forever.
   The stinking chart components are all in the dataviz SWC and I
couldn't
  get
   past a null error I was getting.
  
   On Mon, Nov 16, 2009 at 4:43 PM, turbo_vb TimHoff@ wrote:
  
   
   
Sorry bout that, let's try it again: Sample
 
   
 http://www.timothyhoff.com/projects/LineRendererSample/LineRendererSample.html
  
 
   
   
-TH
   
--- In 
flexcoders@yahoogroups.comflexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com,
Jake
   
  Churchill reynacho@ wrote:

 I've been trying something like this but item renders and
 actual
  segments
of
 the line seem to be drawn separately. By the way, your link
doesn't
  work.

 On Mon, Nov 16, 2009 at 3:35 PM, turbo_vb TimHoff@ wrote:

 
 
   

Re: [flexcoders] Re: LineSeries

2009-11-17 Thread Jake Churchill
Yes, that is possible but you have to remember that each image you display
will be a subsequent request to the web server.  If you embed the image, you
embed it once and use it a bunch of times without subsequent requests.

On Tue, Nov 17, 2009 at 12:54 PM, Vivian Richard kanps...@gmail.com wrote:





   Is it possible to do it with out embedding the image? Just
   creating am iamge and then pointing the source of the image
   to the image component. Instead Embedding all the images.


 On Tue, Nov 17, 2009 at 10:07 AM, turbo_vb timh...@aol.com wrote:



 Just read your last post a little more. To add an Image control, first
 create a var:

 private var myImage:Image;

 Then in createChildren():

 override protected function createChildren():void
 {
 super.createChildren();

 if ( !myImage )
 {
 myImage = new Image();
 addChild( myImage );
 }

 }

 -TH


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 turbo_vb timh...@... wrote:
 
 
 
  Ok 2 things, better to change the image in the set data method and then
 invalidateDisplayList(); because updateDisplayList gets called a lot more
 frequently than than the data changes. And for the image, add an Image
 control to the UIComponent itemRenderer in createChildren. (remember to
 setActualSize and position in updateDisplayList). Then when the data
 changes, inspect it and change the source of the image to one of several
 embedded image classes in the itemRenderer. Something like:
 
  [Embed(source=../assets/butterfly.gif)]
  public var myButterfly:Class;
 
  [Embed(source=../assets/grassHopper.gif)]
  public var myGrassHopper:Class;
 
  public function set data(value:Object):void
  {
  // perform conditional logic here
  // don't know your code, so psuedo
  if ( butterfly )
  {
  myImage.source = myButterfly;
  }
 
  if ( grasshopper )
  {
  myImage.source = myGrasshopper;
  }
 
  super.invalidateDisplayList();
  }
 
  -TH
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Vivian Richard kanpsack@ wrote:
  
   Thanks for the reply. I got the logic part. In updateDisplayList I get
   the
   data like data.item.type = spider or bee or butterfly .
  
   so depending on the type I want to show the image of the insects. But
   the problem is since this itemrenderer inherits UIComponent, I cannot
   or do not know how to add an image on it.
  
  
  
  
   On Tue, Nov 17, 2009 at 9:28 AM, turbo_vb TimHoff@ wrote:
  
   
   
Thanks Vivian,
   
For the plot chart, you can do the same type of thing, except with
 more
images, with an itemRenderer. Just like the way you can change
 icons, or
images, in a List itemRenderer, the same can be done with a chart.
 In the
last sample, you can see how to inspect the data; to determine which
 image
class to display. This next 
 http://www.timothyhoff.com/projects/ChartLabeledRendererSample/srcview/index.html
 
Sample
 http://www.timothyhoff.com/projects/ChartLabeledRendererSample/ChartLabeledRendererSample.html
 
shows how you can use an itemRenderer that extends UIComponent. This
 is
a little different than creating an itemRenderer that extends
ProgrammaticSkin, as it gives you a lot more flexibility. Between
 the two
samples, you might be able to come up with a solution. If you get
 stuck,
please feel free to reach out.
   
-TH
   
--- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Vivian Richard kanpsack@ wrote:

 Liked your example. Sleek!!! By the way I am trying to write an
 itemrenderer
 for plot chart. Depending on the value of the plot item I want to
 show
 different
 icons in the plotted spot. These is an example of plot chart where
 you
 can
 embed an image but in that way you can only put same image in one
 series.
 Here is the link:



   
 http://livedocs.adobe.com/flex/3/html/help.html?content=charts_formatting_12.html

 The butterfly example - I am talking about.



 On Mon, Nov 16, 2009 at 3:02 PM, turbo_vb TimHoff@ wrote:

 
 
  Cool, yeah I should have said custom lineSegmentRenderer.
 
 
  -TH
 
  --- In 
  flexcoders@yahoogroups.comflexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com, Jake
   
  Churchill reynacho@ wrote:
  
   THANK YOU. I have seen this before and I've been looking for
 it
forever.
   The stinking chart components are all in the dataviz SWC and I
couldn't
  get
   past a null error I was getting.
  
   On Mon, Nov 16, 2009 at 4:43 PM, turbo_vb TimHoff@ wrote:
  
   
   
Sorry bout that, let's try it again: Sample
 
   
 http://www.timothyhoff.com/projects/LineRendererSample/LineRendererSample.html
  
 
   
   
-TH
   
--- In 
flexcoders@yahoogroups.comflexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com,
Jake
   
  Churchill reynacho@ wrote:
   

Re: [flexcoders] Re: LineSeries

2009-11-17 Thread Vivian Richard
  Got your point - very clearly. But Every time a point is rendered, does it
mean
  that for each point all the images will be attached with the app. I mean
is there
  a possibility that these images will be duplicated?




On Tue, Nov 17, 2009 at 10:57 AM, Jake Churchill reyna...@gmail.com wrote:



 Yes, that is possible but you have to remember that each image you display
 will be a subsequent request to the web server.  If you embed the image, you
 embed it once and use it a bunch of times without subsequent requests.


 On Tue, Nov 17, 2009 at 12:54 PM, Vivian Richard kanps...@gmail.comwrote:





   Is it possible to do it with out embedding the image? Just
   creating am iamge and then pointing the source of the image
   to the image component. Instead Embedding all the images.


  On Tue, Nov 17, 2009 at 10:07 AM, turbo_vb timh...@aol.com wrote:



 Just read your last post a little more. To add an Image control, first
 create a var:

 private var myImage:Image;

 Then in createChildren():

 override protected function createChildren():void
 {
 super.createChildren();

 if ( !myImage )
 {
 myImage = new Image();
 addChild( myImage );
 }

 }

 -TH


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 turbo_vb timh...@... wrote:
 
 
 
  Ok 2 things, better to change the image in the set data method and then
 invalidateDisplayList(); because updateDisplayList gets called a lot more
 frequently than than the data changes. And for the image, add an Image
 control to the UIComponent itemRenderer in createChildren. (remember to
 setActualSize and position in updateDisplayList). Then when the data
 changes, inspect it and change the source of the image to one of several
 embedded image classes in the itemRenderer. Something like:
 
  [Embed(source=../assets/butterfly.gif)]
  public var myButterfly:Class;
 
  [Embed(source=../assets/grassHopper.gif)]
  public var myGrassHopper:Class;
 
  public function set data(value:Object):void
  {
  // perform conditional logic here
  // don't know your code, so psuedo
  if ( butterfly )
  {
  myImage.source = myButterfly;
  }
 
  if ( grasshopper )
  {
  myImage.source = myGrasshopper;
  }
 
  super.invalidateDisplayList();
  }
 
  -TH
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Vivian Richard kanpsack@ wrote:
  
   Thanks for the reply. I got the logic part. In updateDisplayList I
 get
   the
   data like data.item.type = spider or bee or butterfly .
  
   so depending on the type I want to show the image of the insects. But
   the problem is since this itemrenderer inherits UIComponent, I cannot
   or do not know how to add an image on it.
  
  
  
  
   On Tue, Nov 17, 2009 at 9:28 AM, turbo_vb TimHoff@ wrote:
  
   
   
Thanks Vivian,
   
For the plot chart, you can do the same type of thing, except with
 more
images, with an itemRenderer. Just like the way you can change
 icons, or
images, in a List itemRenderer, the same can be done with a chart.
 In the
last sample, you can see how to inspect the data; to determine
 which image
class to display. This next 
 http://www.timothyhoff.com/projects/ChartLabeledRendererSample/srcview/index.html
 
Sample
 http://www.timothyhoff.com/projects/ChartLabeledRendererSample/ChartLabeledRendererSample.html
 
shows how you can use an itemRenderer that extends UIComponent.
 This is
a little different than creating an itemRenderer that extends
ProgrammaticSkin, as it gives you a lot more flexibility. Between
 the two
samples, you might be able to come up with a solution. If you get
 stuck,
please feel free to reach out.
   
-TH
   
--- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Vivian Richard kanpsack@ wrote:

 Liked your example. Sleek!!! By the way I am trying to write an
 itemrenderer
 for plot chart. Depending on the value of the plot item I want to
 show
 different
 icons in the plotted spot. These is an example of plot chart
 where you
 can
 embed an image but in that way you can only put same image in one
 series.
 Here is the link:



   
 http://livedocs.adobe.com/flex/3/html/help.html?content=charts_formatting_12.html

 The butterfly example - I am talking about.



 On Mon, Nov 16, 2009 at 3:02 PM, turbo_vb TimHoff@ wrote:

 
 
  Cool, yeah I should have said custom lineSegmentRenderer.
 
 
  -TH
 
  --- In 
  flexcoders@yahoogroups.comflexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com, Jake
   
  Churchill reynacho@ wrote:
  
   THANK YOU. I have seen this before and I've been looking for
 it
forever.
   The stinking chart components are all in the dataviz SWC and
 I
couldn't
  get
   past a null error I was getting.
  
   On Mon, Nov 16, 2009 at 4:43 PM, turbo_vb TimHoff@ wrote:
  
   
   
Sorry bout that, let's try it again: 

Re: [flexcoders] Re: LineSeries

2009-11-17 Thread Jake Churchill
I'm not sure what happens in memory but I have an application with a
PlotSeries and every time the trend switches to either positive or negative
I have to display a green or red arrow (around 10-15 times on an average
chart) and when I was monitoring it during development I was able to see
each request to the server.

You could cache the images with a Dictionary object (google cached
itemRenderers for example code).  I would suggest using the source pointed
to the server at first and if you see any lag, then you can embed the images
or try some kind of caching

On Tue, Nov 17, 2009 at 1:03 PM, Vivian Richard kanps...@gmail.com wrote:




   Got your point - very clearly. But Every time a point is rendered, does
 it mean
   that for each point all the images will be attached with the app. I mean
 is there
   a possibility that these images will be duplicated?





 On Tue, Nov 17, 2009 at 10:57 AM, Jake Churchill reyna...@gmail.comwrote:



 Yes, that is possible but you have to remember that each image you display
 will be a subsequent request to the web server.  If you embed the image, you
 embed it once and use it a bunch of times without subsequent requests.


 On Tue, Nov 17, 2009 at 12:54 PM, Vivian Richard kanps...@gmail.comwrote:





   Is it possible to do it with out embedding the image? Just
   creating am iamge and then pointing the source of the image
   to the image component. Instead Embedding all the images.


  On Tue, Nov 17, 2009 at 10:07 AM, turbo_vb timh...@aol.com wrote:



 Just read your last post a little more. To add an Image control, first
 create a var:

 private var myImage:Image;

 Then in createChildren():

 override protected function createChildren():void
 {
 super.createChildren();

 if ( !myImage )
 {
 myImage = new Image();
 addChild( myImage );
 }

 }

 -TH


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 turbo_vb timh...@... wrote:
 
 
 
  Ok 2 things, better to change the image in the set data method and
 then invalidateDisplayList(); because updateDisplayList gets called a lot
 more frequently than than the data changes. And for the image, add an Image
 control to the UIComponent itemRenderer in createChildren. (remember to
 setActualSize and position in updateDisplayList). Then when the data
 changes, inspect it and change the source of the image to one of several
 embedded image classes in the itemRenderer. Something like:
 
  [Embed(source=../assets/butterfly.gif)]
  public var myButterfly:Class;
 
  [Embed(source=../assets/grassHopper.gif)]
  public var myGrassHopper:Class;
 
  public function set data(value:Object):void
  {
  // perform conditional logic here
  // don't know your code, so psuedo
  if ( butterfly )
  {
  myImage.source = myButterfly;
  }
 
  if ( grasshopper )
  {
  myImage.source = myGrasshopper;
  }
 
  super.invalidateDisplayList();
  }
 
  -TH
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Vivian Richard kanpsack@ wrote:
  
   Thanks for the reply. I got the logic part. In updateDisplayList I
 get
   the
   data like data.item.type = spider or bee or butterfly .
  
   so depending on the type I want to show the image of the insects.
 But
   the problem is since this itemrenderer inherits UIComponent, I
 cannot
   or do not know how to add an image on it.
  
  
  
  
   On Tue, Nov 17, 2009 at 9:28 AM, turbo_vb TimHoff@ wrote:
  
   
   
Thanks Vivian,
   
For the plot chart, you can do the same type of thing, except with
 more
images, with an itemRenderer. Just like the way you can change
 icons, or
images, in a List itemRenderer, the same can be done with a chart.
 In the
last sample, you can see how to inspect the data; to determine
 which image
class to display. This next 
 http://www.timothyhoff.com/projects/ChartLabeledRendererSample/srcview/index.html
 
Sample
 http://www.timothyhoff.com/projects/ChartLabeledRendererSample/ChartLabeledRendererSample.html
 
shows how you can use an itemRenderer that extends UIComponent.
 This is
a little different than creating an itemRenderer that extends
ProgrammaticSkin, as it gives you a lot more flexibility. Between
 the two
samples, you might be able to come up with a solution. If you get
 stuck,
please feel free to reach out.
   
-TH
   
--- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Vivian Richard kanpsack@ wrote:

 Liked your example. Sleek!!! By the way I am trying to write an
 itemrenderer
 for plot chart. Depending on the value of the plot item I want
 to show
 different
 icons in the plotted spot. These is an example of plot chart
 where you
 can
 embed an image but in that way you can only put same image in
 one series.
 Here is the link:



   
 http://livedocs.adobe.com/flex/3/html/help.html?content=charts_formatting_12.html

 The butterfly example - I am talking about.



 On Mon, Nov 16, 2009 at 

Re: [flexcoders] quick XML question

2009-11-17 Thread claudiu ursica
I think the -   dls-configuration is the issue. There is a solution for this 
but i cannot remember where i read about it. Do some google-ing...

C





From: Pruitt, Byron S steve.pru...@hp.com
To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com
Sent: Tue, November 17, 2009 8:29:22 PM
Subject: [flexcoders] quick XML question

   
I
have a variable named report set to an xml document.
 
var report : XML = dls-configurationsystem/system………/dls-configuration
var n1 : XML = report.system as XML;
var n2 : XML = report.children( )[0];
 
n1 = null
n2 = the system node
 
I have accessed nodes many times like I do
for n1 and not a problem with it evaluating to null.  I can’t figure
out what I am doing differently with the above.
Any help showing me the obvious is
appreciated.
 
 
-Steve
 
 


  

[flexcoders] Re: LineSeries

2009-11-17 Thread turbo_vb
I usually use a separate class for embeddedAssets; that would be referenced by 
the itemRenderer.  That way, you have a central place to manage the assets and 
you don't risk duplication.

-TH

--- In flexcoders@yahoogroups.com, Vivian Richard kanps...@... wrote:

   Got your point - very clearly. But Every time a point is rendered, does it
 mean
   that for each point all the images will be attached with the app. I mean
 is there
   a possibility that these images will be duplicated?
 
 
 
 
 On Tue, Nov 17, 2009 at 10:57 AM, Jake Churchill reyna...@... wrote:
 
 
 
  Yes, that is possible but you have to remember that each image you display
  will be a subsequent request to the web server.  If you embed the image, you
  embed it once and use it a bunch of times without subsequent requests.
 
 
  On Tue, Nov 17, 2009 at 12:54 PM, Vivian Richard kanps...@...wrote:
 
 
 
 
 
Is it possible to do it with out embedding the image? Just
creating am iamge and then pointing the source of the image
to the image component. Instead Embedding all the images.
 
 
   On Tue, Nov 17, 2009 at 10:07 AM, turbo_vb timh...@... wrote:
 
 
 
  Just read your last post a little more. To add an Image control, first
  create a var:
 
  private var myImage:Image;
 
  Then in createChildren():
 
  override protected function createChildren():void
  {
  super.createChildren();
 
  if ( !myImage )
  {
  myImage = new Image();
  addChild( myImage );
  }
 
  }
 
  -TH
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
  turbo_vb TimHoff@ wrote:
  
  
  
   Ok 2 things, better to change the image in the set data method and then
  invalidateDisplayList(); because updateDisplayList gets called a lot more
  frequently than than the data changes. And for the image, add an Image
  control to the UIComponent itemRenderer in createChildren. (remember to
  setActualSize and position in updateDisplayList). Then when the data
  changes, inspect it and change the source of the image to one of several
  embedded image classes in the itemRenderer. Something like:
  
   [Embed(source=../assets/butterfly.gif)]
   public var myButterfly:Class;
  
   [Embed(source=../assets/grassHopper.gif)]
   public var myGrassHopper:Class;
  
   public function set data(value:Object):void
   {
   // perform conditional logic here
   // don't know your code, so psuedo
   if ( butterfly )
   {
   myImage.source = myButterfly;
   }
  
   if ( grasshopper )
   {
   myImage.source = myGrasshopper;
   }
  
   super.invalidateDisplayList();
   }
  
   -TH
  
   --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
  Vivian Richard kanpsack@ wrote:
   
Thanks for the reply. I got the logic part. In updateDisplayList I
  get
the
data like data.item.type = spider or bee or butterfly .
   
so depending on the type I want to show the image of the insects. But
the problem is since this itemrenderer inherits UIComponent, I cannot
or do not know how to add an image on it.
   
   
   
   
On Tue, Nov 17, 2009 at 9:28 AM, turbo_vb TimHoff@ wrote:
   


 Thanks Vivian,

 For the plot chart, you can do the same type of thing, except with
  more
 images, with an itemRenderer. Just like the way you can change
  icons, or
 images, in a List itemRenderer, the same can be done with a chart.
  In the
 last sample, you can see how to inspect the data; to determine
  which image
 class to display. This next 
  http://www.timothyhoff.com/projects/ChartLabeledRendererSample/srcview/index.html
  
 Sample
  http://www.timothyhoff.com/projects/ChartLabeledRendererSample/ChartLabeledRendererSample.html
  
 shows how you can use an itemRenderer that extends UIComponent.
  This is
 a little different than creating an itemRenderer that extends
 ProgrammaticSkin, as it gives you a lot more flexibility. Between
  the two
 samples, you might be able to come up with a solution. If you get
  stuck,
 please feel free to reach out.

 -TH

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
  Vivian Richard kanpsack@ wrote:
 
  Liked your example. Sleek!!! By the way I am trying to write an
  itemrenderer
  for plot chart. Depending on the value of the plot item I want to
  show
  different
  icons in the plotted spot. These is an example of plot chart
  where you
  can
  embed an image but in that way you can only put same image in one
  series.
  Here is the link:
 
 
 

  http://livedocs.adobe.com/flex/3/html/help.html?content=charts_formatting_12.html
 
  The butterfly example - I am talking about.
 
 
 
  On Mon, Nov 16, 2009 at 3:02 PM, turbo_vb TimHoff@ wrote:
 
  
  
   Cool, yeah I should have said custom lineSegmentRenderer.
  
  
   -TH
  
   --- In 
   flexcoders@yahoogroups.comflexcoders%40yahoogroups.comflexcoders%
  

[flexcoders] first tile of tilelist does not show up

2009-11-17 Thread mattgarland2000
I have a component which breaks up a picture into a tilelist. It works great, 
except, the first picture does not show up.

The renderer is a canvas with an image (subclasses add other images). It grabs 
the appropriate image from the parent component. (This image is dynamically 
created from a loaded image). 

Here is the renderer:

override public function set data(value:Object):void
{
_data=value;
invalidateProperties();
dispatchEvent(new 
FlexEvent(FlexEvent.DATA_CHANGE));
}

[Bindable(dataChange)]
override public function get data():Object
{
return _data;
}

[Bindable(dataChange)]
public function get listData():BaseListData
{
return _listData;
}

public function set listData(value:BaseListData):void
{
_listData=value;
list=listData.owner as TilePicture;
}

protected function setImage():void
{
image.source=list.imageFromRenderer(this);
}

override protected function 
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
{
super.updateDisplayList(this.unscaledWidth, 
this.unscaledHeight);
setImage();
}

Things I have tried:

1) in the parent, resetting the dp to force an update
2) forcing an update via dataChange
3) binding the image's source

These don't work. Not sure what to try next. Occasionaly and unpredictably, the 
image will update when 1) in a subclassed renderer, a second image is changed. 
But usually no amount of  interaction will make the first tile appear. 



Re: [flexcoders] Re: LineSeries

2009-11-17 Thread Jake Churchill
yeah, or if you know flash you can embed them all into an FLA or create
another SWF and just embed them all once.  That usually ends up being a
compile time thing for me though.

On Tue, Nov 17, 2009 at 1:07 PM, turbo_vb timh...@aol.com wrote:



 I usually use a separate class for embeddedAssets; that would be referenced
 by the itemRenderer. That way, you have a central place to manage the assets
 and you don't risk duplication.


 -TH

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Vivian
 Richard kanps...@... wrote:
 
  Got your point - very clearly. But Every time a point is rendered, does
 it
  mean
  that for each point all the images will be attached with the app. I mean
  is there
  a possibility that these images will be duplicated?
 
 
 
 
  On Tue, Nov 17, 2009 at 10:57 AM, Jake Churchill reyna...@... wrote:
 
  
  
   Yes, that is possible but you have to remember that each image you
 display
   will be a subsequent request to the web server. If you embed the image,
 you
   embed it once and use it a bunch of times without subsequent requests.
  
  
   On Tue, Nov 17, 2009 at 12:54 PM, Vivian Richard kanps...@...wrote:

  
  
  
  
  
   Is it possible to do it with out embedding the image? Just
   creating am iamge and then pointing the source of the image
   to the image component. Instead Embedding all the images.
  
  
   On Tue, Nov 17, 2009 at 10:07 AM, turbo_vb timh...@... wrote:
  
  
  
   Just read your last post a little more. To add an Image control,
 first
   create a var:
  
   private var myImage:Image;
  
   Then in createChildren():
  
   override protected function createChildren():void
   {
   super.createChildren();
  
   if ( !myImage )
   {
   myImage = new Image();
   addChild( myImage );
   }
  
   }
  
   -TH
  
  
   --- In flexcoders@yahoogroups.com 
   flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com,

   turbo_vb TimHoff@ wrote:
   
   
   
Ok 2 things, better to change the image in the set data method and
 then
   invalidateDisplayList(); because updateDisplayList gets called a lot
 more
   frequently than than the data changes. And for the image, add an
 Image
   control to the UIComponent itemRenderer in createChildren. (remember
 to
   setActualSize and position in updateDisplayList). Then when the data
   changes, inspect it and change the source of the image to one of
 several
   embedded image classes in the itemRenderer. Something like:
   
[Embed(source=../assets/butterfly.gif)]
public var myButterfly:Class;
   
[Embed(source=../assets/grassHopper.gif)]
public var myGrassHopper:Class;
   
public function set data(value:Object):void
{
// perform conditional logic here
// don't know your code, so psuedo
if ( butterfly )
{
myImage.source = myButterfly;
}
   
if ( grasshopper )
{
myImage.source = myGrasshopper;
}
   
super.invalidateDisplayList();
}
   
-TH
   
--- In flexcoders@yahoogroups.com 
flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com,

   Vivian Richard kanpsack@ wrote:

 Thanks for the reply. I got the logic part. In updateDisplayList
 I
   get
 the
 data like data.item.type = spider or bee or butterfly .

 so depending on the type I want to show the image of the insects.
 But
 the problem is since this itemrenderer inherits UIComponent, I
 cannot
 or do not know how to add an image on it.




 On Tue, Nov 17, 2009 at 9:28 AM, turbo_vb TimHoff@ wrote:

 
 
  Thanks Vivian,
 
  For the plot chart, you can do the same type of thing, except
 with
   more
  images, with an itemRenderer. Just like the way you can change
   icons, or
  images, in a List itemRenderer, the same can be done with a
 chart.
   In the
  last sample, you can see how to inspect the data; to determine
   which image
  class to display. This next 
  
 http://www.timothyhoff.com/projects/ChartLabeledRendererSample/srcview/index.html
   
  Sample
  
 http://www.timothyhoff.com/projects/ChartLabeledRendererSample/ChartLabeledRendererSample.html
   
  shows how you can use an itemRenderer that extends UIComponent.
   This is
  a little different than creating an itemRenderer that extends
  ProgrammaticSkin, as it gives you a lot more flexibility.
 Between
   the two
  samples, you might be able to come up with a solution. If you
 get
   stuck,
  please feel free to reach out.
 
  -TH
 
  --- In 
  flexcoders@yahoogroups.comflexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com,

   Vivian Richard kanpsack@ wrote:
  
   Liked your example. Sleek!!! By the way I am trying to write
 an
   itemrenderer
   for plot chart. Depending on the value of the plot item I
 want to
   show
   different
   icons in the plotted spot. These is an example of plot chart
   where you
   can
   embed an image 

[flexcoders] Re: first tile of tilelist does not show up

2009-11-17 Thread jamesfin
Move the setImage into commitProperties and you should be good to go...


override protected function commitProperties():void{

super.commitProperties();

setImage(); 

}


--- In flexcoders@yahoogroups.com, mattgarland2000 al...@... wrote:

 I have a component which breaks up a picture into a tilelist. It works great, 
 except, the first picture does not show up.
 
 The renderer is a canvas with an image (subclasses add other images). It 
 grabs the appropriate image from the parent component. (This image is 
 dynamically created from a loaded image). 
 
 Here is the renderer:
 
   override public function set data(value:Object):void
   {
   _data=value;
   invalidateProperties();
   dispatchEvent(new 
 FlexEvent(FlexEvent.DATA_CHANGE));
   }
 
   [Bindable(dataChange)]
   override public function get data():Object
   {
   return _data;
   }
 
   [Bindable(dataChange)]
   public function get listData():BaseListData
   {
   return _listData;
   }
 
   public function set listData(value:BaseListData):void
   {
   _listData=value;
   list=listData.owner as TilePicture;
   }
 
   protected function setImage():void
   {
   image.source=list.imageFromRenderer(this);
   }
 
   override protected function 
 updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
   {
   super.updateDisplayList(this.unscaledWidth, 
 this.unscaledHeight);
   setImage();
   }
 
 Things I have tried:
 
 1) in the parent, resetting the dp to force an update
 2) forcing an update via dataChange
 3) binding the image's source
 
 These don't work. Not sure what to try next. Occasionaly and unpredictably, 
 the image will update when 1) in a subclassed renderer, a second image is 
 changed. But usually no amount of  interaction will make the first tile 
 appear.





[flexcoders] Re: first tile of tilelist does not show up

2009-11-17 Thread mattgarland2000


Thanks, that makes sense, but it does not work here, unfortunately. I think I 
might try to defining some states for the renderer and see if using states 
takes care of this if it is some weird timing/updating issue.

--- In flexcoders@yahoogroups.com, jamesfin james.alan.finni...@... wrote:

 Move the setImage into commitProperties and you should be good to go...
 
 
 override protected function commitProperties():void{
   
 super.commitProperties();
 
 setImage();   
 
 }
 
 
 --- In flexcoders@yahoogroups.com, mattgarland2000 alias@ wrote:
 
  I have a component which breaks up a picture into a tilelist. It works 
  great, except, the first picture does not show up.
  
  The renderer is a canvas with an image (subclasses add other images). It 
  grabs the appropriate image from the parent component. (This image is 
  dynamically created from a loaded image). 
  
  Here is the renderer:
  
  override public function set data(value:Object):void
  {
  _data=value;
  invalidateProperties();
  dispatchEvent(new 
  FlexEvent(FlexEvent.DATA_CHANGE));
  }
  
  [Bindable(dataChange)]
  override public function get data():Object
  {
  return _data;
  }
  
  [Bindable(dataChange)]
  public function get listData():BaseListData
  {
  return _listData;
  }
  
  public function set listData(value:BaseListData):void
  {
  _listData=value;
  list=listData.owner as TilePicture;
  }
  
  protected function setImage():void
  {
  image.source=list.imageFromRenderer(this);
  }
  
  override protected function 
  updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
  {
  super.updateDisplayList(this.unscaledWidth, 
  this.unscaledHeight);
  setImage();
  }
  
  Things I have tried:
  
  1) in the parent, resetting the dp to force an update
  2) forcing an update via dataChange
  3) binding the image's source
  
  These don't work. Not sure what to try next. Occasionaly and unpredictably, 
  the image will update when 1) in a subclassed renderer, a second image is 
  changed. But usually no amount of  interaction will make the first tile 
  appear.
 




[flexcoders] Re: first tile of tilelist does not show up

2009-11-17 Thread jamesfin
Put this code in and see if an image appears in the first slot.  If so, your 
image source logic is incorrect.

test.png is a sample image...

[Embed(source=test.png)]
[Bindable]
public static var testImage:Class;

override protected function commitProperties():void{

super.commitProperties();
image.source=testImage;

}





--- In flexcoders@yahoogroups.com, mattgarland2000 al...@... wrote:

 
 
 Thanks, that makes sense, but it does not work here, unfortunately. I think I 
 might try to defining some states for the renderer and see if using states 
 takes care of this if it is some weird timing/updating issue.
 
 --- In flexcoders@yahoogroups.com, jamesfin james.alan.finnigan@ wrote:
 
  Move the setImage into commitProperties and you should be good to go...
  
  
  override protected function commitProperties():void{
  
  super.commitProperties();
  
  setImage(); 
  
  }
  
  
  --- In flexcoders@yahoogroups.com, mattgarland2000 alias@ wrote:
  
   I have a component which breaks up a picture into a tilelist. It works 
   great, except, the first picture does not show up.
   
   The renderer is a canvas with an image (subclasses add other images). It 
   grabs the appropriate image from the parent component. (This image is 
   dynamically created from a loaded image). 
   
   Here is the renderer:
   
 override public function set data(value:Object):void
 {
 _data=value;
 invalidateProperties();
 dispatchEvent(new 
   FlexEvent(FlexEvent.DATA_CHANGE));
 }
   
 [Bindable(dataChange)]
 override public function get data():Object
 {
 return _data;
 }
   
 [Bindable(dataChange)]
 public function get listData():BaseListData
 {
 return _listData;
 }
   
 public function set listData(value:BaseListData):void
 {
 _listData=value;
 list=listData.owner as TilePicture;
 }
   
 protected function setImage():void
 {
 image.source=list.imageFromRenderer(this);
 }
   
 override protected function 
   updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
 {
 super.updateDisplayList(this.unscaledWidth, 
   this.unscaledHeight);
 setImage();
 }
   
   Things I have tried:
   
   1) in the parent, resetting the dp to force an update
   2) forcing an update via dataChange
   3) binding the image's source
   
   These don't work. Not sure what to try next. Occasionaly and 
   unpredictably, the image will update when 1) in a subclassed renderer, a 
   second image is changed. But usually no amount of  interaction will make 
   the first tile appear.
  
 





RE: [flexcoders] Comparing Dates: ObjectUtil.dateCompare not working

2009-11-17 Thread powers

@Keith

What would you recommend to use instead of DateField.stringToDate to parse a
string into a date object so that it doesn't strip off the time portion? 
Date.parse does not correctly parse a date when the string is formatted as
-MM-DD HH:NN:SS.



Keith Reinfeld wrote:
 
 ObjectUtil.dateCompare() function does account for the time portion of the
 supplied dates.
 
  
 
 According to the scenario you describe ObjectUtil.dateCompare() function
 never sees the time portion of date_A nor date_B.
 
  
 
 The DateField.stringToDate() method only evaluates the -MM-DD portion
 of
 the supplied date string and ignores/strips off the time portion of the
 date.
 
  
 
 Regards,
 
  
 
 Keith Reinfeld
 Home Page:  http://keithreinfeld.home.comcast.net/
 http://keithreinfeld.home.comcast.net
 
  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of powers
 Sent: Monday, November 16, 2009 2:29 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Comparing Dates: ObjectUtil.dateCompare not working
 
  
 
   
 
 
 I'm writing a sort compare function to sort by date. The date format is
 -MM-DD HH:NN:SS. I'm converting the dates, in a string format, to a
 Date objects like so:
 
 DateField.stringToDate(date_A '-MM-DD HH:NN:SS');
 DateField.stringToDate(date_B '-MM-DD HH:NN:SS');
 
 Then comparing the dates like this:
 
 ObjectUtil.dateCompare(date_A, date_B)
 
 It always returns 0 when the date portion of the two date objects are
 equal,
 but the times are different. Does the ObjectUtil.dateCompare function not
 account for the time? 
 
 -- 
 View this message in context:
 http://old.nabble.com/Comparing-Dates%3A-ObjectUtil.dateCompare-not-working-
 tp26378917p26378917.html
 Sent from the FlexCoders mailing list archive at Nabble.com.
 
 
 
 No virus found in this incoming message.
 Checked by AVG - www.avg.com
 Version: 8.5.425 / Virus Database: 270.14.67/2506 - Release Date: 11/16/09
 07:43:00
 
 
  
  
 

-- 
View this message in context: 
http://old.nabble.com/Comparing-Dates%3A-ObjectUtil.dateCompare-not-working-tp26378917p26396451.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] In a Label field, if the text is too long it ends with ..... , however if you ..

2009-11-17 Thread luvfotography
If the Label control size is smaller than its text, the text of the Label 
control is truncated using a localizable string, such as 

However if you set the text with htmlText, then you do not get the '...' How 
can I set the text of the Label field  with htmlText and still get the '...' if 
my text is too long?

ex: 

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
mx:Label x=37 y=35 text=label field width=193 id=myLabel/
mx:Button x=37 y=91 label=change Label Text  click=myLabel.text 
= myTextInput.text/
mx:Button x=184 y=91 label=change Label with HtmlText  
click=myLabel.htmlText = myTextInput.text/
mx:TextInput id=myTextInput text=This is a really long label text 
it should truncate in periods x=37 y=61/
/mx:Application




RE: [flexcoders] quick XML question

2009-11-17 Thread Pruitt, Byron S
Found an article online reporting the dashes are a problem in E4X syntax.  
http://www.insideria.com/2009/01/flex-xml-quick-tip.html if anyone is 
interested.



However it addresses the problem of…



dg.dataProvider = xmlDataSource.data-one;



And recommends…



 dg.dataProvider = xmlDataSource[data-one];



But in my problem, I do not explicitly state a dash in my syntax.  I expanded 
my experiment a little and defined report to be



var report : XML = 
dls-configurationsystemproduct-name/product-name/system………/dls-configuration



and tried



var n1 : XML = report.system[product-name] as XML;

and n1 is null.



Still confused.



-S


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of claudiu ursica
Sent: Tuesday, November 17, 2009 2:09 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] quick XML question


I think the -dls-configuration is the issue. There is a solution for this 
but i cannot remember where i read about it. Do some google-ing...

C


From: Pruitt, Byron S steve.pru...@hp.com
To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com
Sent: Tue, November 17, 2009 8:29:22 PM
Subject: [flexcoders] quick XML question


I have a variable named report set to an xml document.

var report : XML = dls-configurationsystem/system………/dls-configuration
var n1 : XML = report.system as XML;
var n2 : XML = report.children( )[0];

n1 = null
n2 = the system node

I have accessed nodes many times like I do for n1 and not a problem with it 
evaluating to null.  I can’t figure out what I am doing differently with the 
above.
Any help showing me the obvious is appreciated.


-Steve





[flexcoders] Re: Flash Builder 4 for Linux

2009-11-17 Thread pcassi...@ymail.com
How do you do it? Could you tell me? How about the performance issues?

--- In flexcoders@yahoogroups.com, feiy eshang...@... wrote:

 hi,
 i had ported the flash builder 4 to linux,more info:
 http://code.google.com/p/fb4linux/
 ÏÐÔÆ¹Âº× - ÇåÀäÏãÖб§Ï¥Ò÷





Re: [flexcoders] Re: Flash Builder 4 for Linux

2009-11-17 Thread primo411
I tested it and it works great ! I'm curious too, how did you achieve this ?
Did you patch a lot of jars ?

2009/11/17 pcassi...@ymail.com pcassi...@ymail.com



 How do you do it? Could you tell me? How about the performance issues?


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, feiy
 eshang...@... wrote:
 
  hi,
  i had ported the flash builder 4 to linux,more info:
  http://code.google.com/p/fb4linux/
  ÏÐÔÆ¹Âº× - ÇåÀäÏãÖб§Ï¥Ò÷
 

  



Re: [flexcoders] quick XML question

2009-11-17 Thread claudiu ursica
Can you post your detailed xml ?
I'll have a quick look in the morning...
C





From: Pruitt, Byron S steve.pru...@hp.com
To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com
Sent: Tue, November 17, 2009 10:01:48 PM
Subject: RE: [flexcoders] quick XML question

   
Found
an article online reporting the dashes are a problem in E4X syntax.  
http://www.insideri a.com/2009/ 01/flex-xml- quick-tip. html if anyone is 
interested.
 
However
it addresses the problem of… 
 
dg.dataProvider = xmlDataSource.data-one;
 
And recommends…
 
 dg.dataProvider = xmlDataSource[data-one];
 
But in my problem, I do not explicitly state a
dash in my syntax.  I expanded my experiment a little and defined report to be
 
var
report : XML = 
dls-configurationsystemproduct-name/product-name/system………/dls-configuration
 
and tried
 
var n1 :
XML = report.system[product-name] as XML;
and n1 is
null.
 
Still
confused.
 
-S
 
 
From:flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On 
Behalf Of claudiu
ursica
Sent: Tuesday, November 17, 2009 2:09 PM
To: flexcod...@yahoogro ups.com
Subject: Re: [flexcoders] quick XML question
 
  
I
think the -dls-configuration is the issue. There is a
solution for this but i cannot remember where i read about it. Do some
google-ing.. .

C
 


 
From:Pruitt, Byron
S steve.pruitt@ hp.com
To: flexcod...@yahoogro ups.com flexcod...@yahoogro ups.com
Sent: Tue, November 17, 2009 8:29:22 PM
Subject: [flexcoders] quick XML question

  
I have a variable named report set to an xml document.
 
var report : XML =
dls-configurationsystem/system………/dls-configuration
var n1 : XML = report.system as XML;
var n2 : XML = report.children( )[0];
 
n1 = null
n2 = the system node
 
I have accessed nodes many times like I do for n1 and
not a problem with it evaluating to null.  I can’t figure out what I am
doing differently with the above.
Any help showing me the obvious is appreciated.
 
 
-Steve
 
 
 


  

[flexcoders] Re: In a Label field, if the text is too long it ends with ..... , however if you ..

2009-11-17 Thread jamesfin
This was of help to me a while back...

http://thanksmister.com/index.php/archive/flex-truncating-html-text




--- In flexcoders@yahoogroups.com, luvfotography ygro...@... wrote:

 If the Label control size is smaller than its text, the text of the Label 
 control is truncated using a localizable string, such as 
 
 However if you set the text with htmlText, then you do not get the '...' How 
 can I set the text of the Label field  with htmlText and still get the '...' 
 if my text is too long?
 
 ex: 
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
   mx:Label x=37 y=35 text=label field width=193 id=myLabel/
   mx:Button x=37 y=91 label=change Label Text  click=myLabel.text 
 = myTextInput.text/
   mx:Button x=184 y=91 label=change Label with HtmlText  
 click=myLabel.htmlText = myTextInput.text/
   mx:TextInput id=myTextInput text=This is a really long label text 
 it should truncate in periods x=37 y=61/
 /mx:Application





Re: [flexcoders] quick XML question

2009-11-17 Thread thomas parquier
Hello,

Most e4x methods return xmllist not xml. I think the following should work :

 var n1 : XML = report.system[product-name][0];


thomas
---
http://www.web-attitude.fr/
msn : thomas.parqu...@web-attitude.fr
softphone : sip:webattit...@ekiga.net sip%3awebattit...@ekiga.net
téléphone portable : +33601 822 056


2009/11/17 Pruitt, Byron S steve.pru...@hp.com



  Found an article online reporting the dashes are a problem in E4X
 syntax.  http://www.insideria.com/2009/01/flex-xml-quick-tip.html if
 anyone is interested.



 However it addresses the problem of…



 dg.dataProvider = xmlDataSource.data-one;



 And recommends…



  dg.dataProvider = xmlDataSource[data-one];



 But in my problem, I do not explicitly state a dash in my syntax.  I
 expanded my experiment a little and defined report to be



 var report : XML =
 dls-configurationsystemproduct-name/product-name/system………/dls-configuration



 and tried



 var n1 : XML = report.system[product-name] as XML;

 and n1 is null.



 Still confused.



 -S





 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *claudiu ursica
 *Sent:* Tuesday, November 17, 2009 2:09 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] quick XML question





 I think the -dls-configuration is the issue. There is a solution for
 this but i cannot remember where i read about it. Do some google-ing...

 C


  --

 *From:* Pruitt, Byron S steve.pru...@hp.com
 *To:* flexcoders@yahoogroups.com flexcoders@yahoogroups.com
 *Sent:* Tue, November 17, 2009 8:29:22 PM
 *Subject:* [flexcoders] quick XML question



 I have a variable named report set to an xml document.



 var report : XML =
 dls-configurationsystem/system………/dls-configuration

 var n1 : XML = report.system as XML;

 var n2 : XML = report.children( )[0];



 n1 = null

 n2 = the system node



 I have accessed nodes many times like I do for n1 and not a problem with it
 evaluating to null.  I can’t figure out what I am doing differently with the
 above.

 Any help showing me the obvious is appreciated.





 -Steve





   



[flexcoders] Passing an object to a rendererProvider

2009-11-17 Thread InvertedSpear

So I need to pass additional information (an object like an associative
array) to my renderer provider which is stored nicely in a component, but I
can't access any variables in my parent application from the component, only
children. As a work around, I parsed the object variable to text, put it in
an invisible mx:Text control, and parsed it back into an object in my
component.

I feel like a hack because I know this is horribly inefficient and there has
to be a better way, but I couldn't come up with one. 

Thoughts anyone?

~Mike

PS, I did this because I'm using a summary row in an advancedDataGrid to
divide it into sections, but I don't want to sort by the lable of each
section (which seems to be the default) but by an ID. My solution was to
pass it the ID which will sort it correctly then pull the correct lable text
out of my object with that ID. It works perfectly like it is but does anyone
know the Right way to do this?
-- 
View this message in context: 
http://old.nabble.com/Passing-an-object-to-a-rendererProvider-tp26396466p26396466.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] FB Serial number invalid

2009-11-17 Thread Richard Rodseth
My employer purchased a FlexBuilder 3 license for me to use. When I enter
the serial number in FB (plug-in version, Eclipse Ganymede, OS X Snow
Leopard) it shows a green checkmark but says the serial number is invalid.
Customer service claims the number is valid and suggests I edit
license.properties. I have several of those, mostly within SDK folders I am
no longer using.
The serial number I purchased myself and am using successfully on my
personal machine also results in an error, leading me to think there may be
a glitch in FB itself. Anyone else had problems like this?


[flexcoders] Re: how to enable stack traceback?

2009-11-17 Thread mitchgrrt
I'm still having this problem.

On the Mac how do I tell what version of the Flash Player I'm running? 
In
About This Mac  Software  Applications
there is more than one, how do I tell which one I'm running?  The most
recent one I downloaded is this:
Flash Player:

   Version:10.0.12.36
   Last Modified:10/4/08 11:54 PM
   Kind:Universal
   Get Info String:Adobe Flash Player 10.0 r12 Copyright (c)
1996-2008 Adobe Macromedia Software LLC. All rights reserved
   Location:/Applications/Adobe Flex Builder
3/Player/mac/10/mac/Flash Player.app
It doesn't say debug anywhere, but I use the FlexBuilder debugger a
lot and the debugger works fine, so I'm pretty sure I'm running a debug
version.  Thanks.


--- In flexcoders@yahoogroups.com, Johannes Nel johannes@...
wrote:

 just using the debug player should give you that.

 On Tue, Aug 4, 2009 at 3:54 PM, mitchgrrt mitch_g...@... wrote:

 
 
  I've recently changed companies. At my old company in the Flex app
we were
  developing, whenever there was an unhandled exception we got a stack
  traceback in a popup window. At my new company I'm not seeing that.
I see it
  when running inside the debugger, in the console, but not when there
is no
  debugger.
 
  I'd like to turn on the traceback and see it without the debugger.
Does
  somebody know how to turn this on? I'm running FlexBuilder 3 on a
Mac.
  Thanks.
 
 
 



 --
 j:pn
 \\no comment


--- In flexcoders@yahoogroups.com, Johannes Nel johannes@...
wrote:

 just using the debug player should give you that.

 On Tue, Aug 4, 2009 at 3:54 PM, mitchgrrt mitch_g...@... wrote:

 
 
  I've recently changed companies. At my old company in the Flex app
we were
  developing, whenever there was an unhandled exception we got a stack
  traceback in a popup window. At my new company I'm not seeing that.
I see it
  when running inside the debugger, in the console, but not when there
is no
  debugger.
 
  I'd like to turn on the traceback and see it without the debugger.
Does
  somebody know how to turn this on? I'm running FlexBuilder 3 on a
Mac.
  Thanks.
 
 
 



 --
 j:pn
 \\no comment




[flexcoders] Re: how to enable stack traceback?

2009-11-17 Thread valdhor
Have you tried

http://www.adobe.com/livedocs/flex/3/langref/flash/system/Capabilities.html#version

or

http://kb2.adobe.com/cps/155/tn_15507.html

or

http://www.playerversion.com/

--- In flexcoders@yahoogroups.com, mitchgrrt mitch_g...@... wrote:

 I'm still having this problem.
 
 On the Mac how do I tell what version of the Flash Player I'm running? 
 In
 About This Mac  Software  Applications
 there is more than one, how do I tell which one I'm running?  The most
 recent one I downloaded is this:
 Flash Player:
 
Version:10.0.12.36
Last Modified:10/4/08 11:54 PM
Kind:Universal
Get Info String:Adobe Flash Player 10.0 r12 Copyright (c)
 1996-2008 Adobe Macromedia Software LLC. All rights reserved
Location:/Applications/Adobe Flex Builder
 3/Player/mac/10/mac/Flash Player.app
 It doesn't say debug anywhere, but I use the FlexBuilder debugger a
 lot and the debugger works fine, so I'm pretty sure I'm running a debug
 version.  Thanks.
 
 
 --- In flexcoders@yahoogroups.com, Johannes Nel johannes.nel@
 wrote:
 
  just using the debug player should give you that.
 
  On Tue, Aug 4, 2009 at 3:54 PM, mitchgrrt mitch_gart@ wrote:
 
  
  
   I've recently changed companies. At my old company in the Flex app
 we were
   developing, whenever there was an unhandled exception we got a stack
   traceback in a popup window. At my new company I'm not seeing that.
 I see it
   when running inside the debugger, in the console, but not when there
 is no
   debugger.
  
   I'd like to turn on the traceback and see it without the debugger.
 Does
   somebody know how to turn this on? I'm running FlexBuilder 3 on a
 Mac.
   Thanks.
  
  
  
 
 
 
  --
  j:pn
  \\no comment
 
 
 --- In flexcoders@yahoogroups.com, Johannes Nel johannes.nel@
 wrote:
 
  just using the debug player should give you that.
 
  On Tue, Aug 4, 2009 at 3:54 PM, mitchgrrt mitch_gart@ wrote:
 
  
  
   I've recently changed companies. At my old company in the Flex app
 we were
   developing, whenever there was an unhandled exception we got a stack
   traceback in a popup window. At my new company I'm not seeing that.
 I see it
   when running inside the debugger, in the console, but not when there
 is no
   debugger.
  
   I'd like to turn on the traceback and see it without the debugger.
 Does
   somebody know how to turn this on? I'm running FlexBuilder 3 on a
 Mac.
   Thanks.
  
  
  
 
 
 
  --
  j:pn
  \\no comment
 





[flexcoders] Re: how to enable stack traceback?

2009-11-17 Thread mitchgrrt
Thanks, that was really helpful.  I'll bookmark those pages.

Now I see positively that I have the debug Flash player, but I'm still not 
seeing stack tracebacks unless I run in the debugger.  

Any ideas how to set it so I can always see a traceback if there's an unhandled 
exception?  Thanks.


--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 Have you tried
 
 http://www.adobe.com/livedocs/flex/3/langref/flash/system/Capabilities.html#version
 
 or
 
 http://kb2.adobe.com/cps/155/tn_15507.html
 
 or
 
 http://www.playerversion.com/
 
 --- In flexcoders@yahoogroups.com, mitchgrrt mitch_gart@ wrote:
 
  I'm still having this problem.
  
  On the Mac how do I tell what version of the Flash Player I'm running? 
  In
  About This Mac  Software  Applications
  there is more than one, how do I tell which one I'm running?  The most
  recent one I downloaded is this:
  Flash Player:
  
 Version:10.0.12.36
 Last Modified:10/4/08 11:54 PM
 Kind:Universal
 Get Info String:Adobe Flash Player 10.0 r12 Copyright (c)
  1996-2008 Adobe Macromedia Software LLC. All rights reserved
 Location:/Applications/Adobe Flex Builder
  3/Player/mac/10/mac/Flash Player.app
  It doesn't say debug anywhere, but I use the FlexBuilder debugger a
  lot and the debugger works fine, so I'm pretty sure I'm running a debug
  version.  Thanks.
  
  
  --- In flexcoders@yahoogroups.com, Johannes Nel johannes.nel@
  wrote:
  
   just using the debug player should give you that.
  
   On Tue, Aug 4, 2009 at 3:54 PM, mitchgrrt mitch_gart@ wrote:
  
   
   
I've recently changed companies. At my old company in the Flex app
  we were
developing, whenever there was an unhandled exception we got a stack
traceback in a popup window. At my new company I'm not seeing that.
  I see it
when running inside the debugger, in the console, but not when there
  is no
debugger.
   
I'd like to turn on the traceback and see it without the debugger.
  Does
somebody know how to turn this on? I'm running FlexBuilder 3 on a
  Mac.
Thanks.
   
   
   
  
  
  
   --
   j:pn
   \\no comment
  
  
  --- In flexcoders@yahoogroups.com, Johannes Nel johannes.nel@
  wrote:
  
   just using the debug player should give you that.
  
   On Tue, Aug 4, 2009 at 3:54 PM, mitchgrrt mitch_gart@ wrote:
  
   
   
I've recently changed companies. At my old company in the Flex app
  we were
developing, whenever there was an unhandled exception we got a stack
traceback in a popup window. At my new company I'm not seeing that.
  I see it
when running inside the debugger, in the console, but not when there
  is no
debugger.
   
I'd like to turn on the traceback and see it without the debugger.
  Does
somebody know how to turn this on? I'm running FlexBuilder 3 on a
  Mac.
Thanks.
   
   
   
  
  
  
   --
   j:pn
   \\no comment
  
 





[flexcoders] Wonky alignment in mx:htmlText property (Flex 3)

2009-11-17 Thread droponrcll
I think the MXML is more readable for a TextArea if you use the mx:htmlText 
property, but I found that I got a giant left indent on the first line and 
unexpected line breaks in the TextArea (with a giant indent again) when I used 
it, whether I included any markup in the property or not.  If I use the inline 
htmlText attribute, everything works fine.

Why is there a difference, and has anyone found a workaround?  I tried setting 
XML.ignoreWhitespace, XML.prettyIndent, etc., but nothing helped.

Thanks;

Amy



[flexcoders] Re: first tile of tilelist does not show up

2009-11-17 Thread mattgarland2000
Good call. The test image shows up. So it looks like the first image I 
dynamically create is either not available when assigned or incorrectly 
created. Looking into it...

--- In flexcoders@yahoogroups.com, jamesfin james.alan.finni...@... wrote:

 Put this code in and see if an image appears in the first slot.  If so, your 
 image source logic is incorrect.
 
 test.png is a sample image...
 
 [Embed(source=test.png)]
 [Bindable]
 public static var testImage:Class;
 
 override protected function commitProperties():void{
   
 super.commitProperties();
 image.source=testImage;
 
 }
 
 
 
 
 
 --- In flexcoders@yahoogroups.com, mattgarland2000 alias@ wrote:
 
  
  
  Thanks, that makes sense, but it does not work here, unfortunately. I think 
  I might try to defining some states for the renderer and see if using 
  states takes care of this if it is some weird timing/updating issue.
  
  --- In flexcoders@yahoogroups.com, jamesfin james.alan.finnigan@ wrote:
  
   Move the setImage into commitProperties and you should be good to go...
   
   
   override protected function commitProperties():void{
 
   super.commitProperties();
   
   setImage();   
   
   }
   
   
   --- In flexcoders@yahoogroups.com, mattgarland2000 alias@ wrote:
   
I have a component which breaks up a picture into a tilelist. It works 
great, except, the first picture does not show up.

The renderer is a canvas with an image (subclasses add other images). 
It grabs the appropriate image from the parent component. (This image 
is dynamically created from a loaded image). 

Here is the renderer:

override public function set data(value:Object):void
{
_data=value;
invalidateProperties();
dispatchEvent(new 
FlexEvent(FlexEvent.DATA_CHANGE));
}

[Bindable(dataChange)]
override public function get data():Object
{
return _data;
}

[Bindable(dataChange)]
public function get listData():BaseListData
{
return _listData;
}

public function set 
listData(value:BaseListData):void
{
_listData=value;
list=listData.owner as TilePicture;
}

protected function setImage():void
{

image.source=list.imageFromRenderer(this);
}

override protected function 
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
{

super.updateDisplayList(this.unscaledWidth, this.unscaledHeight);
setImage();
}

Things I have tried:

1) in the parent, resetting the dp to force an update
2) forcing an update via dataChange
3) binding the image's source

These don't work. Not sure what to try next. Occasionaly and 
unpredictably, the image will update when 1) in a subclassed renderer, 
a second image is changed. But usually no amount of  interaction will 
make the first tile appear.
   
  
 





[flexcoders] Re: Issues debugging on Windows 7?

2009-11-17 Thread brian.raymes


I have the same problem with Windows Vista and IE 8 (fairly certain it happened 
with IE 7 as well).  Terminating or Terminate/Relaunch leaves behind an 
instance of IE... Lame!

I ended up downloading KillProcess from 
http://www.beyondlogic.org/consulting/processutil/processutil.htm and wrote a 
small bat file to kill all IE instances.  Placed it by my clock on the start 
bar and walla!  I now use it to kill IE in-between flex debugging sessions.

I would really like to know if anyone has a better fix, say, Eclipse actually 
terminating the browser session like it should...



Brian

--- In flexcoders@yahoogroups.com, Rick Schmitty flexc...@... wrote:

 I recently upgraded to windows 7 and the other day I noticed my
 computer running terribly slow.  At first I went to blame win7 but
 after looking at my task manager I had about 100 iexplore.exe
 instances going... Killing them all brought the machine back to
 normal.  I use FF as my browser but I debug with IE since the window
 closes after I stop a debug session, or so I thought.  Watching the
 task manager I launched a debug session and 2 iexpore instances were
 launched.  Terminating the debug session and only 1 of them are
 removed.  I hit debug/terminate a few more times and saw I had that
 many more instances of iexplore running
 
 I tried 'Run as Administrator' but same effect
 
 Using FB3 plugin to Eclipse 3.4.2
 
 Any configuration I am missing?




[flexcoders] Re: how to enable stack traceback?

2009-11-17 Thread valdhor
I don't think you can. As I understand it, the production (ie. non-debug) 
player suppresses errors so users don't see them.

--- In flexcoders@yahoogroups.com, mitchgrrt mitch_g...@... wrote:

 Thanks, that was really helpful.  I'll bookmark those pages.
 
 Now I see positively that I have the debug Flash player, but I'm still not 
 seeing stack tracebacks unless I run in the debugger.  
 
 Any ideas how to set it so I can always see a traceback if there's an 
 unhandled exception?  Thanks.
 
 
 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  Have you tried
  
  http://www.adobe.com/livedocs/flex/3/langref/flash/system/Capabilities.html#version
  
  or
  
  http://kb2.adobe.com/cps/155/tn_15507.html
  
  or
  
  http://www.playerversion.com/
  
  --- In flexcoders@yahoogroups.com, mitchgrrt mitch_gart@ wrote:
  
   I'm still having this problem.
   
   On the Mac how do I tell what version of the Flash Player I'm running? 
   In
   About This Mac  Software  Applications
   there is more than one, how do I tell which one I'm running?  The most
   recent one I downloaded is this:
   Flash Player:
   
  Version:10.0.12.36
  Last Modified:10/4/08 11:54 PM
  Kind:Universal
  Get Info String:Adobe Flash Player 10.0 r12 Copyright (c)
   1996-2008 Adobe Macromedia Software LLC. All rights reserved
  Location:/Applications/Adobe Flex Builder
   3/Player/mac/10/mac/Flash Player.app
   It doesn't say debug anywhere, but I use the FlexBuilder debugger a
   lot and the debugger works fine, so I'm pretty sure I'm running a debug
   version.  Thanks.
   
   
   --- In flexcoders@yahoogroups.com, Johannes Nel johannes.nel@
   wrote:
   
just using the debug player should give you that.
   
On Tue, Aug 4, 2009 at 3:54 PM, mitchgrrt mitch_gart@ wrote:
   


 I've recently changed companies. At my old company in the Flex app
   we were
 developing, whenever there was an unhandled exception we got a stack
 traceback in a popup window. At my new company I'm not seeing that.
   I see it
 when running inside the debugger, in the console, but not when there
   is no
 debugger.

 I'd like to turn on the traceback and see it without the debugger.
   Does
 somebody know how to turn this on? I'm running FlexBuilder 3 on a
   Mac.
 Thanks.



   
   
   
--
j:pn
\\no comment
   
   
   --- In flexcoders@yahoogroups.com, Johannes Nel johannes.nel@
   wrote:
   
just using the debug player should give you that.
   
On Tue, Aug 4, 2009 at 3:54 PM, mitchgrrt mitch_gart@ wrote:
   


 I've recently changed companies. At my old company in the Flex app
   we were
 developing, whenever there was an unhandled exception we got a stack
 traceback in a popup window. At my new company I'm not seeing that.
   I see it
 when running inside the debugger, in the console, but not when there
   is no
 debugger.

 I'd like to turn on the traceback and see it without the debugger.
   Does
 somebody know how to turn this on? I'm running FlexBuilder 3 on a
   Mac.
 Thanks.



   
   
   
--
j:pn
\\no comment
   
  
 





[flexcoders] Re: how to enable stack traceback?

2009-11-17 Thread mitchgrrt
I'm running the debug version of Flash player, sometimes in the debugger
and sometimes not.   It used to be the case that running the debug
version of Flash player, even outside the debugger, there was a stack
trace when there was an unhandled exception.  Has that changed?

--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 I don't think you can. As I understand it, the production (ie.
non-debug) player suppresses errors so users don't see them.

 --- In flexcoders@yahoogroups.com, mitchgrrt mitch_gart@ wrote:
 
  Thanks, that was really helpful.  I'll bookmark those pages.
 
  Now I see positively that I have the debug Flash player, but I'm
still not seeing stack tracebacks unless I run in the debugger.
 
  Any ideas how to set it so I can always see a traceback if there's
an unhandled exception?  Thanks.
 
 
  --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
  
   Have you tried
  
  
http://www.adobe.com/livedocs/flex/3/langref/flash/system/Capabilities.h\
tml#version
  
   or
  
   http://kb2.adobe.com/cps/155/tn_15507.html
  
   or
  
   http://www.playerversion.com/
  
   --- In flexcoders@yahoogroups.com, mitchgrrt mitch_gart@
wrote:
   
I'm still having this problem.
   
On the Mac how do I tell what version of the Flash Player I'm
running?
In
About This Mac  Software  Applications
there is more than one, how do I tell which one I'm running? 
The most
recent one I downloaded is this:
Flash Player:
   
   Version:10.0.12.36
   Last Modified:10/4/08 11:54 PM
   Kind:Universal
   Get Info String:Adobe Flash Player 10.0 r12 Copyright (c)
1996-2008 Adobe Macromedia Software LLC. All rights reserved
   Location:/Applications/Adobe Flex Builder
3/Player/mac/10/mac/Flash Player.app
It doesn't say debug anywhere, but I use the FlexBuilder
debugger a
lot and the debugger works fine, so I'm pretty sure I'm running
a debug
version.  Thanks.
   
   
--- In flexcoders@yahoogroups.com, Johannes Nel johannes.nel@
wrote:

 just using the debug player should give you that.

 On Tue, Aug 4, 2009 at 3:54 PM, mitchgrrt mitch_gart@ wrote:

 
 
  I've recently changed companies. At my old company in the
Flex app
we were
  developing, whenever there was an unhandled exception we got
a stack
  traceback in a popup window. At my new company I'm not
seeing that.
I see it
  when running inside the debugger, in the console, but not
when there
is no
  debugger.
 
  I'd like to turn on the traceback and see it without the
debugger.
Does
  somebody know how to turn this on? I'm running FlexBuilder 3
on a
Mac.
  Thanks.
 
 
 



 --
 j:pn
 \\no comment

   
--- In flexcoders@yahoogroups.com, Johannes Nel johannes.nel@
wrote:

 just using the debug player should give you that.

 On Tue, Aug 4, 2009 at 3:54 PM, mitchgrrt mitch_gart@ wrote:

 
 
  I've recently changed companies. At my old company in the
Flex app
we were
  developing, whenever there was an unhandled exception we got
a stack
  traceback in a popup window. At my new company I'm not
seeing that.
I see it
  when running inside the debugger, in the console, but not
when there
is no
  debugger.
 
  I'd like to turn on the traceback and see it without the
debugger.
Does
  somebody know how to turn this on? I'm running FlexBuilder 3
on a
Mac.
  Thanks.
 
 
 



 --
 j:pn
 \\no comment

   
  
 





RE: [flexcoders] Comparing Dates: ObjectUtil.dateCompare not working

2009-11-17 Thread Keith Reinfeld
You could use new Date(dateStr);  
However, if the date string contains hyphens it will be invalid and fail. 

 
If the hyphens in the date string are not under your control then you can
swap them out for nice valid forward slashes: 
 
var dateStr:String = 2012-11-21 11:11:00; 
dateStr = dateStr.split(-).join(/); 
var doomsDay:Date = new Date(dateStr); 
 

Regards,

 

Keith Reinfeld
Home Page:  http://keithreinfeld.home.comcast.net/
http://keithreinfeld.home.comcast.net

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of powers
Sent: Tuesday, November 17, 2009 1:58 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Comparing Dates: ObjectUtil.dateCompare not
working

 

  


@Keith

What would you recommend to use instead of DateField.stringToDate to parse a
string into a date object so that it doesn't strip off the time portion? 
Date.parse does not correctly parse a date when the string is formatted as
-MM-DD HH:NN:SS.

Keith Reinfeld wrote:
 
 ObjectUtil.dateCompare() function does account for the time portion of the
 supplied dates.
 
 
 
 According to the scenario you describe ObjectUtil.dateCompare() function
 never sees the time portion of date_A nor date_B.
 
 
 
 The DateField.stringToDate() method only evaluates the -MM-DD portion
 of
 the supplied date string and ignores/strips off the time portion of the
 date.
 
 
 
 Regards,
 
 
 
 Keith Reinfeld
 Home Page: http://keithreinfeld.home.comcast.net/
 http://keithreinfeld.home.comcast.net
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ]
On
 Behalf Of powers
 Sent: Monday, November 16, 2009 2:29 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Comparing Dates: ObjectUtil.dateCompare not working
 
 
 
 
 
 
 I'm writing a sort compare function to sort by date. The date format is
 -MM-DD HH:NN:SS. I'm converting the dates, in a string format, to a
 Date objects like so:
 
 DateField.stringToDate(date_A '-MM-DD HH:NN:SS');
 DateField.stringToDate(date_B '-MM-DD HH:NN:SS');
 
 Then comparing the dates like this:
 
 ObjectUtil.dateCompare(date_A, date_B)
 
 It always returns 0 when the date portion of the two date objects are
 equal,
 but the times are different. Does the ObjectUtil.dateCompare function not
 account for the time? 
 
 -- 
 View this message in context:

http://old.nabble.com/Comparing-Dates%3A-ObjectUtil.dateCompare-not-working-
 tp26378917p26378917.html
 Sent from the FlexCoders mailing list archive at Nabble.com.
 
 
 
 No virus found in this incoming message.
 Checked by AVG - www.avg.com
 Version: 8.5.425 / Virus Database: 270.14.67/2506 - Release Date: 11/16/09
 07:43:00
 
 
 
 
 

-- 
View this message in context:
http://old.nabble.com/Comparing-Dates%3A-ObjectUtil.dateCompare-not-working-
tp26378917p26396451.html
Sent from the FlexCoders mailing list archive at Nabble.com.



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.425 / Virus Database: 270.14.68/2507 - Release Date: 11/17/09
07:40:00

image001.jpgimage002.jpg

[flexcoders] Why does flex DateTimeAxis creates duplicate months on the axis?

2009-11-17 Thread kthanrahan

I am working with a Flex DateTimeAxis. I have a scenario where the
DateTimeAxis sometimes creates duplicate months on the Axis. The month
label unit is generated based on a min/max value that is supplied to the
DateTimeAxis, it is NOT generated by the series data as far as I can
tell. In other words, the duplication does not exist within the data
supplied to the chart, but is part of automatic label generation process
that DateTimeAxis will execute when supplying a min/max value for the
axis.

I have included a simplified example of this issue below. Any help is
appreciated.



mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 mx:Script![CDATA[import
mx.collections.ArrayCollection;
 [Bindable] public var
stockDataAC:ArrayCollection = new ArrayCollection( [   
{date: new Date(2009,4), close: 41.71},{date: new
Date(2009,5),close: 42.21},{date: new Date(2009,6),
close: 42.11},{date: new Date(2009,7), close: 42.71},
{date: new Date(2009,9), close: 42.99}]);
[Bindable] private var min:Date = new Date(2009,4);   
[Bindable]  private var max:Date = new Date(2010,3);
private function
formatDate(value:Date,previousValue:Date,axis:DateTimeAxis):String {
var dateLabel:String = df.format(value); return dateLabel;   }
]]/mx:Scriptmx:DateFormatter id=df formatString=MMM
YY/mx:Panel title=DateTimeAxis Example height=100%
width=100%mx:LineChart id=mychart height=100%
width=100%paddingRight=5 paddingLeft=5
showDataTips=true dataProvider={stockDataAC}   
mx:horizontalAxismx:DateTimeAxis dataUnits=months
labelUnits=months alignLabelsToUnits=false
labelFunction=formatDate minimum={min} maximum={max}/   
/mx:horizontalAxis
 mx:verticalAxismx:LinearAxis
baseAtZero=false //mx:verticalAxis
 mx:seriesmx:LineSeries yField=close
xField=date displayName=AAPL//mx:series   
/mx:LineChart/mx:Panel/mx:Application


[flexcoders] Layered ListBase component

2009-11-17 Thread method_air
Hello,

I am looking for a component (presumably extending ListBase) that allows 
objects to be dropped inside of it, and positioned where they are dropped (kind 
of like a stage or root timeline). The depth of the display objects is bound to 
the data provider indexing.

Does such a component exist?

Thanks,

Philip



[flexcoders] Re: Constraining the DragManager

2009-11-17 Thread cuttenv
How would you go about getting the drag cursor? by accessing the cursormanager?

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

 No APIs for doing that with DragManager.  Maybe there is some way to find the 
 dragcursor and move it to where you want it.
 
 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 cuttenv
 Sent: Monday, November 16, 2009 8:04 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Constraining the DragManager
 
 
 
 Is it even possible to constrain the DragManager in flex to vertical movement 
 only?? I have tried just about everything I can think of to no avail. I guess 
 I could use the startDrag() and stopDrag() methods. It just seems like there 
 should be a way. Any ideas?





[flexcoders] global error handling flash player 10/flex 4

2009-11-17 Thread Ariel J
I have started seeing the automatic popup window for ErrorEvents that are 
getting dispatched in my program. I want to suppress the window.

I cannot find an example of the definition of a global error handler for a Flex 
app. Can anyone help me out?



[flexcoders] Re: Issues debugging on Windows 7?

2009-11-17 Thread mike_morearty
I think you are running into this issue: 
http://bugs.adobe.com/jira/browse/FB-22107

This was caused by a change made by Microsoft in Internet Explorer 8.  Flex 
Builder and Flash Builder launch their own instance of iexplore.exe, and when 
you click Terminate, they kill that process.  The problem is that as of IE8, 
when we launch iexplore.exe, the new iexplore.exe checks to see if there is 
already another instance of iexplore.exe.  If it finds one, it sends a message 
to the existing instance saying open this URL, and then the new instance 
terminates.

Flex Builder doesn't know that all this stuff is happening, so it tries to 
terminate the new process, but the new process is already gone.

I have fixed this in Flash Builder 4.  The fix was to launch Internet Explorer 
with the -noframemerging option, which tells it to open the URL in the new 
process rather than delegating to an existing process.

If you are on Flex Builder 3, I'm not quite sure how you would be able to work 
around this, other than the way you already found.

Hope that helps.

- Mike Morearty, Flash Builder team



--- In flexcoders@yahoogroups.com, brian.raymes brian.ray...@... wrote:

 
 
 I have the same problem with Windows Vista and IE 8 (fairly certain it 
 happened with IE 7 as well).  Terminating or Terminate/Relaunch leaves behind 
 an instance of IE... Lame!
 
 I ended up downloading KillProcess from 
 http://www.beyondlogic.org/consulting/processutil/processutil.htm and wrote a 
 small bat file to kill all IE instances.  Placed it by my clock on the start 
 bar and walla!  I now use it to kill IE in-between flex debugging sessions.
 
 I would really like to know if anyone has a better fix, say, Eclipse actually 
 terminating the browser session like it should...
 
 
 
 Brian
 
 --- In flexcoders@yahoogroups.com, Rick Schmitty flexcode@ wrote:
 
  I recently upgraded to windows 7 and the other day I noticed my
  computer running terribly slow.  At first I went to blame win7 but
  after looking at my task manager I had about 100 iexplore.exe
  instances going... Killing them all brought the machine back to
  normal.  I use FF as my browser but I debug with IE since the window
  closes after I stop a debug session, or so I thought.  Watching the
  task manager I launched a debug session and 2 iexpore instances were
  launched.  Terminating the debug session and only 1 of them are
  removed.  I hit debug/terminate a few more times and saw I had that
  many more instances of iexplore running
  
  I tried 'Run as Administrator' but same effect
  
  Using FB3 plugin to Eclipse 3.4.2
  
  Any configuration I am missing?
 





[flexcoders] Re: Plotting lots of data on a line chart

2009-11-17 Thread napearson99
Bump.  Any ideas?  This is possible, right?

--- In flexcoders@yahoogroups.com, napearson99 napearso...@... wrote:

 I have a dataset of about 10,000 points.  I want to plot the data in a line 
 chart.  I don't need every single item to be plotted, i just need to shape of 
 the data show up.
 
 I thought I'd done something like this before...but when I hooked it up 
 earlier today it went really slow.
 
 Any thoughts?





Re: [flexcoders] Layered ListBase component

2009-11-17 Thread Jeffry Houser


I guess I don't understand the request.

Don't most list based classes allow you to drag and drop items in them 
and then position those items where they were dropped? 

When you say depth, I'm unclear what you are referring to. 


method_air wrote:
 


Hello,

I am looking for a component (presumably extending ListBase) that 
allows objects to be dropped inside of it, and positioned where they 
are dropped (kind of like a stage or root timeline). The depth of the 
display objects is bound to the data provider indexing.


Does such a component exist?

Thanks,

Philip




--
Jeffry Houser, Technical Entrepreneur
Adobe Community Expert: http://tinyurl.com/684b5h
http://www.twitter.com/reboog711  | Phone: 203-379-0773
--
Easy to use Interface Components for Flex Developers
http://www.flextras.com?c=104
--
http://www.theflexshow.com
http://www.jeffryhouser.com
--
Part of the DotComIt Brain Trust



Re: [flexcoders] Passing an object to a rendererProvider

2009-11-17 Thread Jeffry Houser


What component are you using? 

Most list based classes have a ListData property passed into 
itemRenderers.  You can extend ListData to contain your custom data, and 
extend the List class to use your new ListData class with new data. 
You could also pass in the relevant data as part of your itemRenderer's 
data object. 


InvertedSpear wrote:
 



So I need to pass additional information (an object like an associative
array) to my renderer provider which is stored nicely in a component, 
but I
can't access any variables in my parent application from the 
component, only
children. As a work around, I parsed the object variable to text, put 
it in

an invisible mx:Text control, and parsed it back into an object in my
component.

I feel like a hack because I know this is horribly inefficient and 
there has

to be a better way, but I couldn't come up with one.

Thoughts anyone?

~Mike

PS, I did this because I'm using a summary row in an advancedDataGrid to
divide it into sections, but I don't want to sort by the lable of each
section (which seems to be the default) but by an ID. My solution was to
pass it the ID which will sort it correctly then pull the correct 
lable text
out of my object with that ID. It works perfectly like it is but does 
anyone

know the Right way to do this?
--
View this message in context: 
http://old.nabble.com/Passing-an-object-to-a-rendererProvider-tp26396466p26396466.html 
http://old.nabble.com/Passing-an-object-to-a-rendererProvider-tp26396466p26396466.html

Sent from the FlexCoders mailing list archive at Nabble.com.




--
Jeffry Houser, Technical Entrepreneur
Adobe Community Expert: http://tinyurl.com/684b5h
http://www.twitter.com/reboog711  | Phone: 203-379-0773
--
Easy to use Interface Components for Flex Developers
http://www.flextras.com?c=104
--
http://www.theflexshow.com
http://www.jeffryhouser.com
--
Part of the DotComIt Brain Trust



Re: [flexcoders] global error handling flash player 10/flex 4

2009-11-17 Thread Jeffry Houser


Global Error Handling was introduced in the Flash Player 10.1 (which 
went into public beta today, I think).  I doubt it is integrated into 
the Flex 4 SDK yet. 


Ariel J wrote:
 

I have started seeing the automatic popup window for ErrorEvents that 
are getting dispatched in my program. I want to suppress the window.


I cannot find an example of the definition of a global error handler 
for a Flex app. Can anyone help me out?





--
Jeffry Houser, Technical Entrepreneur
Adobe Community Expert: http://tinyurl.com/684b5h
http://www.twitter.com/reboog711  | Phone: 203-379-0773
--
Easy to use Interface Components for Flex Developers
http://www.flextras.com?c=104
--
http://www.theflexshow.com
http://www.jeffryhouser.com
--
Part of the DotComIt Brain Trust



RE: [flexcoders] Re: Constraining the DragManager

2009-11-17 Thread Alex Harui
No, I would go to systemManager.cursorChildren.  There should be one child and 
moving it or its child (which should be the actual cursor) should be what you 
want to do.

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 cuttenv
Sent: Tuesday, November 17, 2009 4:15 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Constraining the DragManager



How would you go about getting the drag cursor? by accessing the cursormanager?

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

 No APIs for doing that with DragManager. Maybe there is some way to find the 
 dragcursor and move it to where you want it.

 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 cuttenv
 Sent: Monday, November 16, 2009 8:04 PM
 To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
 Subject: [flexcoders] Constraining the DragManager



 Is it even possible to constrain the DragManager in flex to vertical movement 
 only?? I have tried just about everything I can think of to no avail. I guess 
 I could use the startDrag() and stopDrag() methods. It just seems like there 
 should be a way. Any ideas?




RE: [flexcoders] Re: how to enable stack traceback?

2009-11-17 Thread Alex Harui
In Adobe terminology, you are running a debugger player and have or have not 
launched it in a debugger.  The main player you get from the Adobe site is a 
release player.  A debug player is internal to Adobe and there is a 
release-debug version build and a debugger-debug build that we use to track 
down nasty bugs in the player.

Only the debugger player will show the dialog when there is an unhandled 
exception.  The release player will stop the current code execution and wait 
for the next event.

Unless something recently changed, I believe if you catch an error and trace 
out getStackTrace(), the release player will not show a stacktrace as ti 
doesn't take the time to track that information.

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 mitchgrrt
Sent: Tuesday, November 17, 2009 2:05 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: how to enable stack traceback?



I'm running the debug version of Flash player, sometimes in the debugger
and sometimes not. It used to be the case that running the debug
version of Flash player, even outside the debugger, there was a stack
trace when there was an unhandled exception. Has that changed?

--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
valdhor valdhorli...@... wrote:

 I don't think you can. As I understand it, the production (ie.
non-debug) player suppresses errors so users don't see them.

 --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
 mitchgrrt mitch_gart@ wrote:
 
  Thanks, that was really helpful. I'll bookmark those pages.
 
  Now I see positively that I have the debug Flash player, but I'm
still not seeing stack tracebacks unless I run in the debugger.
 
  Any ideas how to set it so I can always see a traceback if there's
an unhandled exception? Thanks.
 
 
  --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
  valdhor valdhorlists@ wrote:
  
   Have you tried
  
  
http://www.adobe.com/livedocs/flex/3/langref/flash/system/Capabilities.h\
tml#versionhttp://www.adobe.com/livedocs/flex/3/langref/flash/system/Capabilities.html#version
  
   or
  
   http://kb2.adobe.com/cps/155/tn_15507.html
  
   or
  
   http://www.playerversion.com/
  
   --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
   mitchgrrt mitch_gart@
wrote:
   
I'm still having this problem.
   
On the Mac how do I tell what version of the Flash Player I'm
running?
In
About This Mac  Software  Applications
there is more than one, how do I tell which one I'm running?
The most
recent one I downloaded is this:
Flash Player:
   
Version: 10.0.12.36
Last Modified: 10/4/08 11:54 PM
Kind: Universal
Get Info String: Adobe Flash Player 10.0 r12 Copyright (c)
1996-2008 Adobe Macromedia Software LLC. All rights reserved
Location: /Applications/Adobe Flex Builder
3/Player/mac/10/mac/Flash Player.app
It doesn't say debug anywhere, but I use the FlexBuilder
debugger a
lot and the debugger works fine, so I'm pretty sure I'm running
a debug
version. Thanks.
   
   
--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
Johannes Nel johannes.nel@
wrote:

 just using the debug player should give you that.

 On Tue, Aug 4, 2009 at 3:54 PM, mitchgrrt mitch_gart@ wrote:

 
 
  I've recently changed companies. At my old company in the
Flex app
we were
  developing, whenever there was an unhandled exception we got
a stack
  traceback in a popup window. At my new company I'm not
seeing that.
I see it
  when running inside the debugger, in the console, but not
when there
is no
  debugger.
 
  I'd like to turn on the traceback and see it without the
debugger.
Does
  somebody know how to turn this on? I'm running FlexBuilder 3
on a
Mac.
  Thanks.
 
 
 



 --
 j:pn
 \\no comment

   
--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
Johannes Nel johannes.nel@
wrote:

 just using the debug player should give you that.

 On Tue, Aug 4, 2009 at 3:54 PM, mitchgrrt mitch_gart@ wrote:

 
 
  I've recently changed companies. At my old company in the
Flex app
we were
  developing, whenever there was an unhandled exception we got
a stack
  traceback in a popup window. At my new company I'm not
seeing that.
I see it
  when running inside the debugger, in the console, but not
when there
is no
  debugger.
 
  I'd like to turn on the traceback and see it without the
debugger.
Does
  somebody know how to turn this on? I'm running FlexBuilder 3
on a
Mac.
  Thanks.
 
 
 



 --
 j:pn
 \\no comment

   
  
 




RE: [flexcoders] first tile of tilelist does not show up

2009-11-17 Thread Alex Harui
Have you set columnWIdth/rowHeight explicitly?  I wouldn't let the TileList 
measure the renderer and decide for itself.

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 mattgarland2000
Sent: Tuesday, November 17, 2009 11:13 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] first tile of tilelist does not show up



I have a component which breaks up a picture into a tilelist. It works great, 
except, the first picture does not show up.

The renderer is a canvas with an image (subclasses add other images). It grabs 
the appropriate image from the parent component. (This image is dynamically 
created from a loaded image).

Here is the renderer:

override public function set data(value:Object):void
{
_data=value;
invalidateProperties();
dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
}

[Bindable(dataChange)]
override public function get data():Object
{
return _data;
}

[Bindable(dataChange)]
public function get listData():BaseListData
{
return _listData;
}

public function set listData(value:BaseListData):void
{
_listData=value;
list=listData.owner as TilePicture;
}

protected function setImage():void
{
image.source=list.imageFromRenderer(this);
}

override protected function updateDisplayList(unscaledWidth:Number, 
unscaledHeight:Number):void
{
super.updateDisplayList(this.unscaledWidth, this.unscaledHeight);
setImage();
}

Things I have tried:

1) in the parent, resetting the dp to force an update
2) forcing an update via dataChange
3) binding the image's source

These don't work. Not sure what to try next. Occasionaly and unpredictably, the 
image will update when 1) in a subclassed renderer, a second image is changed. 
But usually no amount of interaction will make the first tile appear.



[flexcoders] Adobe AIR 2.0 up on Labs!

2009-11-17 Thread Charles Parcell
I saw someone else post about AIR 2.0 and Flash Player 10.1 (not 10.2) on
Labs. Here are a number of useful links to AIR 2.0 information. Plus I
wanted to take this opportunity to again invite all Flash/Flex developers
interested in Adobe AIR to going the AIR-Tight Google Group.

AIR-Tight Links
-
You can join in one of two ways.

   1. Send e-mail to air-tight+subscr...@googlegroups.com with the Subject
   of Subscribe. Gmail account *not* required when using this option.
   2. Visit the group page at
http://groups.google.com/group/air-tight?hl=enand join there.


Group information -
http://groups.google.com/group/air-tight/web/rules-and-information


AIR 2.0 Links
-

Adobe AIR 2 beta on Labs
http://labs.adobe.com/technologies/air2/

Adobe AIR Team Blog: Adobe AIR 2 Beta Now Available
http://blogs.adobe.com/air/2009/11/adobe_air_2_beta_now_available.html

Adobe AIR 2 Beta Release Notes on Labs
http://labs.adobe.com/wiki/index.php/AIR_2:Release_Notes#Overview

Adobe AIR 2 Beta Developer FAQ
http://www.adobe.com/go/air2_faq

Adobe AIR 2 Beta Sample Applications
http://labs.adobe.com/technologies/air2/samples/

Charles P.





-


Re: [flexcoders] Re: Flash Builder 4 for Linux

2009-11-17 Thread primo411
I used Eclipse 3.5 SR1 32 bits (the Java EE version). I did not follow the
instructions, I just pasted/merged the contents of the fb4linux eclipse
folder in the eclipse installation folder.

2009/11/18 Kelly dek...@gmail.com



 Which version of Eclipse did you install it on?

 I tried 3.3, 3.4, and 3.5

 3.3 was the only one that had the install options similar to the
 instructions on the download site but during install it said it needed 3.4

 3.4 and 3.5 don't have the same options for installing and everything I
 have tried doesn't work.



 Thanks
 --Kelly






 primo411 wrote:



 I tested it and it works great ! I'm curious too, how did you achieve this
 ? Did you patch a lot of jars ?

  2009/11/17 pcassi...@ymail.com pcassi...@ymail.com



 How do you do it? Could you tell me? How about the performance issues?


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, feiy
 eshang...@... wrote:
 
  hi,
  i had ported the flash builder 4 to linux,more info:
  http://code.google.com/p/fb4linux/
   ÏÐÔÆ¹Âº× - ÇåÀäÏãÖб§Ï¥Ò÷