[flexcoders] DYNAMIC actionscript child layout.

2009-02-15 Thread sailorsea21
Hi everyone, when I create my layout with mxml components, my layout is 
dynamic. If I resize my browser window, my components are also resized.
How can I achieve this in actionscript using addChild???

var Layout:Canvas = new Canvas();
graphLayout.width=testlayout.width/2;
graphLayout.height=testlayout.width/2;
layout_graphs.addChild(graphLayout);

testlayout is my vbox that will be parent to the canvas.

Thanks.



[flexcoders] Re: Help Me for SharedObject and registerClassAlias method

2009-02-15 Thread valdhor
I don't think you can do that. A SharedObject is just an object. What
you would need to do is put the WindowInfo objects you want to store
into an array and store the array in the SharedObject. When you want
to retrieve the WindowInfo objects, read them into an array and coerce
each array item into a WindowInfo object.


--- In flexcoders@yahoogroups.com, thelordsince1984 lore...@... wrote:

 Hi,
 
 i've yet posted this question but i can't resolve this problem..
 
 i've created a custom value object class..a simple class with private
 properties and getters methods to retrieve them.
 
 public class WindowInfo
   {   
   
   private var _id:String;
   
   private var _module:String
   
   private var _xpos:int;
   
   private var _ypos:int;
   
   private var _width:int;
   
   private var _height:int;
   
   public function WindowInfo(id:String, module:String, xpos:int,
 ypos:int, width:int, height:int)
   {
   this._id = id;
   this._module = module;
   this._xpos = xpos;
   this._ypos = ypos;
   this._width = width;
   this._height = height;
   }
   
   public function get id():String {
   return _id;
   }
   
   public function get module():String {
   return _module;
   }
   
   public function get xpos():int {
   return _xpos;
   }
   
   public function get ypos():int {
   return _ypos;
   }
   
   public function get width():int {
   return _width;
   }
   
   public function get height():int {
   return _height;
   }
   }
 
 then i created an array collection where each item is an istance of
 value object.
 then i have a shared object manager that looks like this:
 
 package util{
 
 import flash.net.SharedObject;
 
 import mx.collections.ArrayCollection;
 
 public class SharedObjectApplicationManager {
 
 private var mySO:SharedObject;
 private var ac:ArrayCollection;
 private var lsoType:String;
 
 public function SharedObjectApplicationManager(s:String) {
 init(s);
 }
 
 private function init(s:String):void {
 mySO = SharedObject.getLocal(s);
 if (getf()) {
 getf();
 }
 }
 
 public function getf():ArrayCollection {
 return mySO.data.arrayc;
 }
 
 private function adda(array:ArrayCollection):void {
 mySO.data.arrayc = new ArrayCollection();
 mySO.data.arrayc = array;
 mySO.flush();
 }
 }
 }
 
 so when i try to get arraycollection with getf method i get an
 arraycollection of generic objects…not with windowinfo objects..in
 this manner i can't get value properties of value object class.
 
 so i would use registerClassAlias(Info, WindowInfo) where WindowInfo
 is the VO..but where?
 
 the architecture of my app is:
 
 -main application (verify the shared object, if full then call a
 public function of canvas to create windows with specific parameters
 saved in windowinfo class)
 –canvas (contains one or more windows)
 
 any suggestions?
 
 Thanks in advance
 
 Regards Lorenzo





[flexcoders] help with datagrid cell custom itemrenderer

2009-02-15 Thread sbeausol
Hi-

I've been able to implement a custom Text Color Item Renderer for a
datagrid based off of this post Custom item renderer
http://blogs.adobe.com/aharui/2007/03/thinking_about_item_renderers_1.h\
tml  .  I've added 2 classes, a ComputedStylesColumn and
ComputedStylesRenderer and I can successfully implement this in the mxml
file, but I was hoping to build my datagrids dynamically with
actionscript.

the mxml that works:
mx:DataGrid id=dg1 initialize=dg1.dataProvider = dp paddingTop=0
paddingBottom=0 verticalAlign=middle 
mx:columns
mx:DataGridColumn headerText=Name dataField=name width=140/
mx:DataGridColumn headerText=Symbol dataField=symbol width=60 /
local:ComputedStylesColumn headerText=Price dataField=price
  stylesFunction=computeStyles
itemRenderer=ComputedStylesRenderer /
/mx:columns
/mx:DataGrid

I've been able to reconstruct most things in actionscript except for the
itemRenderer=ComputedStylesRenderer.

when I try this:
var custColumn1:ComputedStylesColumn = new ComputedStylesColumn();
custColumn1.dataField = price;
custColumn1.headerText = Price;
custColumn1.width = 75;
custColumn1.stylesFunction = computeStyles;

Everything works except:

custColumn1.itemRenderer = ComputedStylesRenderer();
Implicit coercion of a value of type ComputedStylesRenderer to an
unrelated type mx.core:IFactory




[flexcoders] Re: Override drawHighlightIndicator

2009-02-15 Thread Brad Keck
--- In flexcoders@yahoogroups.com, Brad Keck bradley_k...@... 
wrote:

 I am having a weird problem.  I have created a custom list class in 
 order to customize the highlight behavior of the list.  Everything 
 seems to be working great EXCEPT when I use the *mouse wheel* to 
 scroll, my highlighting gets off.  (The wrong item in the list is 
 highlighted as I roll over items.)
 
 Any ideas of what might be going on here?
 
 
 
 
 Here is my code:
 
 override protected function drawHighlightIndicator
