Re: [flexcoders] High CPU usage

2009-05-27 Thread Fotis Chatzinikos
use the debug player, right click and show redraw regions...

I had a similar problems with some animated hidden swfs eating app cpu
cycles by constantly
animating / redrawing even thought they where visible=false

On Wed, May 27, 2009 at 3:04 AM, Rick Winscot rick.wins...@zyche.comwrote:



  How often are you calling invalidateDisplayList()? Are you using effects,
 filters, or skins – and if so... to what extent. Is there data involved?
 What kind and how much? Are the components custom? If so... can you post
 some code for us to look at?

 Obviously, all we can do is ‘stab in the dark’ and hope to hit something
 that resonates. The best would be to post some code for us to take a look
 at.

 Rick Winscot




 On 5/26/09 4:00 PM, Tom McNeer tmcn...@gmail.com wrote:






 Hi,

 Can anyone direct me to resources on how to track/profile/explore CPU usage
 in a Flex app? I've googled without any real success.

 In an app I'm developing, the CPU usage seemed to suddenly shoot up to near
 100%. Now, I'm sure that it didn't happen suddenly; I'm sure I just wasn't
 paying attention.

 But there's nothing apparent going on that should create high usage -- no
 video, no effects -- just some simple forms. I've spent the day commenting
 out pieces to boil the app down to its essence, to try to see where this
 problem is creeping in.

 But it seems to come from multiple components, all of which are fairly
 simple forms, with some validations, some bindings to properties on an
 object being edited -- pretty much, the usual stuff.

 Yet, I'm sitting here looking at the app, trimmed down to where only one of
 these form elements exists within a tabNavigator, and I'm seeing almost 40%
 usage with (apparently) nothing happening.

 There's no memory problem -- the profiler shows maybe 15Mb going to the
 application. But the CPU is going crazy.

 I've tested on several machines, and the high CPU usage is consistent,
 although, of course, the actual percentage varies.

 I don't expect an answer (though I'd love one); I'm just hoping for some
 pointers on how to troubleshoot this.

  




-- 
Fotis Chatzinikos, Ph.D.
Founder,
Phinnovation
fotis.chatzini...@gmail.com,


[flexcoders] Flip the image

2009-05-27 Thread shubhra
Hi ,

In my application i want to implement this effect on images..likewise if a man 
is viewing to left,the flip of image change him to view right.

Please refer me some links .

Thanks,

Shubhra Tiwari



RE: [flexcoders] Flex unloading SFW- memory management

2009-05-27 Thread Alex Harui
Use the profiler to see if anything is keeping a reference to the SWF or 
objects in the SWF.

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 Patrice O
Sent: Tuesday, May 26, 2009 6:07 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex unloading SFW- memory management





Hi all,

I m facing a problem with dynamic loading/unloading of swf. I'm using a
class mycustomSWFLoader which extends SWFLoader and which use an instance
of Loader class to load swf files (graphics data) from serialized SWF in
bytearrays.

All seem to be ok, I can display any of my swf, but the flash player does
not free memory (the previous loaded swf) when I load a new swf.

I have tried this approach :

class myCustomSWFLoader extends SWFLoader {

public function loadSWF(myByteArray: ByteArray):void {

if(_loader != null) {


// Call the unload  stop on _loader object
_loader.unloadAndStop();

// Call the unload  stop on THIS
unloadAndStop();

} else {
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
swfLoaded);

MY_CONTAINER.addChild(this);
}


if(myByteArray)
_loader.loadBytes(myByteArray);
else
source = null;

}
...

I'm not sure about how the flash player handdle the unloadAndStop() but what
is sure is that each time I call my method memory usage increases by 2Mb

Any help would be much appreciated !

Thanks by advance

PatriceO

--
View this message in context: 
http://www.nabble.com/Flex-unloading-SFW--memory-management-tp23721843p23721843.html
Sent from the FlexCoders mailing list archive at Nabble.com.



RE: [flexcoders] How release Memory consumed by DataService

2009-05-27 Thread Alex Harui
If you have data returned from the service hanging around, then those things 
are probably hanging around too.  Use the profiler to figure out who's holding 
on to things.

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: Tuesday, May 26, 2009 1:07 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How release Memory consumed by DataService





Hello All,
dataService.release();
dataService.dissconnect()
dataService.logout();

I am using above set of codes to release resources consumed by Data Service.
but I was surprised to see that even after running above code memory 
consumption is not coming down.

During profiling I found lot of loitering obeject named
ManagedObject, ProxyObject , AsynchToken etc ..

I belive they are all created by DataService , i am wondering why they are not 
gettig destroyed when dataService itself is disconnected.

Please suggest me the ways to release all resources consumend by DataService

I m using LCDS 2.6 with RTMP channel.

Regards,
Dharmendra



[flexcoders] Setting Up RTMP Failover Mechanism ( LCDS Jboss )

2009-05-27 Thread wakouaq
Hello everyone,

I've been struggling with the classic problem of rtmp connections failing to 
function because of a few clients specific proxy / firewall configuration. 
After lurking the adobe blogs, coder articles and documentation, i've ran out 
of ideas on how to get rtmp fallback to rtmpt tunneling.


As I understood recently, the rtmp fallback mechanism is not automatic
and need a wee bit of tweaking (seen on 
http://www.infoaccelerator.net/blog/post.cfm/setting-up-rtmpt-failover-on-lcds).
yet, I cannot get to work the setup described in the article.

here is our services-config :

!-- NIO based endpoints --
channel-definition id=my-rtmp class=mx.messaging.channels.RTMPChannel
endpoint url=rtmp://{server.name}:2043 
class=flex.messaging.endpoints.RTMPEndpoint/
properties
connection-idle-timeout-minutes0/connection-idle-timeout-minutes
block-rtmpt-polling-clientstrue/block-rtmpt-polling-clients
/properties
/channel-definition

   
channel-definition id=my-rtmpt class=mx.messaging.channels.RTMPChannel
endpoint url=rtmpt://{server.name}:80 
class=flex.messaging.endpoints.RTMPEndpoint/
properties
block-rtmpt-polling-clientsfalse/block-rtmpt-polling-clients
idle-timeout-minutes20/idle-timeout-minutes
/properties
/channel-definition


before event thinking of setting up the fallback mechanism, I'm trying to have 
the connections working through the my-rtmpt channel and it fails.
The classic rtmp channel works perfectly and we've never had any problem with 
it (before).

I've tried to define the rtmpt channel with no ports specificaly bound; 
I've also tried to explicitly bind it to port 80 (like in the configuration 
above) and set the jboss server.xml default web instance to 8081 but it also 
fails (or by keeping it on 8080).

I'm starting to seriously run out of options here so if anyone could help me 
i'd be greatly appreciative. 
If you don't have time to help, any link to a related post would be greatly 
appreciated, or even better : a working example of a correct setup of rtmp 
fallback mechanism.

Thank you for your time and thanks in advance for the help.






Re: [flexcoders] Re: flash.* packages not found on linux FlexBuilder

2009-05-27 Thread thomas parquier
Hi,

My linux flexbuilder also removes some flash.* imports :
flash.display.Sprite import doesnt get remove whereas flash.display.Graphics
does.
But there's no playerglobal.swc to replace in the air app projetc I'm
working on.

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/5/15 Oliver Merk olive...@yahoo.com



 Are you using the 3.3 SDK? If so, here's the fix:

 Under Project Properties  Flex Build Path  Library Path, remove the
 playerglobal.swc under the framework SDK. Click Add SWC and find the
 player global SWC for Player *9* in the 3.2 SDK (assuming you've got it
 somewhere). For example, /frameworks/libs/player/9/playerglobal.swc.

 Clean the project and you should see everything working again.


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Thierry
 V. titi2...@... wrote:
 
  Hello !!
 
  I'm on Ubuntu Intrepid ibex. I installed Java, Eclipse and the
  FlexBuilder plugin.
  First I have many problems when I compile, with out of memory
 errors...
  Even I change the vmargs with Xmx=1024M the result is the same... But
  it's not the main problem...
 
  I have some problems with the flash package...
  If I write import flash. only errors package is displayed with
  autocompletion. After that, when I use autocompletion in my class, it
  remove all flash packages not found from the import list.
 
  Example :
 
  I have
 
  import mx.collections.ArrayCollection;
  import flash.display.Sprite;
  import flash.display.DisplayObject;
  import flash.utils.Timer;
  import flash.events.Event;
  import flash.events.KeyboardEvent
 
  in the header of a class. If I use autocompletion, FlexBuilder remove
  all flash imports, and I'll have only the
 mx.collections.ArrayCollection
  import. So when I launch compilation, I have some errors due to
 missing
  imports.
 
  If anyone has a solution... Thanks in advance.
 
  Thierry aka titouille
 

  



Re: [flexcoders] Flex DataGrid Filter via Popup Window

2009-05-27 Thread Angelo Anolin
Hi Tracy, 

Thanks for your help to a newbie like me. Learning a lot from this group.

I found another implmentation of the datagrid searching, although some of the 
codes are all so NEW to me.
http://blog.flexexamples.com/2008/03/12/using-a-combobox-to-filter-items-in-a-datagrid-in-flex/

But I think this one is much better - Search and Filtering.
http://blog.sbistram.de/2009/01/14/flex-enhanced-search-flex3-datagrid/

Althoug on the second one (Search and Filtering), when I try to read the codes, 
I don't know which I should just get.
Basically, I just need the filter/search functionality for the datagrid.

Thanks.




