RE: [flexcoders] Memory Leak in DataServices based App ??

2009-06-27 Thread Alex Harui
What does the memory profiler say?  There's a tutorial on how to use it on my 
blog.

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: Friday, June 26, 2009 10:21 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Memory Leak in DataServices based App ??





Hi All,

 I have  very basic application which uses  DataSerives over RTMP channel  
to populate dataGrid , I have not used any  user defined component.

This application has got LOAD data and Remove data  Button just to simulate the 
actual application

What happens , when I click on LOAD data , It  loads the data from 
server(JBOSS) then I Remove all the data and force the GC to run

If I continuously keep loading and removing the  data ,  memory goes up every 
time and after some times It reaches to threshold and  finally crashes the 
Browser.

In actual application as soon as user logs in a dedicated DS destination is 
created..

 private function createDestination(destName:String):void{
var remoteServi! ce:RemoteObject = new 
RemoteObject(DestinationManager);
remoteService.addEventListener(ResultEvent.RESULT, 
resultHandler,false,0,true);
var operation:AbstractOperation = 
remoteService.getOperation(createDestination);
operation.send(destName);
var cs:ChannelSet = new ChannelSet();
var rtmpChannel:RTMPChannel = ServerConfig.getChannel(my-rtmp) as 
 RTMPChannel;
cs.addChannel(rtmpChannel);
  ! ;  tradeService = new DataService() ;
  ! ;  nbsp;tradeService.destination=destName;
tradeService.channelSet = cs;
}


Now when user hits on Load data button to load the trade data ...

   public function loadData():void
{
var remoteService:RemoteObject  = new RemoteObject(filterRemoteVO);
var operation:AbstractOperation = 
remoteService.getOperation(loadData);
tradeService.fill(tradeCollection);
operation.send(rowData.t! ext ,GUIID);
tradeList.dataProvider = tradeCollection;

}


Remove Data  hit I clean all the resource and released collection :-

 public  function  removeAll():void{
if(tradeList.dataProvider){
 tradeCollection.source = new Array();
 tradeList.dataProvider.source = new Array();
 tradeList.dataProvider = null;
}
   tradeService.release();
   nb! sp;  ; tradeService.releaseCollection(tradeCollection);
 tradeService.channelSet.disconnectAll();
 tradeService.disconnect();
  tradeService.logout();
  System.gc();
}

Except these 3 function I don't have any code which could cause memory leak.

I m using

 *   LCDS 2.5
 *   Flex 3.0
 *   JBoss4.2

Please see the mxml file below   , If  possible please have a look at it , I 
might  not be using dataSerice API correctly.

I have been trying to solve this leak for last two week , I really need help 
from you guys.
My client has already evaluating other contemporary technology because of this 
memory issue.

I have al! so created scalled down war file which can be deployed on any  java 
application server.Just provide your emial Id , Iwill send that to you.

Any help will greatly be appreciated

Regards,

Dam
 MXML##


?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
 creationComplete=init(); height=100% width=100%