(indicator:Sprite, 
 x:Number, y:Number, width:Number, height:Number, color:uint, 
 itemRenderer:IListItemRenderer):void
 {
 var g:Graphics = Sprite(indicator).graphics;
 g.clear();
 g.beginFill(color);
 g.drawRoundRect(x,y+8,width-10,height-16,20,20);
 g.endFill();
 }
 
 
 And for comparison, here is the code in listBase.as:
 
 protected function drawHighlightIndicator(indicator:Sprite, 
x:Number, 
 y:Number, width:Number, height:Number, 
 color:uint, itemRenderer:IListItemRenderer):void
 {
 var g:Graphics = Sprite(indicator).graphics;
 g.clear();
 g.beginFill(color);
 g.drawRect(0, 0, width, height);
 g.endFill();
 
 indicator.x = x;  (I have tried adding these lines in,
 indicator.y = y;   but they just screw things up bad.)
 }


In case anybody ever stumbles on something similar, I figured out the 
problem.  I needed to match the overridden function more closely.  
Here was my final code that worked correctly:

override protected function drawHighlightIndicator(indicator:Sprite, 
x:Number, y:Number, width:Number, height:Number, color:uint, 
itemRenderer:IListItemRenderer):void
{   
var g:Graphics = Sprite(indicator).graphics;
g.clear();
g.beginFill(color);
g.drawRoundRect(0,0,width-10,height-16,20,20);
g.endFill();

indicator.x = x;
indicator.y = y+8;
}



[flexcoders] Re: Air application and local hardware

2009-02-15 Thread valdhor
AFAIK Merapi just uses AMF to pass objects.

If you don't want to develop in Java, you would need to develop a
bridge API in your language of choice. Start with
http://opensource.adobe.com/wiki/download/attachments/1114283/amf3_spec_05_05_08.pdf



--- In flexcoders@yahoogroups.com, markgoldin_2000
markgoldin_2...@... wrote:

 I have checked it out.
 Unfortunately I am not developing in Java.
 
 --- In flexcoders@yahoogroups.com, Ryan Graham Ryan.Graham@ 
 wrote:
 
  
  Nate B has mentioned before that the Merapi project is aimed at
  providing this functionality:
  
   
  
  http://www.merapiproject.net/
  
   
  
  HTH,
  
  Ryan
  
   
  
  From: flexcoders@yahoogroups.com 
 [mailto:flexcod...@yahoogroups.com] On
  Behalf Of markgoldin_2000
  Sent: Friday, February 13, 2009 9:33 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Air application and local hardware
  
   
  
  Can an AIR application access a serial port? Can an AIR 
 application 
  read/get data from a scanner attached to a serial port?
  
  Thanks
  
  
  
  
  
  This message is private and confidential. If you have received 
 it in error, please notify the sender and remove it from your 
 system.
 





[flexcoders] Re: help with datagrid cell custom itemrenderer

2009-02-15 Thread valdhor
dataGridColumn.itemRenderer = new ClassFactory(customItemRanderer); 

In your case:

custColumn1.itemRenderer = new ClassFactory(ComputedStylesRenderer);


--- In flexcoders@yahoogroups.com, sbeausol sbeausol...@... wrote:

 Hi-
 
 I've been able to implement a custom Text Color Item Renderer for a
 datagrid based off of this post Custom item renderer

http://blogs.adobe.com/aharui/2007/03/thinking_about_item_renderers_1.h\
 tml  .  I've added 2 classes, a ComputedStylesColumn and
 ComputedStylesRenderer and I can successfully implement this in the mxml
 file, but I was hoping to build my datagrids dynamically with
 actionscript.
 
 the mxml that works:
 mx:DataGrid id=dg1 initialize=dg1.dataProvider = dp paddingTop=0
 paddingBottom=0 verticalAlign=middle 
 mx:columns
 mx:DataGridColumn headerText=Name dataField=name width=140/
 mx:DataGridColumn headerText=Symbol dataField=symbol width=60 /
 local:ComputedStylesColumn headerText=Price dataField=price
   stylesFunction=computeStyles
 itemRenderer=ComputedStylesRenderer /
 /mx:columns
 /mx:DataGrid
 
 I've been able to reconstruct most things in actionscript except for the
 itemRenderer=ComputedStylesRenderer.
 
 when I try this:
 var custColumn1:ComputedStylesColumn = new ComputedStylesColumn();
 custColumn1.dataField = price;
 custColumn1.headerText = Price;
 custColumn1.width = 75;
 custColumn1.stylesFunction = computeStyles;
 
 Everything works except:
 
 custColumn1.itemRenderer = ComputedStylesRenderer();
 Implicit coercion of a value of type ComputedStylesRenderer to an
 unrelated type mx.core:IFactory





[flexcoders] Re: Socket communications in Flex

2009-02-15 Thread markgoldin_2000
I was able to create a server socket using VB code. I am sending 
data from a Flex test application to my server socket but cannot 
send any data to Flex. Any idea?

--- In flexcoders@yahoogroups.com, Guy Morton g...@... wrote:

 As Tracy said, yes. A socket is just a network connection. Your 
flex  
 XMLSocket doesn't know or care what language the program 
listening on  
 the other was written in. A socket connection is like a call 
connected  
 between two telephones - if no-one at either end talks or 
neither end  
 understands the other nothing much will happen. It's up to you 
to make  
 conversation by defining how you will pass messages back and 
forth and  
 how you will process them at either end.
 
 
 On 15/02/2009, at 3:41 AM, markgoldin_2000 wrote:
 
  I am not sure myself about my question :).
  First, can Flex be listening to a socket that is created within
  any program? I mean, if a vb program creates a socket using
  Winsock will Flex be able to listen to such socket?
  Second, if yes, how would data actually be transfered?
 
  Thanks
 
  --- In flexcoders@yahoogroups.com, Guy Morton guy@ wrote:
  
   Well...nothing would, normally. You'd have to set up a 
server to
  talk
   to you on that socket, develop a protocol for conversing over
  the
   socket, etc.
  
   An XML socket is just a pipe to communicate over. Unlike 
normal
  http
   requests which encapsulate the http conversation so you don't
  see it,
   a raw XML socket requires you to define what messages are 