From: Tracy Spratt tr...@nts3rd.com
To: flexcoders@yahoogroups.com
Sent: Wednesday, 27 May, 2009 11:27:49
Subject: RE: [flexcoders] Flex DataGrid Filter via Popup Window





var winFilter:FilterDia log = PopUpManager. createPopUp( this, FilterDialog, 
true) as FilterDialog;
winFilter.dg = myDataGrid.
 
In FilterDialog, expose “dg” as a public property using a setter function.
 
Tracy Spratt,
Lariat Services, development services available



From:flexcod...@yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On 
Behalf Of Angelo Anolin
Sent: Monday, May 25, 2009 8:18 PM
To: flexcod...@yahoogro ups.com
Subject: Re: [flexcoders] Flex DataGrid Filter via Popup Window
 




Hi Tracy,
 
Care to show some example codes on how to pass the datagrid reference?
Thanks.
 
Kind regards,
Angelo
 



From:Tracy Spratt tr...@nts3rd. com
To: flexcod...@yahoogro ups.com
Sent: Monday, 25 May, 2009 22:49:54
Subject: RE: [flexcoders] Flex DataGrid Filter via Popup Window
Of course, there are many ways to do this, but one simple approach would be to 
pass a reference to the dataGrid into the pop-up.  That would give you access 
to the DG.columns array to populate your columns ComboBox.
 
Tracy Spratt,
Lariat Services, development services available



From:flexcod...@yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On 
Behalf Of Angelo Anolin
Sent: Monday, May 25, 2009 10:07 AM
To: flexcod...@yahoogro ups.com
Subject: Re: [flexcoders] Flex DataGrid Filter via Popup Window
 



Some updates on this.

Instead of the codes inside a function, what I did was create a custom MXML 
Component (selecting File | New | MXML Component) and selecting TileWindow on 
the Based As dropdown list.

In the button, I created a function that calls the MXML component via the 
following codes:

private function launchFilterDialog( ) :void
{
  var winFilter:FilterDia log = PopUpManager. createPopUp( this, FilterDialog, 
true) as FilterDialog;
  PopUpManager. centerPopUp( winFilter) ;
}

Next step is to be able to pass the column names as defined in the datagrid and 
bind those column names into the combo box which I placed in the MXML component.

So I am left with the following things to do:

1. Get the column names of the datagrid which is in the calling flex 
application.
2. Pass those column names into the MXML component and bind them into the combo 
box.
3. When a selection is made on the filter dialog window and valid filter is 
specified, clicking on the OK button would filter the datagrid of the calling 
flex application.
4. A clear button would clear the filter(s) specified on the datagrid.

Inputs would be highly appreciated in doing Item no. 1

Thanks.
 



From:Angelo Anolin angelo_anolin@ yahoo.com
To: flexcod...@yahoogro ups.com
Sent: Monday, 25 May, 2009 15:48:25
Subject: [flexcoders] Flex DataGrid Filter via Popup Window

Hello FlexCoders,

I am trying to implement a datagrid filtering mechanism to datagrids in my 
application.

In this process, I want to show a popup window where it would act like a 
response window.  The popup window will contain three controls, namely, two 
comboboxes, and a textinput control.  One of the combo box would contain the 
columns currently displayed in the datagrid.  The other combo box would contain 
common comparison operators (i.e. =, !=, , , like, etc.). Of course, there 
would also be two buttons - OK and Cancel to perform the filter operations.

I found a popup panel example here..
http://blog. flexexamples. com/2007/ 08/06/creating- custom-pop- up-windows- 
with-the- popupmanager- class/

But in this example, he is defining the content of the popup panel.

Since we know that the controls in the popup panel is fixed, would it be 
possible to just create another control which contains the controls we have 
defined?  Then, the combobox panel would be populated with the columns in the 
datagrid where it was called. When the column selection from the combo box is 
made, the operator also selected and the text input is filled up with the value 
to filter, clicking on OK button would filter the datagrid.

Another reason that I wanted that the filter mechanism reusable because I have 
a lot of mxml with datagrid that 

[flexcoders] Re: Print examples?

2009-05-27 Thread Tony Obermeit
Thanks Rick, that helped.  I had not been adding the argument to addObject
that specified a scaling. (In this case i used MATCH_WIDTH).

However, I'm printing a text area and the scaling didn't do what I expected,
it just truncated anything that was wider than the page width.  What I'm
hoping for is a component that will wrap the text within a paragraph
according to the page width.  And be able to change / specify a single font.

Any further advice greatly appreciated.

Tony

If you want to print a sub-set of you text... You are going to need to
select the appropriate text ­ transfer to a temporary container and use the
temporary container as an argument for the PrintJob.addObject(). Remember
that in order to print what you see ­ you must see what to print. This is
essentially the context of the first paragraph in livedocs...

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

Rick Winscot

On 5/23/09 4:17 AM, Tony Obermeit t...@tamborine.to wrote:







 I'm looking for examples of how to print a single paragraph of text in
flex
 where I can chose the font and rely on word wrap on page margins.  The few
 examples I've found show grids, anyone help really appreciated.

 tony






Re: [flexcoders] LCDS async error

2009-05-27 Thread Johannes Nel
Since Jeff has left Adobe, can someone from Adobe please check the source
code on this.

We are using build 2.6.0.201390 of the fds.swc.






On Tue, May 26, 2009 at 11:13 AM, Johannes Nel johannes@gmail.comwrote:

 No, tis not 1, all our error handeling uses FaultEvent.

 How I would have approached this with other parts of the framework.
 Copy the adobe class into my src folder, make the change needed to avoid
 the error and let my changed class override the adobe implementation at
 compile time (what are the implications for this with split framework rsl?),
 obviously this is not an option now.

 :(




 On Mon, May 25, 2009 at 7:28 PM, Jeffrey Vroom j...@jvroom.com wrote:



 I see two possible things that could cause this error:

 1) you have a fault handler whose function definition takes a
 MessageFaultEvent parameter.  You need to change that to the common base
 class which is (I think) a FaultEvent so it can accept both a
 MessageFaultEvent and a DataServiceFaultEvent.
 2) there is a bug in LCDS where it is doing 1).

 If you check your code and you don't have any event handlers which take a
 MessageFaultEvent, it is probably 2).   I don't have access to the source
 anymore or I'd check into 2) for you...

 Jeff


 On Mon, May 25, 2009 at 5:17 AM, Johannes Nel johannes@gmail.comwrote:



 Hi All

 I have a LCDS app which must stay open for ages, deal with dodgy internet
 connections and all such fun things.
 Thus far we have managed to get the NetConnection to re-establish itself
 nicely when the line drops, but here is a wonderful error (which does not
 actually break the app) that i get after having the app open for a few
 hours,  only on OS X.

 So, the fact that it does not touch our code anywhere means that I have
 no way of trapping this. I would really like some advice on how i can
 suppress or even catch it.



 TypeError: Error #1034: Type Coercion failed: cannot convert
 mx.data.events::dataservicefaultev...@2cb864c1 to
 mx.messaging.events.MessageFaultEvent.
 at mx.data::ConcreteDataService/sendRefreshFault()
 at mx.rpc::AsyncResponder/fault()
 at mx.rpc::AsyncToken/
 http://www.adobe.com/2006/flex/mx/internal::applyFault()http://www.adobe.com/2006/flex/mx/internal::applyFault%28%29
 at mx.rpc.events::FaultEvent/
 http://www.adobe.com/2006/flex/mx/internal::callTokenResponders()http://www.adobe.com/2006/flex/mx/internal::callTokenResponders%28%29
 at mx.data::ConcreteDataService/
 http://www.adobe.com/2006/flex/mx/internal::dispatchFaultEvent()http://www.adobe.com/2006/flex/mx/internal::dispatchFaultEvent%28%29
 at DataListRequestResponder/fault()
 at mx.rpc::AsyncRequest/fault()
 at NetConnectionMessageResponder/channelDisconnectHandler()
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at mx.messaging::Channel/disconnectSuccess()
 at mx.messaging.channels::NetConnectionChannel/internalDisconnect()
 at mx.messaging.channels::RTMPChannel/internalDisconnect()
 at mx.messaging.channels::RTMPChannel/statusHandler()

 regards
 Johan
 --
 j:pn
 \\no comment


  




 --
 j:pn
 \\no comment




-- 
j:pn
\\no comment


Re: [flexcoders] Cause Label to resize after setting text

2009-05-27 Thread thomas parquier
Hi,

Label and Text resizement/measurement implementation doesn't seem very
simple to me, but I managed to get Label width updated after
validateNow().

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/5/27 Tracy Spratt tr...@nts3rd.com



  I am implementing a Marquee component using a Canvas and a Move effect on
 a child label.



 I want the effect to play only when the label is wider than the canvas.



 When a setter function sets the Label’s text property, the label has not
 been resized to fit the new text yet, so I can’t test:

 if (myLabel.width  this.width)

 in the setter



 I have not yet found the right invalidation, or event or override to
 trigger my measure logic.  Any suggestions?



 Tracy Spratt,

 Lariat Services, development services available


  



Re: [flexcoders] High CPU usage

2009-05-27 Thread Tom McNeer
Rick and Fotis,

Thanks for your suggestions. It was the fact that none of the
visual/redrawing actions you discuss were going on that mystified me. The
problem was elsewhere.

And Rick, I didn't post code because the problem seemed to involve the
interaction of a whole stack of view components.