mx:Script 
![CDATA[
import mx.containers.GridRow;
  import mx.utils.Base64Decoder;
import mx.utils.StringUtil;
   import mx.events.Colle! ctionEvent;
   ! import mx.formatters.Formatter;
import mx.events.ResizeEvent;
import mx.controls.DataGrid;
import mx.effects.Fade;
import mx.events.DataGridEvent;
import mx.utils.ObjectUtil;
import mx.events.ScrollEvent;
  import mx.formatters.DateFormatter;
  import mx.events.ListEvent;
  import mx.data.mxml.DataService;
  import mx.messaging.config.ServerConfig;
  import mx.messaging.channels.RTMPChannel;
  import mx.messaging.ChannelSet;
n! bsp; import mx.rpc.AbstractOperation;
  import mx.rpc.remoting.RemoteObject;
  import mx.collections.ArrayCollection;
  import mx.controls.Alert;
  import mx.rpc.events.ResultEvent;
  import mx.messaging.messages.*;
  import mx.messaging.events.*;
  import mx.controls.Alert;



   private var GUIID:String;
   private var lastRollOverIndex:Number;

   public var tradeService:DataService=null;
   public var tradeCollection:ArrayCollection = new ArrayCollection();

 ! public var flag:Boolean = false;
! nbsp;nb sp;

   private function init():void {
  var guiId:String 

[flexcoders] dynamic dimension of the page

2009-06-27 Thread anitha2324
Hi All,

I am making a flex web page the following is some part of this page 


mx:VBox id=boxPersonalImages
 verticalGap=0
 height=80%
 width=60%

 left=10
 bottom=160
 horizontalAlign=left
 
containers:CoverFlowContainer id=SildeOfImges
   
width=100%
   
height=100%
   
horizontalGap=60
   
borderStyle=none
   
segments=6
   
reflectionEnabled=false
/containers:CoverFlowContainer


/mx:VBox


mx:Image id=AdsImagesComponent
  width=25%
  height=25%
  right=10
  top=150/
mx:VBox width=100%
 height=20%
 id=hMsg
 backgroundColor=#FF
 horizontalCenter=10
 bottom=150
mx:TextArea id=customerMessageTextAreaComponent
 width=100%
 height=100%
 fontSize=36
 textAlign=center
 fontFamily=Times New Roman
 wordWrap=true
 editable=false  borderStyle=none/
/mx:VBox


mx:VBox height=10%
 width=50%
 id=hLog2
 left=30
 bottom=25
mx:Label id=shortCodeLabelComponent
  width=100%
  height=10%
  fontSize=50
  color=#00/
/mx:VBox
mx:VBox height=10%
 width=35%
 id=hLog
 left=2%
 bottom=25
mx:Image id=operatorLogoImageComponent
  width=110
  height=75/

/mx:VBox


, actually i have completed the page and i have run it on my stystem and it 
works fine , but when i run in another pc
the page did not display correctly and some part of this plage has not been 
displayed because the resolution of this screen is different from the 
resolution of my screen , so how i do fix this issue
so that my page can be displayed correctly regardless of the screen resolution 
, I have tried to use the % like height=34% but not all the properties are 
accepting the % (such top , right)

any one can help to solve this issue



[flexcoders] Re: Memory Leak in DataServices based App ??

2009-06-27 Thread Dharmendra Chauhan
I have gone throw your tutorial on you blog  and I profiled my with. I
could see so many loitering object hanging around  , I evaluted them
based upon the method suggetsed on your blog.
Potential  Loitering Obejct which I could see is -

* Objects
* Strings
On drill down , I found tons of obejct of following :-
   AbstradeDataServies
   NetConnetions
ManagedObjectPeoxy- It is refering to DataGridItemRenderer

  Worst part is they keep increasing everytime when I load the  data and
remove it.

I have removed all my custom code and now app is very bare bone.Lately I
though I could seek help from flexCoders.

- Dharmendra

























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

 What does the memory profiler say?  There's a tutorial on how to use
it on my blog.

 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: Friday, June 26, 2009 10:21 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Memory Leak in DataServices based App ??





 Hi All,

  I have  very basic application which uses  DataSerives over RTMP
channel  to populate dataGrid , I have not used any  user defined
component.

 This application has got LOAD data and Remove data  Button just to
simulate the actual application

 What happens , when I click on LOAD data , It  loads the data from
server(JBOSS) then I Remove all the data and force the GC to run

 If I continuously keep loading and removing the  data ,  memory goes
up every time and after some times It reaches to threshold and  finally
crashes the Browser.

 In actual application as soon as user logs in a dedicated DS
destination is created..

  private function createDestination(destName:String):void{
 var remoteServi! ce:RemoteObject = new
RemoteObject(DestinationManager);
 remoteService.addEventListener(ResultEvent.RESULT,
resultHandler,false,0,true);
 var operation:AbstractOperation =
remoteService.getOperation(createDestination);
 operation.send(destName);
 var cs:ChannelSet = new ChannelSet();
 var rtmpChannel:RTMPChannel =
ServerConfig.getChannel(my-rtmp) as  RTMPChannel;
 cs.addChannel(rtmpChannel);
   ! ;  tradeService = new DataService() ;
   ! ;  nbsp;tradeService.destination=destName;
 tradeService.channelSet = cs;
 }


 Now when user hits on Load data button to load the trade data ...

public function loadData():void
 {
 var remoteService:RemoteObject  = new
RemoteObject(filterRemoteVO);
 var operation:AbstractOperation =
remoteService.getOperation(loadData);
 tradeService.fill(tradeCollection);
 operation.send(rowData.t! ext ,GUIID);
 tradeList.dataProvider = tradeCollection;

 }


 Remove Data  hit I clean all the resource and released collection :-

  public  function  removeAll():void{
 if(tradeList.dataProvider){
  tradeCollection.source = new Array();
  tradeList.dataProvider.source = new Array();
  tradeList.dataProvider = null;
 }
tradeService.release();
nb! sp;  ; tradeService.releaseCollection(tradeCollection);
  tradeService.channelSet.disconnectAll();
  tradeService.disconnect();
   tradeService.logout();
   System.gc();
 }

 Except these 3 function I don't have any code which could cause memory
leak.

 I m using

  *   LCDS 2.5
  *   Flex 3.0
  *   JBoss4.2

 Please see the mxml file below   , If  possible please have a look at
it , I might  not be using dataSerice API correctly.

 I have been trying to solve this leak for last two week , I really
need help from you guys.
 My client has already evaluating other contemporary technology because
of this memory issue.

 I have al! so created scalled down war file which can be deployed on
any  java application server.Just provide your emial Id , Iwill send
that to you.

 Any help will greatly be appreciated

 Regards,

 Dam
  MXML##


 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
  creationComplete=init(); height=100% width=100%
 
 mx:Script 
 ![CDATA[
 import mx.containers.GridRow;
   import mx.utils.Base64Decoder;
 import mx.utils.StringUtil;
import mx.events.Colle! ctionEvent;
! import mx.formatters.Formatter;
 import mx.events.ResizeEvent;
 import mx.controls.DataGrid;
 import mx.effects.Fade;
 import mx.events.DataGridEvent;
 import mx.utils.ObjectUtil;
 import mx.events.ScrollEvent;
   import mx.formatters.DateFormatter;
   import mx.events.ListEvent;
   

[flexcoders] Flex Library and and MXML component

2009-06-27 Thread Mike Oliver

I have an MXML Component Canvas that I want to put into a Flex Library SWC.

I created a Flex Library Project with /src and /bin 

I added the /images folder with the image in it that the Component Canvas
uses to /src.

I added the mxml source file for the Component to the /src

The /bin gets the MyLibProject.swc but the mxml component isn't inside.

I am sure I am missing a step but can't find what it is.

I want to use this swc in several projects as a component on other screens.

-- 
View this message in context: 
http://www.nabble.com/Flex-Library-and-and-MXML-component-tp24233741p24233741.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] Flex Library and and MXML component

2009-06-27 Thread Aaron Hardy
Right-click project -- Properties -- Flex Library Build Path -- 
Select All -- OK.  Make sure it rebuilds and you should be good to go.

Aaron

Mike Oliver wrote:



 I have an MXML Component Canvas that I want to put into a Flex Library 
 SWC.

 I created a Flex Library Project with /src and /bin

 I added the /images folder with the image in it that the Component Canvas
 uses to /src.

 I added the mxml source file for the Component to the /src

 The /bin gets the MyLibProject.swc but the mxml component isn't inside.

 I am sure I am missing a step but can't find what it is.

 I want to use this swc in several projects as a component on other 
 screens.

 -- 
 View this message in context: 
 http://www.nabble.com/Flex-Library-and-and-MXML-component-tp24233741p24233741.html
  
 http://www.nabble.com/Flex-Library-and-and-MXML-component-tp24233741p24233741.html
 Sent from the FlexCoders mailing list archive at Nabble.com.

 



Re: [flexcoders] Flex Library and and MXML component

2009-06-27 Thread Mike Oliver

Right, I hadn't added the class that was the MXML Component, so that was it.

Ollie

Aaron Hardy wrote:
 
 Right-click project -- Properties -- Flex Library Build Path -- 
 Select All -- OK.  Make sure it rebuilds and you should be good to go.
 
 Aaron
 
 Mike Oliver wrote:



 I have an MXML Component Canvas that I want to put into a Flex Library 
 SWC.

 I created a Flex Library Project with /src and /bin

 I added the /images folder with the image in it that the Component Canvas
 uses to /src.

 I added the mxml source file for the Component to the /src

 The /bin gets the MyLibProject.swc but the mxml component isn't inside.

 I am sure I am missing a step but can't find what it is.

 I want to use this swc in several projects as a component on other 
 screens.

 -- 
 View this message in context: 
 http://www.nabble.com/Flex-Library-and-and-MXML-component-tp24233741p24233741.html
  
 http://www.nabble.com/Flex-Library-and-and-MXML-component-tp24233741p24233741.html
 Sent from the FlexCoders mailing list archive at Nabble.com.

 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Flex-Library-and-and-MXML-component-tp24233741p24234546.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Is there a good log application?

2009-06-27 Thread guy.tomer
Hi,

I was wondering if anyone can point me to an easy to use logging application? 
Looks like Flex used to have one called MiniDebug but it's deprecated.

My problem is that my testers have many difficulties configuring the flash 
debugger and the flashlog.txt (permissions on vista and other issues), I think 
something that uses LocalConnection or some JavaScript Target could do the job. 
Note - I need something that is supported on multiple environments not just 
firebug on firefox.

Tnx
Guy



Re: [flexcoders] Is there a good log application?

2009-06-27 Thread claudiu ursica
Try Thunderbolt maybe suits your needs...

C





From: guy.tomer guy.to...@gmail.com
To: flexcoders@yahoogroups.com
Sent: Saturday, June 27, 2009 9:24:35 PM
Subject: [flexcoders] Is there a good log application?





Hi,

I was wondering if anyone can point me to an easy to use logging application? 
Looks like Flex used to have one called MiniDebug but it's deprecated.

My problem is that my testers have many difficulties configuring the flash 
debugger and the flashlog.txt (permissions on vista and other issues), I think 
something that uses LocalConnection or some JavaScript Target could do the job. 
Note - I need something that is supported on multiple environments not just 
firebug on firefox.

Tnx
Guy


   


  

[flexcoders] Paging collections with more than 1 filter

2009-06-27 Thread fumeng5
Hi,

I have an ArrayCollection that I use as a dataProvider for a DataGrid. To 
enable paging, I filter the collection. The problem is that I have another 
filter function for that collection where a user can retrieve rows via string 
search. 

This works fine except when the search returns multiple pages because on the 
first page click, the original (unfiltered) collection is used instead of the 
collection that I just filtered. 

I suppose that I could create a copied collection on string search and then set 
a flag to let my other filter function know which collection to use. However, I 
was hoping there's a more elegant solution. 

Anybody know one? 

Thanks for any helpful tips...



[flexcoders] Re: Is there a good log application?

2009-06-27 Thread guy.tomer
That doesn't help unfortunately. I requires either Firebug or using the 
flashlog.txt which has been the problem in the first place

--- In flexcoders@yahoogroups.com, claudiu ursica the_bran...@... wrote:

 Try Thunderbolt maybe suits your needs...
 
 C
 
 
 
 
 
 From: guy.tomer guy.to...@...
 To: flexcoders@yahoogroups.com
 Sent: Saturday, June 27, 2009 9:24:35 PM
 Subject: [flexcoders] Is there a good log application?
 
 
 
 
 
 Hi,
 
 I was wondering if anyone can point me to an easy to use logging application? 
 Looks like Flex used to have one called MiniDebug but it's deprecated.
 
 My problem is that my testers have many difficulties configuring the flash 
 debugger and the flashlog.txt (permissions on vista and other issues), I 
 think something that uses LocalConnection or some JavaScript Target could do 
 the job. Note - I need something that is supported on multiple environments 
 not just firebug on firefox.
 
 Tnx
 Guy





[flexcoders] pause / resume download with URLStream?

2009-06-27 Thread jedierikb
Is it possible to pause / resume downloads with the URLStream object?

Is there a better way to pause / resume downloads in as3?

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/URLStream.html



RE: [flexcoders] Re: Memory Leak in DataServices based App ??

2009-06-27 Thread Alex Harui
Make sure your scenario should be using loitering objects.  As I explain in the 
blog article, many scenarios will get false results using loitering objects.

If you look at the allocation traces for the objects in question, you can then 
consider how those created objects get released so they can be garbage 
collected.

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: Saturday, June 27, 2009 12:25 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Memory Leak in DataServices based App ??





I have gone throw your tutorial on you blog  and I profiled my with. I could 
see so many loitering object hanging around  , I evaluted them based upon the 
method suggetsed on your blog.
Potential  Loitering Obejct which I could see is -

 *   Objects
 *   Strings
On drill down , I found tons of obejct of following :-
  AbstradeDataServies
  NetConnetions
   ManagedObjectPeoxy- It is refering to DataGridItemRenderer

 Worst part is they keep increasing everytime when I load the  data and remove 
it.

I have removed all my custom code and now app is very bare bone.Lately I though 
I could seek help from flexCoders.

- Dharmendra














!










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

 What does the memory profiler say? There's a tutorial on how to use it on 
 my blog.

 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: Friday, June 26, 2009 10:21 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Memory Leak in DataServices based App ??





 Hi All,

 I have very basic application which uses DataSerives over RTMP channel to 
 populate dataGrid , I have not used any user defined component.

 This application has got LOAD data and Remove data Button j! ust to simulate 
 the actual application

 What h! appens , when I click on LOAD data , It loads the data from 
 server(JBOSS) then I Remove all the data and force the GC to run

 If I continuously keep loading and removing the data , memory goes up every 
 time and after some times It reaches to threshold and finally crashes the 
 Browser.

 In actual application as soon as user logs in a dedicated DS destination is 
 created..

 private function createDestination(destName:String):void{
 var remoteServi! ce:RemoteObject = new RemoteObject(DestinationManager);
 remoteService.addEventListener(ResultEvent.RESULT, 
 resultHandler,false,0,true);
 var operation:AbstractOperation = 
 remoteService.getOperation(createDestination);
 operation.send(destName);
 var cs:ChannelSet = new ChannelSet();
 var rtm! pChannel:RTMPChannel = ServerConfig.getChannel(my-rtmp) as 
 RTMPChannel;
 cs.addChannel(rtmpChannel);
 ! ; tradeService = new DataService() ;
 ! ;  nbsp; tradeService.destination=destName;
 tradeService.channelSet = cs;
 }


 Now when user hits on Load data button to load the trade data ...

 public function loadData():void
 {
 var remoteService:RemoteObject = new RemoteObject(filterRemoteVO);
 var operation:AbstractOperation = remoteService.getOperation(loadData);
 tradeService.fill(tradeCollection);
 operation.send(rowData.t! ext ,GUIID);
 tradeList.dataProvider = tradeCollection;

 }


 Remove Dat! a hit I clean all the resource and released collection :-
! 
 public function removeAll():void{
 if(tradeList.dataProvider){
 tradeCollection.source = new Array();
 tradeList.dataProvider.source = new Array();
 tradeList.dataProvider = null;
 }
 tradeService.release();
 nb! sp; ; tradeService.releaseCollection(tradeCollection);
 tradeService.channelSet.disconnectAll();
 tradeService.disconnect();
 tradeService.logout();
 System.gc();
 }

 Except these 3 function I don't have any code which could cause memory leak.

 I m using

 * LCDS 2.5
 * Flex 3.0
 * JBoss4.2

 Please see the mxml file below , If possible please have a look at it , I 
 might not be! using dataSerice API correctly.

 I have been trying to solve this leak for last two week , I really need help 
 from you guys.
 My client has already evaluating other contemporary technology because of 
 this memory issue.

 I have al! so created scalled down war file which can be deployed on any java 
 application server.Just provide your emial Id , Iwill send that to you.

 Any help will greatly be appreciated

 Regards,

 Dam
  MXML##


 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
 creationComplete=init(); height=100% width=100%
 
 mx:Script 
 ![CDATA[
 import mx.containers.GridRow;
 ! import mx.utils.Base64Decoder;
 impor! t mx.uti ls.StringUtil;
 import mx.events.Colle! ctionEvent;
 ! import mx.formatters.Formatter;
 

RE: [flexcoders] dynamic dimension of the page

2009-06-27 Thread Alex Harui
Try to avoid using left, right, top,bottom.  You can use advanced constraints 
if you need to, but try using %width/%height only first

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 anitha2324
Sent: Saturday, June 27, 2009 12:11 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] dynamic dimension of the page





Hi All,

I am making a flex web page the following is some part of this page

mx:VBox id=boxPersonalImages
verticalGap=0
height=80%
width=60%

left=10
bottom=160
horizontalAlign=left

containers:CoverFlowContainer id=SildeOfImges
width=100%
height=100%
horizontalGap=60
borderStyle=none
segments=6
reflectionEnabled=false
/containers:CoverFlowContainer

/mx:VBox


mx:Image id=AdsImagesComponent
width=25%
height=25%
right=10
top=150/
mx:VBox width=100%
height=20%
id=hMsg
backgroundColor=#FF
horizontalCenter=10
bottom=150
mx:TextArea id=customerMessageTextAreaComponent
width=100%
height=100%
fontSize=36
textAlign=center
fontFamily=Times New Roman
wordWrap=true
editable=false borderStyle=none/
/mx:VBox


mx:VBox height=10%
width=50%
id=hLog2
left=30
bottom=25
mx:Label id=shortCodeLabelComponent
width=100%
height=10%
fontSize=50
color=#00/
/mx:VBox
mx:VBox height=10%
width=35%
id=hLog
left=2%
bottom=25
mx:Image id=operatorLogoImageComponent
width=110
height=75/

/mx:VBox

, actually i have completed the page and i have run it on my stystem and it 
works fine , but when i run in another pc
the page did not display correctly and some part of this plage has not been 
displayed because the resolution of this screen is different from the 
resolution of my screen , so how i do fix this issue
so that my page can be displayed correctly regardless of the screen resolution 
, I have tried to use the % like height=34% but not all the properties are 
accepting the % (such top , right)

any one can help to solve this issue



Re: [flexcoders] Is there a good log application?

2009-06-27 Thread Magnus Lassi
Is there any logging framework that has a standard way of sending log
information to a server if you are not using LCDS or BlazeDS i.e using
HttpService or web services?

Thanks,
Magnus

On Sat, Jun 27, 2009 at 1:44 PM, claudiu ursica the_bran...@yahoo.comwrote:



 Try Thunderbolt maybe suits your needs...

 C

 --
 *From:* guy.tomer guy.to...@gmail.com
 *To:* flexcoders@yahoogroups.com
 *Sent:* Saturday, June 27, 2009 9:24:35 PM
 *Subject:* [flexcoders] Is there a good log application?

  Hi,

 I was wondering if anyone can point me to an easy to use logging
 application? Looks like Flex used to have one called MiniDebug but it's
 deprecated.

 My problem is that my testers have many difficulties configuring the flash
 debugger and the flashlog.txt (permissions on vista and other issues), I
 think something that uses LocalConnection or some JavaScript Target could do
 the job. Note - I need something that is supported on multiple environments
 not just firebug on firefox.

 Tnx
 Guy


  



[flexcoders] How do I create in ActionScript what MXML lets me do?

2009-06-27 Thread Raymond Brown
Data can be found at http://www.silenttrace.com/deviceData.xml

Question one - How can I create my list, onList in pure actionscript vice 
mxml?  The reason I want to do this is because I get a null exception 
otherwise.  I imagine its because I am instantiating the itemrenderer before I 
have any data in my arraycollection since a http service call needs to get the 
data.  So I thought if I wait till line 35 and then instantiate the list in 
pure actionscript I am golden.  Can someone let me know if that is possible or 
how I could achieve this?  Things like setting itemChangeEffect and such seem 
to be only in mxml.

Question two ignore the itemRenderer of onList and you will see that I get an 
error ever time I select the zero Item in the list on the left and click the 
addToOffBtn.

here is main code

?xml version=1.0 encoding=utf-8?
mx:WindowedApplicationxmlns:mx=http://www.adobe.com/2006/mxml; 
layout=absolute
 creationComplete=init() width=800 height=600
mx:Script
![CDATA[
import mx.controls.Alert;
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
import mx.effects.easing.*;
import listItemRenderer;
[Bindable] private var devicesOnList:ArrayCollection;
[Bindable] private var devicesOffList:ArrayCollection = new ArrayCollection();
private var indexOfOnList:int = 999;
private var indexOfOffList:int = 999;
[Embed(source=tmbdwnbox.png)] private var downIcon:Class;
[Embed(source=tmbupbox.png)] private var upIcon:Class;
private function init():void {
deviceXML.send();
}
private function setIcon(value:*):Class {
 if (value.CURRENTCONDITION == true) {
return upIcon;
} else {
return downIcon;
} 
}
public function getDeviceDataRequest(event:ResultEvent):void {
devicesOnList = event.result.DEVICES.PROPERTIES;
}
private function addSelectedItemToOffList():void {
if (indexOfOnList != 999) {
trace(index of On list + indexOfOnList);
devicesOffList.addItem(devicesOnList.getItemAt(indexOfOnList));
trace(length off list + devicesOffList.length);
trace(length on list + devicesOnList.length);
devicesOnList.removeItemAt(indexOfOnList);
trace(length off list + devicesOffList.length);
trace(length on list + devicesOnList.length);
moveOffToOnBtn.enabled = true;
if (devicesOnList.length == 1)
moveOnToOffBtn.enabled = false;
}
indexOfOnList = 999;
}
private function addSelectedItemToOnList():void {
if (indexOfOffList != 999) {
trace(index of Off list + indexOfOffList);
devicesOnList.addItem(devicesOffList[indexOfOffList]);
trace(length on list + devicesOffList.length);
trace(length on list + devicesOnList.length);
devicesOffList.removeItemAt(indexOfOffList);
trace(length on list + devicesOffList.length);
trace(length on list + devicesOnList.length);
moveOnToOffBtn.enabled = true;
if (devicesOffList.length == 0)
moveOffToOnBtn.enabled = false;
}
indexOfOffList = 999;
}
private function onListSelectedItemClick(event:Event):void {
//alwas maintain at least one device to listen too.
if (devicesOnList.length != 1) {
indexOfOnList = event.currentTarget.selectedIndex;
}
this.status = Selected on:  + indexOfOnList;
}
private function offListSelectedItemClick(event:Event):void {
indexOfOffList = event.currentTarget.selectedIndex;
this.status = Selected off:  + indexOfOffList;
}
]]
/mx:Script
mx:HTTPService 
id=deviceXML 
url=http://www.silenttrace.com/deviceData.xml; 
result=getDeviceDataRequest(event)/

mx:HBox width=100% height=100%
mx:List itemRenderer=listItemRenderer dataProvider={devicesOnList} 
id=onList width=100% 
selectionColor=blue
 iconFunction=setIcon itemsChangeEffect={itemsChangeEffect}
 itemClick=onListSelectedItemClick(event)/
 mx:VBox
 mx:Button id=moveOnToOffBtn label=Turn Device Off 
click=addSelectedItemToOffList()/
 mx:Button id=moveOffToOnBtn label=Turn Device On 
click=addSelectedItemToOnList() enabled=false/
/mx:VBox
 mx:List id=offList width=100% selectionColor=blue labelField=TITLE 
dataProvider={devicesOffList}
 iconFunction=setIcon itemsChangeEffect={itemsChangeEffect}
 itemClick=offListSelectedItemClick(event)/
/mx:HBox 
!-- why does this effect cause an error when I select the first item in the 
list on the left
every time and click the moveOnToOffBtn.--
mx:Sequenceid=itemsChangeEffect
mx:WipeDown duration=500/
mx:Parallel
mx:Move duration=750 easingFunction={Elastic.easeOut} 
perElementOffset=20/
mx:Blur startDelay=210 blurXFrom=18 blurYFrom=18 blurXTo=0 blurYTo=0 
duration=500 filter=addItem/
/mx:Parallel
/mx:Sequence
/mx:WindowedApplication


Here is itemRenderer

?xml version=1.0 encoding=utf-8?
mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=65 
cornerRadius=10 
borderStyle=solid backgroundAlpha=.3 backgroundColor=#00

mx:Script
![CDATA[
[Bindable] private var aliveDead:Class;
[Embed(source=tmbdwnbox.png)] private var downIcon:Class;
[Embed(source=tmbupbox.png)] private var upIcon:Class;

override public function set data(value:Object):void {
//why is value null??
if (value.CURRENTCONDITION)
aliveDead = upIcon;
else
aliveDead = downIcon;
}
]]

[flexcoders] Flex 3 Exam Cert Question

2009-06-27 Thread ew6014
hi guys,

i have a question on the interacting data source/servers portion of flex 3 exam.

can someone point me to a resource or book that i can find out more on 
IMPLEMENTING LCDS MESSAGING AND DATA MANAGEMENT ?

in the exam guide it also mentions creating connecting to a local database. 
what does that mean? does it mean SQL database or oracle?

appreciate the help