going
  to be
   sent by whom and what those messages mean.
  
   Does that help, or have I misunderstood your question?
  
   Guy
  
  
   On 14/02/2009, at 10:50 PM, markgoldin_2000 wrote:
  
I am trying to understand how socket communications work in
  flex.
This code will connect to a port 8080 on a local computer:
   
var xmlsock:XMLSocket = new XMLSocket();
xmlsock.connect(127.0.0.1, 8080);
   
But what I dont understand is what would be sending data to
  that
port?
   
Thanks
   
   
   
  
 
 
 





[flexcoders] Arrow on Multiple Column's Header in Flex2 DataGrid

2009-02-15 Thread Dharmendra Chauhan
Hi All,
  I have to show Sorting arrows(Up  Down) on DataGrid(Hotfix2)
Header for more than one Column.I want to show arrow based on
underlying dataProvider Sorting ie if arrayCollection was sorted based
on two column then two respective column in DG should show arrow on
Header. Please do share your ideas on how to do it.
Please share the code if someone have already done it.

Any help would be highly appreciated.
 
Thanks,
Dharmendra Chouhan



[flexcoders] Dictionary memory leak

2009-02-15 Thread Gregor Kiddie
Anyone know if this has been fixed?

 

There was a reported memory leak a while back (at least in my memory ;)
) and I'm trying to work out if it's safe to use Dictionarys again...

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk
blocked::http://www.inps.co.uk/ 

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact is.helpd...@inps.co.uk

 



[flexcoders] Showing grid in line series graph

2009-02-15 Thread Vik
Hie
I have a line series graph. Doing a showAlldataTip gives a bad look to my
graph.
So i just want to show grid lines in the graph.

is it possible? how?

Thankx and Regards

Vik
Founder
www.sakshum.com
www.sakshum.blogspot.com


[flexcoders] Re: Showing grid in line series graph

2009-02-15 Thread EddieBerman
Easy. Here are some links that should help:

http://blog.flexexamples.com/2007/11/15/displaying-grid-lines-in-a-
flex-linechart-control/

http://livedocs.adobe.com/flex/3/langref/mx/charts/GridLines.html

-Eddie
www.edberman.com

--- In flexcoders@yahoogroups.com, Vik vik@... wrote:

 Hie
 I have a line series graph. Doing a showAlldataTip gives a bad look 
to my
 graph.
 So i just want to show grid lines in the graph.
 
 is it possible? how?
 
 Thankx and Regards
 
 Vik
 Founder
 www.sakshum.com
 www.sakshum.blogspot.com





[flexcoders] Re: Socket communications in Flex

2009-02-15 Thread markgoldin_2000
Link is not working for me.
--- In flexcoders@yahoogroups.com, Weyert de Boer w...@... wrote:

 Have a look at: http://www.innerfuse.biz/dropbox/WebDU 2007 
Leveraging 
 Apollo Runtime.zip
 
 Shows how you can make a socket server in Ruby and talk with a 
Bluetooth 
 GPS device.





Re: [flexcoders] Re: Showing grid in line series graph

2009-02-15 Thread Vik
Hie
That worked thankx.. but the grid lines are very light. almost hard to see..

how to make them look a bit bold?

Thankx and Regards

Vik
Founder
www.sakshum.com
www.sakshum.blogspot.com


On Sun, Feb 15, 2009 at 11:49 PM, EddieBerman
eddieberman2...@hotmail.comwrote:

   Easy. Here are some links that should help:

 http://blog.flexexamples.com/2007/11/15/displaying-grid-lines-in-a-
 flex-linechart-control/

 http://livedocs.adobe.com/flex/3/langref/mx/charts/GridLines.html

 -Eddie
 www.edberman.com


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Vik
 vik@... wrote:
 
  Hie
  I have a line series graph. Doing a showAlldataTip gives a bad look
 to my
  graph.
  So i just want to show grid lines in the graph.
 
  is it possible? how?
 
  Thankx and Regards
 
  Vik
  Founder
  www.sakshum.com
  www.sakshum.blogspot.com
 

  



Re[flexcoders] moteObject help

2009-02-15 Thread Sceneshift

I'm trying to create a RemoteObject singleton class which I can reference
throughout my project, and make simple calls to the serverside code using
WebOrb. 

The singleton extends RemoteObject, but I am having trouble passing
arguments across. I'd like to be able to call the RemoteObject class like
so:

var _rm:RemotingManager = RemotingManager.getInstance();
_rm.addEventListener(ResultEvent.RESULT, onGetPage, false, 0, true);
_rm.call(destination, method, arguments); 

My question is simple, or at least I hope it is... is there a away to pass
arguments to the RemoteObject class which are NOT typed as Array? The
RemoteObject.arguments property expects an object, but if I pass it an
object Charles is reporting a null response which is really strange.

How can I improve my singleton to make it a little bit more flexible when
working with arguments like this?


-- 
View this message in context: 
http://www.nabble.com/RemoteObject-help-tp22026297p22026297.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Re: Dragging an image out of a tilelist

2009-02-15 Thread lanekelly5
Here's the mouseOverHandler function that is throwing the type 
conversion error.  It's basically copied from the docs 
example Specifying the drag proxy. Not sure how to reference the 
image portion of the TileList element so that I'm not converting 
TileList to Image...

private function mouseOverHandler(event:MouseEvent):void 
{  
var dragInitiator:Image=Image(event.currentTarget);
var ds:DragSource = new DragSource();
ds.addData(dragInitiator, img);   

// The drag manager uses the Image control 
// as the drag proxy and sets the alpha to 1.0 
(opaque),
// so it appears to be dragged across the Canvas.
var imageProxy:Image = new Image();
imageProxy.source = event.currentTarget;
imageProxy.height=15;
imageProxy.width=15;
DragManager.doDrag(dragInitiator, ds, event, 
imageProxy, -15, -15, 1.00);

}