The problem, however, was not in the Flex application at all, but rather in
some other things that were going on with the machine. What appeared to be a
rather constant high usage from Flex was in fact a rather normal spike in
CPU usage from the Flex app, that under normal conditions would be
momentary. Other processes were causing the Flex app to hang fire, making it
seem as if Flex was creating a constant load.

Thanks again for your suggestions. And I apologize for misinterpreting the
problem.

But ... it was a messy problem. Just glad I finally figured out what was
happening.


-- 
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560


Re: [flexcoders] Tree Structure in advanced data grid

2009-05-27 Thread Adrian Williams

take a look at adg.expandAll

this will expand all the available nodes in your grouping collection.

-adrian

senthilkumarirtt wrote:



hi all,I need to expand the tree structure (in advanced 
datagrid)automatically when application loaded

Give some ideas to implement this...

Thanks in advance,
S.Senthilkumar




Re: [flexcoders] Re: flash.* packages not found on linux FlexBuilder

2009-05-27 Thread Thierry Vionnet
Hi Oliver

Thanks for the tips. I use the 3.2 sdk. I try your suggestion, and it works
when I use the player/9/ swc

Thierry

2009/5/15 Oliver Merk olive...@yahoo.com



 Are you using the 3.3 SDK? If so, here's the fix:

 Under Project Properties  Flex Build Path  Library Path, remove the
 playerglobal.swc under the framework SDK. Click Add SWC and find the
 player global SWC for Player *9* in the 3.2 SDK (assuming you've got it
 somewhere). For example, /frameworks/libs/player/9/playerglobal.swc.

 Clean the project and you should see everything working again.


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Thierry
 V. titi2...@... wrote:
 
  Hello !!
 
  I'm on Ubuntu Intrepid ibex. I installed Java, Eclipse and the
  FlexBuilder plugin.
  First I have many problems when I compile, with out of memory
 errors...
  Even I change the vmargs with Xmx=1024M the result is the same... But
  it's not the main problem...
 
  I have some problems with the flash package...
  If I write import flash. only errors package is displayed with
  autocompletion. After that, when I use autocompletion in my class, it
  remove all flash packages not found from the import list.
 
  Example :
 
  I have
 
  import mx.collections.ArrayCollection;
  import flash.display.Sprite;
  import flash.display.DisplayObject;
  import flash.utils.Timer;
  import flash.events.Event;
  import flash.events.KeyboardEvent
 
  in the header of a class. If I use autocompletion, FlexBuilder remove
  all flash imports, and I'll have only the
 mx.collections.ArrayCollection
  import. So when I launch compilation, I have some errors due to
 missing
  imports.
 
  If anyone has a solution... Thanks in advance.
 
  Thierry aka titouille
 

  



Re: [flexcoders] String To Date Conversion

2009-05-27 Thread Manish Jethani
On Tue, May 26, 2009 at 6:17 PM, yogesh patel
mailtoyogeshpa...@yahoo.in wrote:

   I have a String like Tue May 26 18:12:55 IST 2009. How to
 convert this string into Date object ?

 var s:String = Tue May 26 18:12:55 IST 2009;
  s = s.replace(/IST/, UTC+0530);
  var d:Date = new Date(Date.parse(s));
  trace(d);

Manish


[flexcoders] Flex Builder makes my app freeze

2009-05-27 Thread seanclarkhess
I'm at a complete loss here. I have a legacy app, written in flex 2 using the 
sdk, that I'm trying to get compiling in flex builder. It was always compiled 
using mxmlc before. 

When I compile the project in Flex Builder, it freezes the browser when it 
initializes. If I compile it with mxmlc, it works fine. I've tried commenting 
out some of the scarier parts of the app, and have only ever gotten it working 
once, after I had commented out nearly everything. I tried doing it again and 
it still froze. 

Has anyone run into something similar? I'm totally shooting in the dark here.

Thanks
~sean



Re: [flexcoders] String To Date Conversion

2009-05-27 Thread Tom Chiverton
On Wednesday 27 May 2009, Manish Jethani wrote:
   var d:Date = new Date(Date.parse(s));

Note Date.parse() has issues: 
http://www.rachaelandtom.info/content/could-go-my-head-ya-know

-- 
Helping to confidentially maximize cross-platform bricks-and-clicks 
interactive cross-media meta-services as part of the IT team of the year, '09 
and '08

Tom Chiverton
Developer
Tel: +44 0161 618 5032
Fax: +44 0161 618 5099 
tom.chiver...@halliwells.com
3 Hardman Square, Manchester, M3 3EB
www.Halliwells.com



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of 
members is available for inspection at the registered office together with a 
list of those non members who are referred to as partners. We use the word 
?partner? to refer to a member of the LLP, or an employee or consultant with 
equivalent standing and qualifications. Regulated by the Solicitors Regulation 
Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged. If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents. If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.Halliwells.com.
 

Re: [flexcoders] wmode=transparent and accessibility does it work?

2009-05-27 Thread Greg Hess
Thanks for the info Matt, much appreciated!

Cheers,

Greg


On Tue, May 26, 2009 at 6:31 PM, Matt May matt...@adobe.com wrote:


 It does not work. Without getting into too much detail, transparent Flash
 objects can’t expose accessibility data because they’re embedded in the HTML
 document differently, and they can’t express the MSAA data needed.

 The same is true for wmode=opaque, by the way. The only supported way is
 wmode=window, which is the default. It’s not a bug, per se; it’s a
 fundamental limitation of the mode.

 However, it is possible to use something like FlashAid to test for the
 presence of assistive technology before loading the page, and then set
 wmode=window on subsequent pages if AT is in use.

 -
 m


 On 5/26/09 3:12 PM, Greg Hess flexeff...@gmail.com wrote:






 Hi Folks,

 I have been reading many posts on issues with screen readers(JAWS)
 when using the wmode=transparent|opaque, basically they state
 accessibility does not work with transparent or opaque flash
 applications. The posts are all over a year old and I am unable to
 find an adobe bug on it... as such I am not certain there is an issue
 or if it has been resolved.

 Does anyone know if accessibility works with transparent flash apps?

 Any help much appreciated,

 Greg

 




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

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

* Your email settings:
Individual Email | Traditional

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

* To change settings via email:
mailto:flexcoders-dig...@yahoogroups.com 
mailto:flexcoders-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
flexcoders-unsubscr...@yahoogroups.com

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



Re: [flexcoders] Is there a way to pass a parameter into my preloader?

2009-05-27 Thread Manish Jethani
On Tue, May 26, 2009 at 11:49 PM, luvfotography
ygro...@all-digital-links.com wrote:
 I've created a preloader class, and is there a way to pass a parameter into 
 my preloader?


 Here is my application tag:

 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
                 applicationComplete=appInit()
                 layout=absolute
                 preloader=com.mysite.preloader.SSProgressBarNoWait

What kind of parameter is this?