--- In flexcoders@yahoogroups.com, lanekelly5 lkel...@... wrote:

 First post to the group.  Glad I found this as a resource...
 
 
 I have a TileList control with cells that contain an image and a 
 label. See the itemRenderer code:
 
 Code:
 mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml;
 horizontalAlign=center
 verticalAlign=middle
 
 mx:Image source={da...@thumbnailimage} width=75 
height=50/
 
 mx:Label text={da...@title} /
 
 /mx:HBox
 What I want to do is give the user the ability to drag just the 
image 
 portion of the cell onto a different canvas. Here's where I am so 
far 
 on the TileList code:
 
 Code:
 mx:TileList id=myVidTilelist
   dataProvider={xmlListColl}
 itemRenderer=CustomItemRenderer  
 columnCount=1
   columnWidth=180
   rowCount=6
   verticalScrollPolicy=on
   dragEnabled=true 
   mouseMove=mouseOverHandler(event);
 /
 Not sure if I should be using mouseMove to start the drag or some 
 other event. But in the handler, I'm unsure of how to reference the 
 image inside the cell of the TileList. I want to show that as the 
 dragProxy (I think that's the correct term) and also resize it so 
it 
 isn't the thumbnail size shown in the TileList.  I don't want the 
 label to be part of the dragged item (it should just disappear).
 
 Any thoughts would be greatly appreciated. If I need to provide 
more 
 code to make this question more clear, please let me know.
 
 Thanks.





[flexcoders] Detect keyboard layout in AIR or Flex ?

2009-02-15 Thread Adnan Doric
Hello,

Capabilities.language returns the language, that's great but...

Is it possible with AIR to look into OS (Windows, linux or MacOS) and
retrieve the actual keyboard layout (qwerty, azerty atc.) ?

TIA :)



[flexcoders] Re: Socket communications in Flex

2009-02-15 Thread valdhor
Copy and paste (Including the spaces)

--- In flexcoders@yahoogroups.com, markgoldin_2000
markgoldin_2...@... wrote:

 Link is not working for me.
 --- In flexcoders@yahoogroups.com, Weyert de Boer wdb@ wrote:
 
  Have a look at: http://www.innerfuse.biz/dropbox/WebDU 2007 
 Leveraging 
  Apollo Runtime.zip
  
  Shows how you can make a socket server in Ruby and talk with a 
 Bluetooth 
  GPS device.
 





Re: [flexcoders] Re: Socket communications in Flex

2009-02-15 Thread Guy Morton
Firewall? Is the port you're using open? Is the data event firing at  
all? If so, what's in it? If not, either your server is not serving  
data like you think it is, or the data can't get to your flex app  
because there's something in the way.



On 16/02/2009, at 3:50 AM, markgoldin_2000 wrote:


I was able to create a server socket using VB code. I am sending
data from a Flex test application to my server socket but cannot
send any data to Flex. Any idea?

--- In flexcoders@yahoogroups.com, Guy Morton g...@... wrote:

 As Tracy said, yes. A socket is just a network connection. Your
flex
 XMLSocket doesn't know or care what language the program
listening on
 the other was written in. A socket connection is like a call
connected
 between two telephones - if no-one at either end talks or
neither end
 understands the other nothing much will happen. It's up to you
to make
 conversation by defining how you will pass messages back and
forth and
 how you will process them at either end.


 On 15/02/2009, at 3:41 AM, markgoldin_2000 wrote:

  I am not sure myself about my question :).
  First, can Flex be listening to a socket that is created within
  any program? I mean, if a vb program creates a socket using
  Winsock will Flex be able to listen to such socket?
  Second, if yes, how would data actually be transfered?
 
  Thanks
 
  --- In flexcoders@yahoogroups.com, Guy Morton guy@ wrote:
  
   Well...nothing would, normally. You'd have to set up a
server to
  talk
   to you on that socket, develop a protocol for conversing over
  the
   socket, etc.
  
   An XML socket is just a pipe to communicate over. Unlike
normal
  http
   requests which encapsulate the http conversation so you don't
  see it,
   a raw XML socket requires you to define what messages are
going
  to be
   sent by whom and what those messages mean.
  
   Does that help, or have I misunderstood your question?
  
   Guy
  
  
   On 14/02/2009, at 10:50 PM, markgoldin_2000 wrote:
  
I am trying to understand how socket communications work in
  flex.
This code will connect to a port 8080 on a local computer:
   
var xmlsock:XMLSocket = new XMLSocket();
xmlsock.connect(127.0.0.1, 8080);
   
But what I dont understand is what would be sending data to
  that
port?
   
Thanks
   
   
   
  
 
 
 








Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames.

2009-02-15 Thread - -
Hi Tracy, I have a little more complicated situation... 
My linkButtons are now created with actionScript (addChild). 
I set their IDs before adding them to their parent.
My action script also fills up my Array of linkButton IDs called buttons.

[Bindable]privatevarbuttons:Array = newArray();

{ 
}foreach(varitemsIDs:String 
inbuttons)trace(itemsIDs);this[itemsIDs].setStyle(styleName,linkButton);
My trace properly returns all the IDs of my buttons but I get the following 
error:
Property test001 not found... and there is no default value.
It's like I don't have access to the ID of my linkButtons because they were 
created via the ADDCHILD ???
Is this possible?
 
Any ideas how I can get around this?
 
Thanks again :)
 
-David





From: Tracy Spratt tspr...@lariatinc.com
To: flexcoders@yahoogroups.com
Sent: Friday, February 13, 2009 5:49:57 PM
Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames.


styleName is not a property, it is a style. You have to use setStyle();

Also, debug your loop, make sure you have a good refrence to the button.

Tracy Spratt 
Lariat Services 
Flex development bandwidth available 
 _ _ _ _
From: flexcod...@yahoogro ups.com [mailto:flexcod...@yahoogro ups.com] On 
Behalf Of - -
Sent: Friday, February 13, 2009 5:31 PM
To: flexcod...@yahoogro ups.com
Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames.

Hi Tracy, I can get it to work as a var, but when I try to access the Array, I 
get: 
Cannot access a property or method of a null object reference.

This is my array:
 
[Bindable]
private var buttons:Array = new Array(test001 , test002, test003);
 
for each(var target:String in buttons)
{
this[target] .styleName = linkButton; 
}
 
Thanks again! :)

 _ _ _ _
From: Tracy Spratt tspr...@lariatinc. com
To: flexcod...@yahoogro ups.com
Sent: Friday, February 13, 2009 5:15:22 PM
Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames.
Yes, sailorsea, see that link.
 
Also, be careful of terminology.  I said store references.  This is not the 
same as storing IDs.
 
You can do this using ids, with bracket notation.  
var sId:String = test001;
this[sId].setStyle( );  //should work
 
Tracy Spratt 
Lariat Services 
Flex development bandwidth available 
 _ _ _ _
From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On 
Behalf Of Ryan Graham
Sent: Friday, February 13, 2009 5:08 PM
To: flexcod...@yahoogro ups.com
Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames.
 
Hey now, you knew this was in the docs... :D
 
http://livedocs. adobe.com/ flex/3/html/ help.html? content=03_ Language_ 
and_Syntax_ 16.html
 
HTH,
Ryan
 
From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On 
Behalf Of - -
Sent: Friday, February 13, 2009 2:28 PM
To: flexcod...@yahoogro ups.com
Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames.
 
Hi Tracy, I created an array of all the IDs of my linkButtons, can you show me 
an example how to loop in the array?
 
Thanks.
 
 _ _ _ _
From: Tracy Spratt tspr...@lariatinc. com
To: flexcod...@yahoogro ups.com
Sent: Friday, February 13, 2009 4:11:05 PM
Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames.
Store references to each in an Array, then loop over the array.
 
Tracy Spratt 
Lariat Services 
Flex development bandwidth available 
 _ _ _ _
From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On 
Behalf Of sailorsea21
Sent: Friday, February 13, 2009 4:01 PM
To: flexcod...@yahoogro ups.com
Subject: [flexcoders] DYNAMIC LINKBUTTONS styleNames.
 
I have a series of 3 linkButtons.
I am able to switch the styleName of a linkButton when I click on it 
as follows:

[Bindable]
private var linkButton:String = 'linkButton' ;

[Bindable]
private var linkButtonOff: String = 'linkButtonOff' ;

mx:LinkButton id=test001 label=001 styleName={ linkButton}  
buttonMode= true click=setType( event)/

mx:LinkButton id=test002 label=002 styleName={ linkButton}  
buttonMode= true click=setType( event)/

mx:LinkButton id=test003 label=003 styleName={ linkButton}  
buttonMode= true click=setType( event)/

private function setType(result: Event):void
{
result.currentTarge t.styleName = linkButtonOff;
}

How can I automatically reset all the other linkButtons styleNames 
to {linkButton}  when a linkButton is clicked?

Thank you.
 
This message is private and confidential. If you have received it in error, 
please notify the sender and remove it from your system.





  

[flexcoders] Disabling copy with dragDrop/dragEnabled

2009-02-15 Thread Tim Rowe
Currently an app I'm working on has a traditional two-column set of lists - on 
the left our unassigned items, on the right the assigned ones.  Flex allows you 
to drag features from one to the other, and these datasets are bound, so it's 
all handled internally, but unfortunately Flex/Air also allow a user to 
ctrl-drag - which copies the data.  If the user does this, they end up with the 
data in both lists, which we don't want possible.

If we're to leave dragging in, the ability to copy needs to be removed.  We 
also want the drag icon to be displayed correctly in any solution.

I can see a few ways to tackle this.
1.  Disable dragging altogether.
2.  Intercept the drop event/dragComplete and if the copy modifier is set, 
remove those elements from the source list.  However, this won't change the 
cursor icon to only be 'move' (ie, it'll still be a 'copy' cursor, usually with 
a +), so doesn't really meet the requirements.
3.  Ideally I'd like to just disable the copy function - but I can't find a way 
of doing this.

Can anyone suggest how this can be done?  Would this need to be done manually 
with a mouseMoveHandler wrapping a DragSource instead?

Thanks,

Tim Rowe
Software Engineer
carsales.com Ltd


[flexcoders] E4X help?

2009-02-15 Thread flexaustin
Is it possible to get the value of type from this XML?

node id=2
data key=nameEd/data
data key=typeM/data
/node
#8722;
node id=3
data key=nameChristiaan/data
data key=typeM/data
/node

So in this example end up with M for both?



Re: [flexcoders] E4X help?

2009-02-15 Thread Josh McDonald
Not sure exactly what you mean. Have you tried this:

var typeNodes : XMLList = node.data.(attribute(key)==type);

-Josh

On Mon, Feb 16, 2009 at 9:58 AM, flexaustin flexaus...@yahoo.com wrote:

   Is it possible to get the value of type from this XML?

 node id=2
 data key=nameEd/data
 data key=typeM/data
 /node
 #8722;
 node id=3
 data key=nameChristiaan/data
 data key=typeM/data
 /node

 So in this example end up with M for both?

  




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

Josh 'G-Funk' McDonald
  -  j...@joshmcdonald.info
  -  http://twitter.com/sophistifunk
  -  http://flex.joshmcdonald.info/


[flexcoders] HOW?: DnD within grid to move AND have DnD from the grid to list be a copy.

2009-02-15 Thread David Kramer
Hey folks, I need some guidance/solution to a Drag and Drop scenario...

I have a list and a grid. You can drag and drop from the grid to the
list, and you can drag and drop within the grid to change the sort order.
However, If you drag and drop within the grid it does an automatic copy
instead of a move (sort) which is what I want. So, I tried
dragMoveEnabled=true which works nicely within the grid, but then it's
also moved and not copied to the list.