I don't see a direct way to pass any parameters. The preloader object
(which is set in your IPreloaderDisplay's preloader property) is a
child of the SystemManager, so you could maybe work your way up to the
SystemManager get the URL parameters from there.

  preloader.parent.loaderInfo.parameters.myParameter.

Manish


Re: [flexcoders] Re: NEED more than 15 menu item in Context Menu ????

2009-05-27 Thread Tom Chiverton
On Monday 25 May 2009, Dharmendra Chauhan wrote:
 Any other UI components can be used to get similar functionality.

Well, I don't know your use case, but right click menus have low 
discoverability from a user experience point of view, so it might be an idea 
to remove the problem by using a different UI approach altogether.

-- 
Helping to collaboratively entrench frictionless high-yield synergistic 
impactful functionalities as part of the IT team of the year, '09 and '08

Tom Chiverton
Developer
Tel: +44 0161 618 5032
Fax: +44 0161 618 5099 
tom.chiver...@halliwells.com
3 Hardman Square, Manchester, M3 3EB
www.Halliwells.com



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of 
members is available for inspection at the registered office together with a 
list of those non members who are referred to as partners. We use the word 
?partner? to refer to a member of the LLP, or an employee or consultant with 
equivalent standing and qualifications. Regulated by the Solicitors Regulation 
Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged. If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents. If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.Halliwells.com.
 

Re: [flexcoders] URLLoader + Binary != URLStream

2009-05-27 Thread Manish Jethani
On Wed, May 27, 2009 at 2:14 AM, Stephen More stephen.m...@gmail.com wrote:
 I would think that I could load a swf using either URLLoader or
 URLStream. As it turns out only my URLStream is returning the correct
 data.
 Can anyone provide a fix to the following code that makes URLLoader
 work correctly ?

[...]

Why are you calling writeObject() in the case of the URLLoader? You
should call writeBytes() instead. writeObject() is for objects, not
raw bytes

Manish


Re: [flexcoders] Cause Label to resize after setting text

2009-05-27 Thread Manish Jethani
On Wed, May 27, 2009 at 9:17 AM, Tracy Spratt tr...@nts3rd.com wrote:

[...]


 When a setter function sets the Label’s text property, the label has not
 been resized to fit the new text yet, so I can’t test:

 if (myLabel.width  this.width)

 in the setter


 I have not yet found the right invalidation, or event or override to trigger
 my measure logic.  Any suggestions?

You should try calling validateNow() on the Label object.

Either that, or call your own invalidateDisplayList() and let
updateDisplayList() take care of triggering the effect.

  public function set marqueeText(value:String):void
  {
  if (label.text != value) {
  label.text = value;

  invalidateDisplayList();
  }
  }

  override protected function updateDisplayList(...):void
  {
// do the effect here if necessary
  }

Manish

-- 
www.manishjethani.com




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

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

* Your email settings:
Individual Email | Traditional

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

* To change settings via email:
mailto:flexcoders-dig...@yahoogroups.com 
mailto:flexcoders-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
flexcoders-unsubscr...@yahoogroups.com

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



Re: [flexcoders] High CPU usage

2009-05-27 Thread Rick Winscot
Tom ­ no problem. If you find that this is highly reproducible I¹d be
interested to know how the operating system Œdrag¹ is generated.

Rick Winscot


On 5/27/09 9:00 AM, Tom McNeer tmcn...@gmail.com wrote:

  
   
 
   
 
 Rick and Fotis,
 
 Thanks for your suggestions. It was the fact that none of the visual/redrawing
 actions you discuss were going on that mystified me. The problem was
 elsewhere.
 
 And Rick, I didn't post code because the problem seemed to involve the
 interaction of a whole stack of view components.
 
 The problem, however, was not in the Flex application at all, but rather in
 some other things that were going on with the machine. What appeared to be a
 rather constant high usage from Flex was in fact a rather normal spike in CPU
 usage from the Flex app, that under normal conditions would be momentary.
 Other processes were causing the Flex app to hang fire, making it seem as if
 Flex was creating a constant load.
 
 Thanks again for your suggestions. And I apologize for misinterpreting the
 problem. 
 
 But ... it was a messy problem. Just glad I finally figured out what was
 happening.
 



[flexcoders] Re: Flex Builder makes my app freeze

2009-05-27 Thread seanclarkhess
Ok, this is getting more strange. I commented EVERYTHING out, and it still 
froze, so I created a new flex 2 app. It froze. 

Just to make sure I wasn't insane, I created an entirely new project, switched 
the sdk to Flex 2 hotfix 3 and it froze again. 

Is something missing in my FB install? I'm currently redownloading the flex 2 
sdk to see if mine is corrupt or something like that. 



Re: [flexcoders] Flex unloading SFW- memory management

2009-05-27 Thread Manish Jethani
On Tue, May 26, 2009 at 6:36 PM, Patrice O p...@keepcore.com wrote:

 I m facing a problem with dynamic loading/unloading of swf. I'm using a
 class mycustomSWFLoader which extends SWFLoader and which use an instance
 of Loader class to load swf files (graphics data) from serialized SWF in
 bytearrays.

 All seem to be ok, I can display any of my swf, but the flash player does
 not free memory (the previous loaded swf) when I load a new swf.

Your SWF has to do a number of things before it can be unloaded:

 1.  Stop any running timers
 2.  Remove any 'enterFrame' event listeners
 3.  Close any open network connections
 4.  Remove any objects added to the stage
 5.  Remove any event listeners from the stage
 6.  Call dispose() on any BitmapData objects
 7.  Stop any sound that's playing and close the stream

Etc.

unloadAndStop() does some of this. But some of it you have to do on
your own. For instance, you'll have to remove any event listeners or
any other references to objects inside your SWF on your own.

I had made an API for this for my entire application.

http://tech.groups.yahoo.com/group/apollocoders/message/2766

Manish

-- 
www.manishjethani.com


Re: [flexcoders] High CPU usage

2009-05-27 Thread Tom McNeer
Rick,


|| I’d be interested to know how the operating system ‘drag’ is ||
 generated.






Let me just say that it had nothing to do with Flex. It was a purely local
problem on my machine, not something that would translate. Basically, I was
having to develop (temporarily) on a machine that just had too many things
going on. With the Flex app, FlexBuilder and Charles kicking up, it was just
too much.




-- 
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560


RE: [flexcoders] Digest Number 10715

2009-05-27 Thread Merrill, Jason
Tim Rowe wrote: The use of 'VO's in Flex has always confused me,
largely because as everyone I've spoken to has explained it, all a
'Value' object is is just a Model object - therefore WTF are they being
referred to as 'VO's when 'Object' (or Model object) would suffice.

 

Tim, I have always thought of a model and a VO or DTO differently.  I
think this is a good quick explanation: 
http://en.wikipedia.org/wiki/Data_Transfer_Object 

 

From an MVC perspective, I think a model class contains information
sure, but it can and often does contain methods to run logic on data, to
retrieve data, to broadcast that data is ready or changed, etc. 

 

A Value Object (VO) or Data Transfer Object (DTO) - (two terms for the
same thing, I usually call them VOs because you don't always transfer
them per se) are simple classes that only contain properties that can be
get and/or set.  They do not contain methods, constructors, or any other
form of logic.  They are dumb in a sense, only serving as information
repositories.  There is good logic in this I think.  I use them all the
time.  And I don't think they are only for moving data around in, they
are useful in single session storing of information.  So often a model
contains references to (say in as a property which could be the VO
directly or several in an Array or ArrayCollection) and also may change
data within VOs, as well as broadcast when something changes.

 

That's my perspective anyway.  

 

 

Jason Merrill 



Bank of  AmericaGlobal Learning 

Shared Services Solutions Development 


Monthly meetings on the Adobe Flash platform for rich media experiences
- join the Bank of America Flash Platform Community
http://sharepoint.bankofamerica.com/sites/tlc/flash/default.aspx  

attachment: image001.jpg

[flexcoders] Calling invalidateProperties during validateProperties

2009-05-27 Thread reflexactions
It seems that if during the validateProperties call,l I change some random 
properties and one of them calls invalidateProperties() in order to complete 
processing during the next commmitProperties() phase, the commitProperties 
never runs. 
This is because at the end of processing the initial validateProperties the 
invalidation flag is cleared so blocking the next commitProperties from running.

Is that right and how to work around it for general properties.


tks
 



Re: [flexcoders] Calling invalidateProperties during validateProperties

2009-05-27 Thread Manish Jethani
I think normally if changing property1 also calls for a change in
property2, that change should happen in the setter for property1. Then
both properties get committed in commitProperties()

If your situation is special and you can't follow that pattern, you
can try a callLater() on invalidateProperties()


On 5/27/09, reflexactions reflexacti...@yahoo.com wrote:
 It seems that if during the validateProperties call,l I change some random
 properties and one of them calls invalidateProperties() in order to complete
 processing during the next commmitProperties() phase, the commitProperties
 never runs.
 This is because at the end of processing the initial validateProperties the
 invalidation flag is cleared so blocking the next commitProperties from
 running.

 Is that right and how to work around it for general properties.


 tks




 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location:
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links





-- 
Sent from my mobile device


[flexcoders] Re: Calling invalidateProperties during validateProperties

2009-05-27 Thread reflexactions
Well an example would be where there say half a dozen related properties that 
get set, these individualy call invalidateProperties and will then be 
collectively processed in commitPorperties on the next frame.

In that processing events are raised to notify changes, however the handlers 
for those events could lead to other properties being set that in turn will 
call invalidateProperties which of course fails.

The thing is I have no idea when that situation will happen as its ooutside my 
component and in any particular call to invalidateProperties there is nothing I 
can check to say 'oh I am already in commitProperties so I need to use 
callLater or smtg'.

At the moment I have tried to fix it by overriding validateProperties and 
setting a flag called inCommitProperties and then overriding 
invalidateProperties and if the flag is set I then either use a callLater or 
set another flag needToCommitAgain which I then check at the end of 
validateProperties and if set I run commitProperties again.

But its a bit of a hack and I wondered what others are doing 
 

--- In flexcoders@yahoogroups.com, Manish Jethani manish.jeth...@... wrote:

 I think normally if changing property1 also calls for a change in
 property2, that change should happen in the setter for property1. Then
 both properties get committed in commitProperties()
 
 If your situation is special and you can't follow that pattern, you
 can try a callLater() on invalidateProperties()
 
 
 On 5/27/09, reflexactions reflexacti...@... wrote:
  It seems that if during the validateProperties call,l I change some random
  properties and one of them calls invalidateProperties() in order to complete
  processing during the next commmitProperties() phase, the commitProperties
  never runs.
  This is because at the end of processing the initial validateProperties the
  invalidation flag is cleared so blocking the next commitProperties from
  running.
 
  Is that right and how to work around it for general properties.
 
 
  tks
 
 
 
 
  
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Alternative FAQ location:
  https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
  Search Archives:
  http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
 
 
 
 
 
 -- 
 Sent from my mobile device





[flexcoders] Successive Videos Display

2009-05-27 Thread bharat_00001
My app needs to play multiple videos in succession. Can anyone guide on a good 
way to buffer the next video while current one is playing?



[flexcoders] Re: URLLoader + Binary != URLStream

2009-05-27 Thread wrhinfl
In loadercomplete function, do you want 
 rawBytes.writeObject( loader.data );

Or do you want
 rawBytes.readObject( loader.data );
--- In flexcoders@yahoogroups.com, Stephen More stephen.m...@... wrote:

 I would think that I could load a swf using either URLLoader or
 URLStream. As it turns out only my URLStream is returning the correct
 data.
 Can anyone provide a fix to the following code that makes URLLoader
 work correctly ?
 
 import flash.net.URLLoader;
 import flash.net.URLLoaderDataFormat;
 import flash.net.URLRequest;
 import flash.net.URLStream;
 
 private var loader:URLLoader;
 private var stream:URLStream;
 
 private function init():void
 {
 loader = new URLLoader();
 loader.dataFormat = URLLoaderDataFormat.BINARY;
 loader.addEventListener(Event.COMPLETE, loaderComplete);
 loader.load( new URLRequest( Slide1.swf ) );
 
 stream = new URLStream();
 stream.addEventListener(Event.COMPLETE, streamComplete);
 stream.load( new URLRequest( Slide1.swf ) );
 
 }
 
 private function streamComplete(event:Event):void {
 
 var rawBytes:ByteArray = new ByteArray();
 stream.readBytes( rawBytes, rawBytes.length );
 trace( Length:  + rawBytes.length );
 
 dumpData( rawBytes );
 }
 
 private function loaderComplete(event:Event):void {
 
 var rawBytes:ByteArray = new ByteArray();
 rawBytes.writeObject( loader.data );
 trace( Length:  + rawBytes.length );
 
 dumpData( rawBytes );
 }
 
 private function dumpData( ba:ByteArray )
 {
 ba.position = 0;
 var index:int = 0;
 var tracer:int;
 while( ba.position  5)
 {
 tracer = ba.readByte();
 trace( index + :  + tracer.toString(16));
 index = index + 1;
 }
 }





[flexcoders] Re: Value Objects

2009-05-27 Thread jgamacheteam345
Partly this reads like a troll, but assuming this is genuine, this is how I 
read your question below (and obviously I could be wrong):

Gee, I've come from a background of building houses.  I'm trying to learn this 
stuff you all use to build tall buildings.  What is the advantage of all that 
stuff?  I never had to do that to build a house and it is pissing me off...

Your right, you don't need to use DTOs/VOs to build a house.  If you only 
need/want to keep building houses don't use them.  If you need/want to build 
scalable, distributed systems, then I'd suggest you keep asking questions, but 
maybe switch your tone a bit

--- In flexcoders@yahoogroups.com, mikeashields mikeashie...@... wrote:

 Yes, the nomenclature is disconcerting.  I reviewed your link however am 
 unfamiliar with java/jsp and thus couldn't necessarily follow.  
 
 Nonetheless it seemed to say that mapping flex properties to the database 
 properties (returned via jsp/cfusion) offers various advantages -- mostly 
 related to strict typing.  
 
 Fair enough, but insofar as by using Stored Procedures I (think I) am able to 
 push a great deal of the BizLogic/ControllerLayer right to the database (ie 
 NOT the cfusion or even Flex/ViewLayer), what the hell do I care???
 
 I'm so newbie that I hesitate to presume/assert anything but A.) this VO 
 stuff is really boggling/pissing me off and B.) isn't it an imposition to 
 make the view/Flex process/organize the returned data?  Why not just throw 
 results into sharedObjects (aka Flash cookies) on the hard drive?
 
 Maybe I'm missing something . . .