Anyone have guidance on how to have DnD within a grid be a move AND also
have DnD from the grid to the list be a copy?

It would seem like there is a way.

Thanks in advance to all who help!

Dave


[flexcoders] [SebCoverFlow] opacity/alpha on non-selected items in the array

2009-02-15 Thread David Kramer
Anyone know how to change the opacity/alpha of the non-selected items (to
be grayed out) when rendered in Seb's CoverFlow?

Thanks!

Dave


RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames.

2009-02-15 Thread Tracy Spratt
...set their IDs...  That does not work in actionscript, only in mxml.
You need to take the reference from addChild, and put in your array.

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of - -
Sent: Sunday, February 15, 2009 4:04 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames.

 

Hi Tracy, I have a little more complicated situation... 

My linkButtons are now created with actionScript (addChild). 

I set their IDs before adding them to their parent.

My action script also fills up my Array of linkButton IDs called
buttons.

 

[Bindable]

private var buttons:Array = new Array();

 

for each (var itemsIDs:String in buttons)

{ 

trace(itemsIDs);

this[itemsIDs].setStyle(styleName,linkButton);

}


My trace properly returns all the IDs of my buttons but I get the
following error:

Property test001 not found... and there is no default value.

It's like I don't have access to the ID of my linkButtons because they
were created via the ADDCHILD ???

Is this possible?

 

Any ideas how I can get around this?

 

Thanks again :)

 

-David

 

 



From: Tracy Spratt tspr...@lariatinc.com
To: flexcoders@yahoogroups.com
Sent: Friday, February 13, 2009 5:49:57 PM
Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames.

styleName is not a property, it is a style. You have to use setStyle();

Also, debug your loop, make sure you have a good refrence to the button.

Tracy Spratt 
Lariat Services 
Flex development bandwidth available 
 _ _ _ _
From: flexcod...@yahoogro ups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcod...@yahoogro ups.com
mailto:flexcoders%40yahoogroups.com ] On Behalf Of - -
Sent: Friday, February 13, 2009 5:31 PM
To: flexcod...@yahoogro ups.com mailto:flexcoders%40yahoogroups.com 
Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames.

Hi Tracy, I can get it to work as a var, but when I try to access the
Array, I get: 
Cannot access a property or method of a null object reference.

This is my array:
 
[Bindable]
private var buttons:Array = new Array(test001 , test002, test003);
 
for each(var target:String in buttons)
{
this[target] .styleName = linkButton; 
}
 
Thanks again! :)

 _ _ _ _
From: Tracy Spratt tspr...@lariatinc. com
mailto:tspratt%40lariatinc.com 
To: flexcod...@yahoogro ups.com mailto:flexcoders%40yahoogroups.com 
Sent: Friday, February 13, 2009 5:15:22 PM
Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames.
Yes, sailorsea, see that link.
 
Also, be careful of terminology.  I said store references.  This is
not the same as storing IDs.
 
You can do this using ids, with bracket notation.  
var sId:String = test001;
this[sId].setStyle( );  //should work
 
Tracy Spratt 
Lariat Services 
Flex development bandwidth available 
 _ _ _ _
From: flexcod...@yahoogro ups.com http://ups.com/  [mailto:flexcoders@
yahoogroups. com] On Behalf Of Ryan Graham
Sent: Friday, February 13, 2009 5:08 PM
To: flexcod...@yahoogro ups.com
Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames.
 
Hey now, you knew this was in the docs... :D
 
http://livedocs. http://livedocs./  adobe.com/ flex/3/html/ help.html?
content=03_ Language_ and_Syntax_ 16.html
 
HTH,
Ryan
 
From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com]
On Behalf Of - -
Sent: Friday, February 13, 2009 2:28 PM
To: flexcod...@yahoogro ups.com
Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames.
 
Hi Tracy, I created an array of all the IDs of my linkButtons, can you
show me an example how to loop in the array?
 
Thanks.
 
 _ _ _ _
From: Tracy Spratt tspr...@lariatinc. com
To: flexcod...@yahoogro ups.com
Sent: Friday, February 13, 2009 4:11:05 PM
Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames.
Store references to each in an Array, then loop over the array.
 
Tracy Spratt 
Lariat Services 
Flex development bandwidth available 
 _ _ _ _
From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com]
On Behalf Of sailorsea21
Sent: Friday, February 13, 2009 4:01 PM
To: flexcod...@yahoogro ups.com
Subject: [flexcoders] DYNAMIC LINKBUTTONS styleNames.
 
I have a series of 3 linkButtons.
I am able to switch the styleName of a linkButton when I click on it 
as follows:

[Bindable]
private var linkButton:String = 'linkButton' ;

[Bindable]
private var linkButtonOff: String = 'linkButtonOff' ;

mx:LinkButton id=test001 label=001 styleName={ linkButton}  
buttonMode= true click=setType( event)/

mx:LinkButton id=test002 label=002 styleName={ linkButton}  
buttonMode= true click=setType( event)/

mx:LinkButton id=test003 label=003 styleName={ linkButton}  
buttonMode= true click=setType( event)/

private 

[flexcoders] RE: Disabling copy with dragDrop/dragEnabled

2009-02-15 Thread Alex Harui
Do you need to drag outside of Flex?  If not, I think there's documentation on 
how to use the non-AIR mx.managers.DragManager which should give you better 
control.

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 Tim Rowe
Sent: Sunday, February 15, 2009 3:33 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Disabling copy with dragDrop/dragEnabled

Currently an app I'm working on has a traditional two-column set of lists - on 
the left our unassigned items, on the right the assigned ones.  Flex allows you 
to drag features from one to the other, and these datasets are bound, so it's 
all handled internally, but unfortunately Flex/Air also allow a user to 
ctrl-drag - which copies the data.  If the user does this, they end up with the 
data in both lists, which we don't want possible.

If we're to leave dragging in, the ability to copy needs to be removed.  We 
also want the drag icon to be displayed correctly in any solution.