Re: [flexcoders] Re: Calling invalidateProperties during validateProperties

2009-05-27 Thread Manish Jethani
On Wed, May 27, 2009 at 11:10 PM, reflexactions reflexacti...@yahoo.com wrote:
 Well an example would be where there say half a dozen related properties that 
 get set, these individualy call invalidateProperties and will then be 
 collectively processed in commitPorperties on the next frame.

 In that processing events are raised to notify changes, however the handlers 
 for those events could lead to other properties being set that in turn will 
 call invalidateProperties which of course fails.

I don't know if dispatching events from commitProperties(), measure(),
updateDisplayList(), etc., is supported. Maybe somebody from the Flex
team can throw some light on this.

I would use callLater() to dispatch that event.

My $0.02.

Manish


Re: [flexcoders] Successive Videos Display

2009-05-27 Thread Manish Jethani
On Wed, May 27, 2009 at 6:20 PM, bharat_1 bharat_00...@yahoo.com wrote:
 My app needs to play multiple videos in succession. Can anyone guide on a 
 good way to buffer the next video while current one is playing?

Perhaps a good way to do this would be to create multiple VideoDisplay
instances with the autoPlay property set to false. Then you call
load() on the next one in the queue while the current one is playing.
When the current one finishes, you swap the new one in place and call
play() on it (and load the next one).

Manish


[flexcoders] Re: How to release Memory consumed by DataService

2009-05-27 Thread Dharmendra Chauhan
Hi Alex
Thanks for the reply.
I profiled the app ,I can see arrayCollection in loitering object.
I am wondering even aftter calling appropriate methods why arrayCollection has 
not been destroyed.I also dont have any listerner attached to the 
ArrayCollection.

Regards,
Dharmendra 


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

 If you have data returned from the service hanging around, then those things 
 are probably hanging around too.  Use the profiler to figure out who's 
 holding on to things.
 
 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: Tuesday, May 26, 2009 1:07 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] How release Memory consumed by DataService
 
 
 
 
 
 Hello All,
 dataService.release();
 dataService.dissconnect()
 dataService.logout();
 
 I am using above set of codes to release resources consumed by Data Service.
 but I was surprised to see that even after running above code memory 
 consumption is not coming down.
 
 During profiling I found lot of loitering obeject named
 ManagedObject, ProxyObject , AsynchToken etc ..
 
 I belive they are all created by DataService , i am wondering why they are 
 not gettig destroyed when dataService itself is disconnected.
 
 Please suggest me the ways to release all resources consumend by DataService
 
 I m using LCDS 2.6 with RTMP channel.
 
 Regards,
 Dharmendra





[flexcoders] Strange error

2009-05-27 Thread markgoldin_2000
I am getting the following error:
Severity and DescriptionPathResourceLocation
Creation Time   Id
D:\projects\sfcs\UFDCommonLib\src\CustomSkin.as and 
D:\projects\sfcs\UFDCommonLib\src\CustomSkin.mxml can't co-exist in the same 
directory. UFDCommonLib

Why is that? I am using a sample project I got from the web and these files are 
in the same directory.

Thanks for help.



Re: [flexcoders] Strange error

2009-05-27 Thread Ian Thomas
That's a perfectly reasonable error. Both things compile to a class
called CustomSkin - and you can't have two classes in the same project
called CustomSkin.

Sounds like your sample project wasn't set up to compile - are you
sure whoever provided the project isn't just giving you two separate
examples of the same thing, one version in MXML, one version in AS? I
suspect you aren't supposed to be trying to compile the two together.

HTH,

Ian

On Wed, May 27, 2009 at 8:35 PM, markgoldin_2000
markgoldin_2...@yahoo.com wrote:


 I am getting the following error:
 Severity and Description Path Resource Location Creation Time Id
 D:\projects\sfcs\UFDCommonLib\src\CustomSkin.as and
 D:\projects\sfcs\UFDCommonLib\src\CustomSkin.mxml can't co-exist in the same
 directory. UFDCommonLib

 Why is that? I am using a sample project I got from the web and these files
 are in the same directory.

 Thanks for help.

 


[flexcoders] Need Alternative for enterFrame event (Causing Memory leak )

2009-05-27 Thread Dharmendra Chauhan
Hi,
  I landed up myself in to memory leak and the reason of this leak is 
enterFrame event.
 
I am re-registering ExterfaceInterface.callBack methods on this event to solve 
a problem ( callback connection broken on lost focus). 

memory consumption keeps increasing even when app is idle..


 I need  a event which gets fired  when user switch to my app ,in this event I 
will re-register call backs to solve broken callBack connection issue.

these callback are getting called from Dot Net application.


Please , suggest some alternative for EnterFrame event which gets fired on set 
focus event.

Regards,
Dharmendra









Re: [flexcoders] Need Alternative for enterFrame event (Causing Memory leak )

2009-05-27 Thread Manish Jethani
On Thu, May 28, 2009 at 1:38 AM, Dharmendra Chauhan
chauhan_i...@yahoo.com wrote:

 Please , suggest some alternative for EnterFrame event which gets fired on 
 set focus event.

activate?

Manish


[flexcoders] Common library with another SWC file

2009-05-27 Thread markgoldin_2000
I have a common library that I share between my projects. I want to use Adobe 
AutoComplete and I have added the SWC file to this library just to keep things 
in one place. I am using  xmlns:modulecode=modulecode.* to get generic 
components from my shared library, but how do I get it from AutoComplete? I did 
not add source code, just a SWC file.

Thanks for help.



[flexcoders] Compile error

2009-05-27 Thread markgoldin_2000
What does that error mean?

could not find source for class classname

Thanks





[flexcoders] Coverflow for Gumbo?

2009-05-27 Thread Leo Soto M.
I know there are some nice coverflow components for Flex3, but I
wonder if someone has done a version using the new capabilities of
Gumbo.

Regards,
-- 
Leo Soto M.
http://blog.leosoto.com


[flexcoders] How do I initialize two flex swfs to talk to each other?

2009-05-27 Thread luvfotography
What's the best way to get two flex swfs to talk to each other?
I can either use localconnection or javascript.  I just need to pass back and 
forth a little data.  What's the best way to initialize the connection.

How can I determine that both are loaded before I attempt the connect?

Do I keep trying connection until I'm connected?

Do I use javascript to determine if both swf files are loaded, then signal them 
to connect?

What if I don't have javascript on the page?
thanks,





[flexcoders] Re: Value Objects

2009-05-27 Thread mikeashields
good point



[flexcoders] Re: Value Objects

2009-05-27 Thread mikeashields
eepers!  I will give you that the houses/building analogy is correct though in 
defense of my perhaps indefensible tone, I honestly can't believe the 
difficulty I am having trying to pick up the concepts from existing materials.  
IMHO there seems to be only house-builders or skyscraper architects -- with 
a dirth of construction foremen able to explain exactly where to put/attach 
the iron scaffolding.

Rather than continuing the analogy I'm going to look for a(nother) tall 
building . . . .