I can see a few ways to tackle this.
1.  Disable dragging altogether.
2.  Intercept the drop event/dragComplete and if the copy modifier is set, 
remove those elements from the source list.  However, this won't change the 
cursor icon to only be 'move' (ie, it'll still be a 'copy' cursor, usually with 
a +), so doesn't really meet the requirements.
3.  Ideally I'd like to just disable the copy function - but I can't find a way 
of doing this.

Can anyone suggest how this can be done?  Would this need to be done manually 
with a mouseMoveHandler wrapping a DragSource instead?

Thanks,

Tim Rowe
Software Engineer
carsales.com Ltd



[flexcoders] RE: Dictionary memory leak

2009-02-15 Thread Alex Harui
I don't know of any leaks.  Got a bug report?  Test case?

Most common problem is not understanding that only the keys are weak 
referenced.  The values are strong references.

Var obj:Object
Var dict:Dictionary

dict[obj] = 1; // weak reference
dict[1] = obj; // strong reference and memory leak
dict[obj] = obj; // strong reference on value side and also a memory leak.


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 Gregor Kiddie
Sent: Sunday, February 15, 2009 9:54 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Dictionary memory leak

Anyone know if this has been fixed?

There was a reported memory leak a while back (at least in my memory ;) ) and 
I'm trying to work out if it's safe to use Dictionarys again...

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343
Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ
Registered Number: 1788577
Registered in the UK

Visit our Internet Web site at www.inps.co.ukblocked::http://www.inps.co.uk/

The information in this internet email is confidential and is intended solely 
for the addressee. Access, copying or re-use of information in it by anyone 
else is not authorised. Any views or opinions presented are solely those of the 
author and do not necessarily represent those of INPS or any of its affiliates. 
If you are not the intended recipient please contact is.helpd...@inps.co.uk




Re: [flexcoders] RE: Dictionary memory leak

2009-02-15 Thread Josh McDonald
I use Dictionary as a non-leaking map all over the place and I definitely
don't have any problems with it (Player 10, Mac).

-Josh

On Mon, Feb 16, 2009 at 4:00 PM, Alex Harui aha...@adobe.com wrote:

I don't know of any leaks.  Got a bug report?  Test case?



 Most common problem is not understanding that only the keys are weak
 referenced.  The values are strong references.



 Var obj:Object

 Var dict:Dictionary



 dict[obj] = 1; // weak reference

 dict[1] = obj; // strong reference and memory leak

 dict[obj] = obj; // strong reference on value side and also a memory leak.





 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 *Gregor Kiddie
 *Sent:* Sunday, February 15, 2009 9:54 AM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Dictionary memory leak



 Anyone know if this has been fixed?



 There was a reported memory leak a while back (at least in my memory ;) )
 and I'm trying to work out if it's safe to use Dictionarys again…



 Gk.

 *Gregor Kiddie*
 Senior Developer
 *INPS*

 Tel:   01382 564343

 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ

 Registered Number: 1788577

 Registered in the UK

 Visit our Internet Web site at www.inps.co.uk

 The information in this internet email is confidential and is intended
 solely for the addressee. Access, copying or re-use of information in it by
 anyone else is not authorised. Any views or opinions presented are solely
 those of the author and do not necessarily represent those of INPS or any of
 its affiliates. If you are not the intended recipient please contact
 is.helpd...@inps.co.uk



   




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

Josh 'G-Funk' McDonald
  -  j...@joshmcdonald.info
  -  http://twitter.com/sophistifunk
  -  http://flex.joshmcdonald.info/


RE: [flexcoders] Arrow on Multiple Column's Header in Flex2 DataGrid

2009-02-15 Thread Alex Harui
Custom headerrenderer.

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 Dharmendra Chauhan
Sent: Sunday, February 15, 2009 9:18 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Arrow on Multiple Column's Header in Flex2 DataGrid


Hi All,
I have to show Sorting arrows(Up  Down) on DataGrid(Hotfix2)
Header for more than one Column.I want to show arrow based on
underlying dataProvider Sorting ie if arrayCollection was sorted based
on two column then two respective column in DG should show arrow on
Header. Please do share your ideas on how to do it.
Please share the code if someone have already done it.

Any help would be highly appreciated.

Thanks,
Dharmendra Chouhan



Re: Re: [flexcoders] AIR Application is not Appearing

2009-02-15 Thread verma . lucky

Hello Kevin,

Yes, you are right I am using SDK 3.2. I have changed the namespace to 1.5  
in App xml but still it's not appearing on new machine.


Pls tell me what to do.


Best,
Ashish

On Feb 14, 2009 9:27pm, Kevin Benz kb...@passalongnetworks.com wrote:























































Please be aware of a very simple issue that I don’t

believe is well documented... When you go through an upgrade of an  

existing


project from SDK 3.1 to 3.2 where Air is involved, the compiler links the

appropriate Air objects based on what is contained in the app.xml file  

(YOUR


APPLICATION NAME-app.xml) in the project home directory. You will find  

either (the


compiler usually crabs about this if you rely on objects not in the  

chosen library


though)





xmlns=http://ns.adobe.com/air/application/1.1; or





xmlns=http://ns.adobe.com/air/application/1.5;




Make sure this is set correctly for your target environment.









KFB












From:

flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf  

Of Douglas


Knudsen


Sent: Saturday, February 14, 2009 7:17 AM


To: flexcoders@yahoogroups.com


Subject: Re: [flexcoders] AIR Application is not Appearing































I've seen this occur if there is some sort of startup error. ( No


global exception handler, eh? ). For example, if your Air app is


looking for a config file using static inatialiser on startup and


can't find it, it could just hang there. Check the flashlog for


errors.





DK





On 2/13/09, Alex Harui aha...@adobe.com

wrote:


 Did they try uninstalling and re-installing?





 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 Ashish Verma


 Sent: Friday, February 13, 2009 7:03 AM


 To: flexcoders@yahoogroups.com


 Subject: [flexcoders] AIR Application is not Appearing








 Hello All,





 I created an AIR Application which was previously based on AIR 1.0 and I

am


 some more features in that application and compiling with the update of

Flex


 3 and targeting it for AIR 1.5. After making air file I am putting it  

onto



 sever to access by users. But when any user trying to run it after

uploading


 it's not displaying any window only showing task-bar button and doing


 noting. When I use the task-bar context to move command I can see the

dotted


 rectangle on the desktop. I also checked for the installation folder of  

the



 application in C:\Documents and Settings\username\Local Settings but  

there



 was no any folder for it.





 Please help me out.








 Best,


 Ashish











--


Sent from my mobile device





Douglas Knudsen


http://www.cubicleman.com


this is my signature, like it?


























--


This message has been scanned for viruses and


dangerous content by MailScanner,

and is


believed to be clean.


































































[flexcoders] Re: HOW?: DnD within grid to move AND have DnD from the grid to list be a copy.

2009-02-15 Thread dmkramerica
Got it.  Ctrl+drag.  Duh.

--- In flexcoders@yahoogroups.com, David Kramer kramer.da...@...
wrote:

 Hey folks, I need some guidance/solution to a Drag and Drop scenario...
 
 I have a list and a grid. You can drag and drop from the grid to the
 list, and you can drag and drop within the grid to change the sort
order.
 However, If you drag and drop within the grid it does an automatic copy
 instead of a move (sort) which is what I want. So, I tried
 dragMoveEnabled=true which works nicely within the grid, but then it's
 also moved and not copied to the list.
 
 Anyone have guidance on how to have DnD within a grid be a move AND also
 have DnD from the grid to the list be a copy?
 
 It would seem like there is a way.
 
 Thanks in advance to all who help!
 
 Dave





[flexcoders] Re: DYNAMIC actionscript child layout.

2009-02-15 Thread sunild999999
In Actionscript, you can use the percentWidth and percentHeight 
properties to specify width and height of your components.


--- In flexcoders@yahoogroups.com, sailorsea21 sailorse...@... 
wrote:

 Hi everyone, when I create my layout with mxml components, my 
layout is 
 dynamic. If I resize my browser window, my components are also 
resized.
 How can I achieve this in actionscript using addChild???
 
   var Layout:Canvas = new Canvas();
   graphLayout.width=testlayout.width/2;
   graphLayout.height=testlayout.width/2;
   layout_graphs.addChild(graphLayout);
 
 testlayout is my vbox that will be parent to the canvas.
 
 Thanks.





[flexcoders] Re: Showing grid in line series graph

2009-02-15 Thread sunild999999
You need to specify a Stroke to use for the grid lines.  You can make 
the Stroke for the grid lines bolder by setting the weight 
property of the Stroke to a number greater than 1.

If you view the source of this example, you can see one way of doing 
this:
http://blog.sunild.com/2008/08/inverting-chart-series.html

Sunil

--- In flexcoders@yahoogroups.com, Vik vik@... wrote:

 Hie
 That worked thankx.. but the grid lines are very light. almost hard 
to see..
 
 how to make them look a bit bold?
 
 Thankx and Regards
 
 Vik
 Founder
 www.sakshum.com
 www.sakshum.blogspot.com
 



Re: [flexcoders] E4X help?

2009-02-15 Thread claudiu ursica
node.da...@key == type ? If U want both values you should iterate ...
Claudiu





From: flexaustin flexaus...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Monday, February 16, 2009 1:58:46 AM
Subject: [flexcoders] E4X help?


Is it possible to get the value of type from this XML?

node id=2
data key=nameEd /data
data key=typeM /data
/node
#8722;
node id=3
data key=nameChristia an/data
data key=typeM /data
/node

So in this example end up with M for both?


   


  

RE: [flexcoders] RE: Dictionary memory leak

2009-02-15 Thread Gregor Kiddie
Sweet, and I can't find the reference I'd made to it previously, which
means it was all in my head or a mysterious conspiracy. I'd probably
vote for the former!

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk
blocked::http://www.inps.co.uk/ 

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact is.helpd...@inps.co.uk



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Josh McDonald
Sent: 16 February 2009 06:04
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] RE: Dictionary memory leak

 

I use Dictionary as a non-leaking map all over the place and I
definitely don't have any problems with it (Player 10, Mac).

-Josh

On Mon, Feb 16, 2009 at 4:00 PM, Alex Harui aha...@adobe.com
mailto:aha...@adobe.com  wrote:

I don't know of any leaks.  Got a bug report?  Test case?

 

Most common problem is not understanding that only the keys are weak
referenced.  The values are strong references.

 

Var obj:Object

Var dict:Dictionary

 

dict[obj] = 1; // weak reference

dict[1] = obj; // strong reference and memory leak

dict[obj] = obj; // strong reference on value side and also a memory
leak.

 

 

Alex Harui

Flex SDK Developer

Adobe Systems Inc. http://www.adobe.com/ 

Blog: http://blogs.adobe.com/aharui http://blogs.adobe.com/aharui 

 

From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ]
On Behalf Of Gregor Kiddie
Sent: Sunday, February 15, 2009 9:54 AM
To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com 
Subject: [flexcoders] Dictionary memory leak

 

Anyone know if this has been fixed?

 

There was a reported memory leak a while back (at least in my memory ;)
) and I'm trying to work out if it's safe to use Dictionarys again...

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact is.helpd...@inps.co.uk mailto:is.helpd...@inps.co.uk 

 




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

Josh 'G-Funk' McDonald
  -  j...@joshmcdonald.info mailto:j...@joshmcdonald.info 
  -  http://twitter.com/sophistifunk http://twitter.com/sophistifunk 
  -  http://flex.joshmcdonald.info/ http://flex.joshmcdonald.info/