--- In flexcoders@yahoogroups.com, jgamacheteam345 jgama...@... wrote:

 Partly this reads like a troll, but assuming this is genuine, this is how I 
 read your question below (and obviously I could be wrong):
 
 Gee, I've come from a background of building houses.  I'm trying to learn 
 this stuff you all use to build tall buildings.  What is the advantage of all 
 that stuff?  I never had to do that to build a house and it is pissing me 
 off...
 
 Your right, you don't need to use DTOs/VOs to build a house.  If you only 
 need/want to keep building houses don't use them.  If you need/want to build 
 scalable, distributed systems, then I'd suggest you keep asking questions, 
 but maybe switch your tone a bit
 
 --- In flexcoders@yahoogroups.com, mikeashields mikeashields@ wrote:
 
  Yes, the nomenclature is disconcerting.  I reviewed your link however am 
  unfamiliar with java/jsp and thus couldn't necessarily follow.  
  
  Nonetheless it seemed to say that mapping flex properties to the database 
  properties (returned via jsp/cfusion) offers various advantages -- mostly 
  related to strict typing.  
  
  Fair enough, but insofar as by using Stored Procedures I (think I) am able 
  to push a great deal of the BizLogic/ControllerLayer right to the 
  database (ie NOT the cfusion or even Flex/ViewLayer), what the hell do I 
  care???
  
  I'm so newbie that I hesitate to presume/assert anything but A.) this VO 
  stuff is really boggling/pissing me off and B.) isn't it an imposition to 
  make the view/Flex process/organize the returned data?  Why not just throw 
  results into sharedObjects (aka Flash cookies) on the hard drive?
  
  Maybe I'm missing something . . .
 





[flexcoders] Converting XML Data Retrieved from Web Service to ArrayCollection

2009-05-27 Thread Angelo Anolin
Hi FlexCoders,
I am able to retrieve an XML data from a backend (ASP.NET) webservice and 
simultaneously, bind it to my datagrid.

I want to convert the XML data to an ArrayCollection and bind that Array 
Collection to the datagrid instead of the XML data.

The conversion needs to be done so that I could implement a search/filter 
functionality for my datagrid.

Here's some of the codes I have:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
layout=vertical 
backgroundGradientColors=[#FFCC00, #993300] 
horizontalAlign=left 
 mx:Script
  ![CDATA[
   import mx.utils.ArrayUtil;
   import mx.collections.ArrayCollection;
   import mx.controls.Alert;
   import mx.rpc.events.FaultEvent;
   import mx.rpc.events.ResultEvent;
   import mx.rpc.soap.mxml.WebService;
   import mx.managers.CursorManager;
   import mx.managers.PopUpManager;
   import mx.utils.ObjectUtil;
   
   /**
    * @bindable 
    * @private
    * @property Will hold the data passed from the web service.
   */
   [Bindable]
   private var _xmlData:XML;
   
   [Bindable]
   private var arrDP:ArrayCollection = new ArrayCollection;
   
   private function getGridData():void
   {
CursorManager.setBusyCursor();
var service:WebService = new WebService();

service.addEventListener(ResultEvent.RESULT, serviceResultHandler);
service.addEventListener(FaultEvent.FAULT, serviceFaultHandler);
service.loadWSDL(http://localhost:55841/Service1.asmx?WSDL;);
service.RetrieveSuppliers2();
arrDP = new ArrayCollection(mx.utils.ArrayUtil.toArray(_xmlData));
   }
   
   private function serviceResultHandler(event:ResultEvent) :void
   {
CursorManager.removeBusyCursor();
_xmlData = XML(event.result);
this.MydataGrid.visible = true;
   }
   
   private function serviceFaultHandler(event:FaultEvent) :void
   {
CursorManager.removeBusyCursor();
Alert.show(String(event.fault), Error);
this.btnLoad.enabled = true;
   }
   
   private function sortNumericColumn(itemA:Object, itemB:Object): int
   {
return ObjectUtil.numericCompare(itemA.SupplierID, itemB.SupplierID);
   }
   
   private function searchFilterGrid(e:Event) :void
   {
e.stopImmediatePropagation()
if(txtSearch.text == '')
{
 arrDP.filterFunction = null;
}
else
{
 arrDP.filterFunction = textFilter;
}
   }
   
   private function textFilter(item:Object) :Boolean
   {
return item.CompanyName.toLowerCase().indexOf(txtSearch.text.toLowerCase()) 
!= -1;
   }
  ]]
 /mx:Script
 
 mx:HBox height=50
    width=100%
    horizontalScrollPolicy=off
    verticalScrollPolicy=off
  mx:ComboBox 
   mx:dataProvider
mx:Array
 mx:StringAll/mx:String
 mx:StringSupplier ID/mx:String
 mx:StringCompany Name/mx:String
 mx:StringContact Name/mx:String
 mx:StringContact Title/mx:String
 mx:StringAddress/mx:String
/mx:Array
   /mx:dataProvider 
  /mx:ComboBox
  mx:TextInput id=txtSearch width=200 change=searchFilterGrid(event) /
  mx:CheckBox label=Filter /
  mx:Label id=lblRecordCount /
 /mx:HBox
 
 mx:VBox horizontalCenter=0 
    verticalCenter=0 
    horizontalScrollPolicy=off
    verticalScrollPolicy=off
    height=100%
    width=100% 
  mx:HBox width=70% height=100% borderStyle=solid
   mx:DataGrid id=MydataGrid 
   creationComplete=getGridData(); 
   horizontalScrollPolicy=on 
   width=100% 
   height=100% 
   visible=false 
   dataProvider={_xmlData.*} 
   itemClick=getDataItems(); 
mx:columns
 mx:DataGridColumn headerText=ID dataField=SupplierID 
sortCompareFunction=sortNumericColumn width=30/
 mx:DataGridColumn headerText=Company Name dataField=CompanyName 
width=200/
 mx:DataGridColumn headerText=Contact Name dataField=ContactName  
width=150/
 mx:DataGridColumn headerText=Contact Title dataField=ContactTitle 
width=150/
 mx:DataGridColumn headerText=Address dataField=Address width=250/
/mx:columns
   /mx:DataGrid
  /mx:HBox
 /mx:VBox
/mx:Application

When I replace the dataProvider for the datagrid with this:

dataProvider={arrDP}

No data is shown on the datagrid.  How can I then convert the XML to array 
collection and subsequently, be able to bind it to my datagrid?

I would appreciate your advice on this matter.

Thanks and regards,

Angelo


  

Re: [flexcoders] Compile error

2009-05-27 Thread Aaron Hardy
It means it can't find the source for the class with the name 
classname.  It's likely that either you didn't import the class or the 
class isn't in your project.

Aaron

markgoldin_2000 wrote:


 What does that error mean?

 could not find source for class classname

 Thanks

 



RE: [flexcoders] Re: How to release Memory consumed by DataService

2009-05-27 Thread Alex Harui
Well you have to track the backreferences to the collection to find out who is 
keeping it around.  There a tutorial on how I use the profiler on my blog.  
Unfortunately it is a lot of painful detective work.

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: Wednesday, May 27, 2009 12:32 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How to release Memory consumed by DataService





Hi Alex
Thanks for the reply.
I profiled the app ,I can see arrayCollection in loitering object.
I am wondering even aftter calling appropriate methods why arrayCollection has 
not been destroyed.I also dont have any listerner attached to the 
ArrayCollection.

Regards,
Dharmendra

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

 If you have data returned from the service hanging around, then those things 
 are probably hanging around too. Use the profiler to figure out who's holding 
 on to things.

 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 Dharmendra Chauhan
 Sent: Tuesday, May 26, 2009 1:07 PM
 To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
 Subject: [flexcoders] How release Memory consumed by DataService





 Hello All,
 dataService.release();
 dataService.dissconnect()
 dataService.logout();

 I am using above set of codes to release resources consumed by Data Service.
 but I was surprised to see that even after running above code memory 
 consumption is not coming down.

 During profiling I found lot of loitering obeject named
 ManagedObject, ProxyObject , AsynchToken etc ..

 I belive they are all created by DataService , i am wondering why they are 
 not gettig destroyed when dataService itself is disconnected.

 Please suggest me the ways to release all resources consumend by DataService

 I m using LCDS 2.6 with RTMP channel.

 Regards,
 Dharmendra




RE: [flexcoders] Need Alternative for enterFrame event (Causing Memory leak )

2009-05-27 Thread Alex Harui
ExternalInteface.addCallback does lock whatever function you pass it and the 
object associated with it.  To avoid that you register a function in the main 
app with ExternalInterface since you won't be destroying the main app until you 
are truly done, then have it call anybody you need.

To deal with knowing when setFocus gets called try FocusEvent.FOCUS_IN

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 Manish Jethani
Sent: Wednesday, May 27, 2009 1:43 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Need Alternative for enterFrame event (Causing Memory 
leak )





On Thu, May 28, 2009 at 1:38 AM, Dharmendra Chauhan
chauhan_i...@yahoo.commailto:chauhan_icse%40yahoo.com wrote:

 Please , suggest some alternative for EnterFrame event which gets fired on 
 set focus event.

activate?

Manish



RE: [flexcoders] Re: Calling invalidateProperties during validateProperties

2009-05-27 Thread Alex Harui
Generally there should be one and only one correct path of validation of 
properties so you don't need to go back as that is going to cost you time.  The 
pattern is usually to set a flag (myPropertyChanged) when the property is in 
need of validation, and you can check at the end of your commitProperties for 
these flags and simply call commitProperties recursively.

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 Manish Jethani
Sent: Wednesday, May 27, 2009 12:14 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Calling invalidateProperties during 
validateProperties





On Wed, May 27, 2009 at 11:10 PM, reflexactions 
reflexacti...@yahoo.commailto:reflexactions%40yahoo.com wrote:
 Well an example would be where there say half a dozen related properties that 
 get set, these individualy call invalidateProperties and will then be 
 collectively processed in commitPorperties on the next frame.

 In that processing events are raised to notify changes, however the handlers 
 for those events could lead to other properties being set that in turn will 
 call invalidateProperties which of course fails.

I don't know if dispatching events from commitProperties(), measure(),
updateDisplayList(), etc., is supported. Maybe somebody from the Flex
team can throw some light on this.

I would use callLater() to dispatch that event.

My $0.02.

Manish



RE: [flexcoders] Cause Label to resize after setting text

2009-05-27 Thread Tracy Spratt
Thanks, all.

I called:
myLabel.validateNow()

and declared a handler on the myLabel.resize event, did my event logic in
there, and all seems to be working fine.



Tracy Spratt,
Lariat Services, development services available

-Original Message-
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Manish Jethani
Sent: Wednesday, May 27, 2009 10:02 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Cause Label to resize after setting text

On Wed, May 27, 2009 at 9:17 AM, Tracy Spratt tr...@nts3rd.com wrote:

[...]


 When a setter function sets the Label’s text property, the label has not
 been resized to fit the new text yet, so I can’t test:

 if (myLabel.width  this.width)

 in the setter


 I have not yet found the right invalidation, or event or override to
trigger
 my measure logic.  Any suggestions?

You should try calling validateNow() on the Label object.

Either that, or call your own invalidateDisplayList() and let
updateDisplayList() take care of triggering the effect.

  public function set marqueeText(value:String):void
  {
  if (label.text != value) {
  label.text = value;

  invalidateDisplayList();
  }
  }

  override protected function updateDisplayList(...):void
  {
// do the effect here if necessary
  }

Manish

-- 
www.manishjethani.com




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location:
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62
079f6847
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links







[flexcoders]Databinding in htmlText in repeater puzzle

2009-05-27 Thread dorkie dork from dorktown
If I have this code inside a htmlText field inside a Repeater:

mx:Text id=postFooter1 width=100% y=0
htmlText=Posted in {postsrepeater.currentitem.categories.catego...@name}
|  {postsrepeater.currentit...@commentcount} Comments   /

How can I wrap it in anchor tags?

mx:Text id=postFooter1 width=100% y=0
htmlText=Posted in a
href='event:{postsrepeater.currentitem.categories.catego...@name
}'{postsrepeater.currentitem.categories.catego...@name}/a  |  a
href='event:{postsrepeater.currentit...@commentcount
}'{postsrepeater.currentit...@commentcount} Comments/a   /

If I use the above code the compiler says:

The value of attribute htmlText must not contain the '' character.


RE: [flexcoders] Converting XML Data Retrieved from Web Service to ArrayCollection

2009-05-27 Thread Tracy Spratt
I suggest that in your serviceResultHandler you do something like:

 

var oTemp:Object

var xl:XMLList = _xmlData.children();

For ( var i:int=0;xl.length();i++)  {

  oTemp = { SupplierID:xl[i].SupplierId.text(), CompanyName:
xl[i].CompanyName.text(), .  }

  arrDP.addItem(oTemp);

}

 

Still better would be to create a VO with strongly typed
properties(SupplierID. etc) rather than the generic Object.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Angelo Anolin
Sent: Wednesday, May 27, 2009 8:10 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Converting XML Data Retrieved from Web Service to
ArrayCollection

 






Hi FlexCoders,

I am able to retrieve an XML data from a backend (ASP.NET) webservice and
simultaneously, bind it to my datagrid.

 

I want to convert the XML data to an ArrayCollection and bind that Array
Collection to the datagrid instead of the XML data.

 

The conversion needs to be done so that I could implement a search/filter
functionality for my datagrid.

 

Here's some of the codes I have:

 

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx= http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml; 
layout=vertical 
backgroundGradientColors=[#FFCC00, #993300] 
horizontalAlign=left 
 mx:Script
  ![CDATA[
   import mx.utils.ArrayUtil;
   import mx.collections.ArrayCollection;
   import mx.controls.Alert;
   import mx.rpc.events.FaultEvent;
   import mx.rpc.events.ResultEvent;
   import mx.rpc.soap.mxml.WebService;
   import mx.managers.CursorManager;
   import mx.managers.PopUpManager;
   import mx.utils.ObjectUtil;
   
   /**
* @bindable 
* @private
* @property Will hold the data passed from the web service.
   */
   [Bindable]
   private var _xmlData:XML;
   
   [Bindable]
   private var arrDP:ArrayCollection = new ArrayCollection;
   
   private function getGridData():void
   {
CursorManager.setBusyCursor();

var service:WebService = new WebService();

service.addEventListener(ResultEvent.RESULT, serviceResultHandler);
service.addEventListener(FaultEvent.FAULT, serviceFaultHandler);
service.loadWSDL( http://localhost:55841/Service1.asmx?WSDL
http://localhost:55841/Service1.asmx?WSDL;);
service.RetrieveSuppliers2();
arrDP = new ArrayCollection(mx.utils.ArrayUtil.toArray(_xmlData));
   }
   
   private function serviceResultHandler(event:ResultEvent) :void
   {
CursorManager.removeBusyCursor();
_xmlData = XML(event.result);
this.MydataGrid.visible = true;
   }
   
   private function serviceFaultHandler(event:FaultEvent) :void
   {
CursorManager.removeBusyCursor();
Alert.show(String(event.fault), Error);
this.btnLoad.enabled = true;
   }
   
   private function sortNumericColumn(itemA:Object, itemB:Object): int
   {
return ObjectUtil.numericCompare(itemA.SupplierID, itemB.SupplierID);
   }
   
   private function searchFilterGrid(e:Event) :void
   {
e.stopImmediatePropagation()
if(txtSearch.text == '')
{
 arrDP.filterFunction = null;
}
else
{
 arrDP.filterFunction = textFilter;
}
   }
   
   private function textFilter(item:Object) :Boolean
   {
return
item.CompanyName.toLowerCase().indexOf(txtSearch.text.toLowerCase()) != -1;
   }
  ]]
 /mx:Script
 
 mx:HBox height=50
width=100%
horizontalScrollPolicy=off
verticalScrollPolicy=off
  mx:ComboBox 
   mx:dataProvider
mx:Array
 mx:StringAll/mx:String
 mx:StringSupplier ID/mx:String
 mx:StringCompany Name/mx:String
 mx:StringContact Name/mx:String
 mx:StringContact Title/mx:String
 mx:StringAddress/mx:String
/mx:Array
   /mx:dataProvider 
  /mx:ComboBox
  mx:TextInput id=txtSearch width=200 change=searchFilterGrid(event)
/
  mx:CheckBox label=Filter /
  mx:Label id=lblRecordCount /
 /mx:HBox
 
 mx:VBox horizontalCenter=0 
verticalCenter=0 
horizontalScrollPolicy=off
verticalScrollPolicy=off
height=100%
width=100% 
  mx:HBox width=70% height=100% borderStyle=solid
   mx:DataGrid id=MydataGrid 
   creationComplete=getGridData(); 
   horizontalScrollPolicy=on 
   width=100% 
   height=100% 
   visible=false 
   dataProvider={_xmlData.*} 
   itemClick=getDataItems(); 
mx:columns
 mx:DataGridColumn headerText=ID dataField=SupplierID
sortCompareFunction=sortNumericColumn width=30/
 mx:DataGridColumn headerText=Company Name dataField=CompanyName
width=200/
 mx:DataGridColumn headerText=Contact Name dataField=ContactName
width=150/
 mx:DataGridColumn headerText=Contact Title dataField=ContactTitle
width=150/
 mx:DataGridColumn headerText=Address dataField=Address
width=250/
/mx:columns
   /mx:DataGrid
  /mx:HBox
 /mx:VBox
/mx:Application

 

When I replace the dataProvider for the datagrid with this:


dataProvider={arrDP}

 

No data is shown on the datagrid.  How can 

RE: [flexcoders]Databinding in htmlText in repeater puzzle

2009-05-27 Thread Tracy Spratt
Ugh, instead of that horrid, unreadable, un-debuggable code, create a custom
component, pass in currentItem, and code that component normally.  To use
htmltext in mxml, you will have to use CData or use entity references for
the special chars.  Instead, build the html string in an AS function.  You
will actually be able to debug it.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of dorkie dork from dorktown
Sent: Wednesday, May 27, 2009 11:25 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders]Databinding in htmlText in repeater puzzle

 






If I have this code inside a htmlText field inside a Repeater:

mx:Text id=postFooter1 width=100% y=0
htmlText=Posted in {postsrepeater.currentitem.categories.catego...@name}  |
{postsrepeater.currentit...@commentcount} Comments   /

How can I wrap it in anchor tags? 

mx:Text id=postFooter1 width=100% y=0
htmlText=Posted in a
href='event:{postsrepeater.currentitem.categories.catego...@name}'{postsRep
eater.currentitem.categories.catego...@name}/a  |  a
href='event:{postsrepeater.currentit...@commentcount}'{postsRepeater.curren
tit...@commentcount} Comments/a   /

If I use the above code the compiler says:

The value of attribute htmlText must not contain the '' character. 





Re: [flexcoders]Databinding in htmlText in repeater puzzle

2009-05-27 Thread dorkie dork from dorktown
Good idea. I was creating a tutorial so I was trying to put it all in one
mxml file. I'll make a note of it. If someone is reading this and has to do
it like the code above you would just need to convert the less than
character like so:

htmlText=Posted in lt;a
href='event:{postsrepeater.currentitem.categories.catego...@name}'lt;/a

Thanks Tracy

n Wed, May 27, 2009 at 10:39 PM, Tracy Spratt tr...@nts3rd.com wrote:



  Ugh, instead of that horrid, unreadable, un-debuggable code, create a
 custom component, pass in currentItem, and code that component normally.  To
 use htmltext in mxml, you will have to use CData or use entity references
 for the special chars.  Instead, build the html string in an AS function.
 You will actually be able to debug it.



 Tracy Spratt,

 Lariat Services, development services available
   --

 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *dorkie dork from dorktown
 *Sent:* Wednesday, May 27, 2009 11:25 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders]Databinding in htmlText in repeater puzzle






  If I have this code inside a htmlText field inside a Repeater:

 mx:Text id=postFooter1 width=100% y=0
 htmlText=Posted in {postsrepeater.currentitem.categories.catego...@name}
 |  {postsrepeater.currentit...@commentcount} Comments   /

 How can I wrap it in anchor tags?

 mx:Text id=postFooter1 width=100% y=0
 htmlText=Posted in a
 href='event:{postsrepeater.currentitem.categories.catego...@name
 }'{postsrepeater.currentitem.categories.catego...@name}/a  |  a
 href='event:{postsrepeater.currentit...@commentcount
 }'{postsrepeater.currentit...@commentcount} Comments/a   /

 If I use the above code the compiler says:

 The value of attribute htmlText must not contain the '' character.
   



Re: [flexcoders]Databinding in htmlText in repeater puzzle

2009-05-27 Thread dorkie dork from dorktown
Oops that code should be:

htmlText=Posted in lt;a
href='event:{some_variable}'{some_variable}lt;/a

On Wed, May 27, 2009 at 10:47 PM, dorkie dork from dorktown 
dorkiedorkfromdorkt...@gmail.com wrote:

 Good idea. I was creating a tutorial so I was trying to put it all in one
 mxml file. I'll make a note of it. If someone is reading this and has to do
 it like the code above you would just need to convert the less than
 character like so:

 htmlText=Posted in lt;a
 href='event:{postsrepeater.currentitem.categories.catego...@name}'lt;/a

 Thanks Tracy


 n Wed, May 27, 2009 at 10:39 PM, Tracy Spratt tr...@nts3rd.com wrote:



  Ugh, instead of that horrid, unreadable, un-debuggable code, create a
 custom component, pass in currentItem, and code that component normally.  To
 use htmltext in mxml, you will have to use CData or use entity references
 for the special chars.  Instead, build the html string in an AS function.
 You will actually be able to debug it.



 Tracy Spratt,

 Lariat Services, development services available
   --

 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *dorkie dork from dorktown
 *Sent:* Wednesday, May 27, 2009 11:25 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders]Databinding in htmlText in repeater puzzle






  If I have this code inside a htmlText field inside a Repeater:

 mx:Text id=postFooter1 width=100% y=0
 htmlText=Posted in {postsrepeater.currentitem.categories.catego...@name}
 |  {postsrepeater.currentit...@commentcount} Comments   /

 How can I wrap it in anchor tags?

 mx:Text id=postFooter1 width=100% y=0
 htmlText=Posted in a
 href='event:{postsrepeater.currentitem.categories.catego...@name
 }'{postsrepeater.currentitem.categories.catego...@name}/a  |  a
 href='event:{postsrepeater.currentit...@commentcount
 }'{postsrepeater.currentit...@commentcount} Comments/a   /

 If I use the above code the compiler says:

 The value of attribute htmlText must not contain the '' character.
   





Re: [flexcoders] Converting XML Data Retrieved from Web Service to ArrayCollection

2009-05-27 Thread Angelo Anolin
Hi Tracy,

Thanks for the response.

You mentioned something about creating a VO with strongly typed properties.  
Care to show some links/examples on how to achieve this?

Thanks.
Regards,

Angelo





From: Tracy Spratt tr...@nts3rd.com
To: flexcoders@yahoogroups.com
Sent: Thursday, 28 May, 2009 11:33:14
Subject: RE: [flexcoders] Converting XML Data Retrieved from Web Service to 
ArrayCollection





I suggest that in your “serviceResultHandle r” you do something like:
 
var oTemp:Object
var xl:XMLList = _xmlData.children( );
For ( var i:int=0;xl.length( );i++)  {
  oTemp = {SupplierID:xl[ i].SupplierId. text(), CompanyName: 
xl[i].CompanyName. text(), …  }
  arrDP.addItem( oTemp);
}
 
Still better would be to create a VO with strongly typed properties(Supplier 
ID. etc) rather than the generic Object.
 
Tracy Spratt,
Lariat Services, development services available



From:flexcod...@yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On 
Behalf Of Angelo Anolin
Sent: Wednesday, May 27, 2009 8:10 PM
To: flexcod...@yahoogro ups.com
Subject: [flexcoders] Converting XML Data Retrieved from Web Service to 
ArrayCollection
 




Hi FlexCoders,
I am able to retrieve an XML data from a backend (ASP.NET) webservice and 
simultaneously, bind it to my datagrid.
 
I want to convert the XML data to an ArrayCollection and bind that Array 
Collection to the datagrid instead of the XML data.
 
The conversion needs to be done so that I could implement a search/filter 
functionality for my datagrid.
 
Here's some of the codes I have:
 
?xml version=1.0 encoding=utf- 8?
mx:Application xmlns:mx=http://www.adobe. com/2006/ mxml 
layout=vertical 
backgroundGradientC olors=[# FFCC00, #993300] 
horizontalAlign= left 
 mx:Script
  ![CDATA[
   import mx.utils.ArrayUtil;
   import mx.collections. ArrayCollection;
   import mx.controls. Alert;
   import mx.rpc.events. FaultEvent;
   import mx.rpc.events. ResultEvent;
   import mx.rpc.soap. mxml.WebService;
   import mx.managers. CursorManager;
   import mx.managers. PopUpManager;
   import mx.utils.ObjectUtil ;
   
   /**
    * @bindable 
    * @private
    * @property Will hold the data passed from the web service.
   */
   [Bindable]
   private var _xmlData:XML;
   
   [Bindable]
   private var arrDP:ArrayCollecti on = new ArrayCollection;
   
   private function getGridData( ):void
   {
CursorManager. setBusyCursor( );
var service:WebService = new WebService() ;

service.addEventLis tener(ResultEven t.RESULT, serviceResultHandle r);
service.addEventLis tener(FaultEvent .FAULT, serviceFaultHandler );
service.loadWSDL( http://localhost: 55841/Service1. asmx?WSDL);
service.RetrieveSup pliers2() ;
arrDP = new ArrayCollection( mx.utils. ArrayUtil. toArray(_ xmlData)) ;
   }
   
   private function serviceResultHandle r(event:ResultEv ent) :void
   {
CursorManager. removeBusyCursor ();
_xmlData = XML(event.result) ;
this.MydataGrid. visible = true;
   }
   
   private function serviceFaultHandler (event:FaultEven t) :void
   {
CursorManager. removeBusyCursor ();
Alert.show(String( event.fault) , Error);
this.btnLoad. enabled = true;
   }
   
   private function sortNumericColumn( itemA:Object, itemB:Object) : int
   {
return ObjectUtil.numericC ompare(itemA. SupplierID, itemB.SupplierID) ;
   }
   
   private function searchFilterGrid( e:Event) :void
   {
e.stopImmediateProp agation()
if(txtSearch. text == '')
{
 arrDP.filterFunctio n = null;
}
else
{
 arrDP.filterFunctio n = textFilter;
}
   }
   
   private function textFilter(item: Object) :Boolean
   {
return item.CompanyName. toLowerCase( ).indexOf( txtSearch. 
text.toLowerCase ()) != -1;
   }
  ]]
 /mx:Script
 
 mx:HBox height=50
    width=100%
    horizontalScrollPol icy=off
    verticalScrollPolic y=off
  mx:ComboBox 
   mx:dataProvider
mx:Array
 mx:StringAll/mx:String
 mx:StringSupplier ID/mx:String
 mx:StringCompany Name/mx:String
 mx:StringContact Name/mx:String
 mx:StringContact Title/mx:String
 mx:StringAddress/mx:String
/mx:Array
   /mx:dataProvider 
  /mx:ComboBox
  mx:TextInput id=txtSearch width=200 change=searchFilte rGrid(event)  /
  mx:CheckBox label=Filter /
  mx:Label id=lblRecordCount /
 /mx:HBox
 
 mx:VBox horizontalCenter= 0 
    verticalCenter= 0 
    horizontalScrollPol icy=off
    verticalScrollPolic y=off
    height=100% 
    width=100% 
  mx:HBox width=70% height=100%  borderStyle= solid
   mx:DataGrid id=MydataGrid 
   creationComplete= getGridData( ); 
   horizontalScrollPol icy=on 
   width=100% 
   height=100%  
   visible=false 
   dataProvider= {_xmlData. *} 
   itemClick=getDataI tems(); 
mx:columns
 mx:DataGridColumn headerText= ID dataField=Supplier ID 
sortCompareFunction =sortNumericCol umn width=30/
 mx:DataGridColumn headerText= Company Name