RE: [flexcoders] Digest Number 10715

2009-05-28 Thread Gregor Kiddie
Confusingly, Fowler uses VO to mean something else, then slags off the
J2EE community for getting them mixed up...

 

http://www.martinfowler.com/bliki/ValueObject.html

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

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

Registered Number: 1788577

Registered in the UK

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

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



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.

 



[flexcoders] Maybe this could be also good place to share ur thoughts about FLEX at one place

2009-05-28 Thread Sajid Hussain

I have installed elg to my server with such concpet where RIA DEvelopers could 
mange thier blog , work profille, portfolio pages and jobs group

http://dacoders.com/yourspace

Sajid 


  

Re: [flexcoders] LCDS async error

2009-05-28 Thread Johannes Nel
I just love talking to myself.

No, the bug is not going to go away, I know people from Adobe read this
list. This is really a show stopper, can someone from Adobe take a look
please.

has anyone on this list tried to decompile the fds swc, if so can they mail
me off list and tell me how that worked out for them, kinda desperate by
now

On Wed, May 27, 2009 at 11:10 AM, Johannes Nel johannes@gmail.comwrote:

 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




-- 
j:pn
\\no comment


[flexcoders] Any ETA for Flex SDK 3.4 getting released?

2009-05-28 Thread Gregor Kiddie
We're waiting for some of the issues fixed in 3.4, and well... I have to
have some information to appease the almighty testers ;)

 

Last I heard it was going to be August. This still the case?

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

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

Registered Number: 1788577

Registered in the UK

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

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

 



[flexcoders] Refletion on text,perspective as in photoshop,alignment of text box--i am stuck

2009-05-28 Thread shubhra
Hi,

I am working on an application in which i had to add certain effects and i am 
not able to implement for last 2 days, which has become Headache for me.Please 
help.The problems are stated as below.

(!) I want to write an reflect function which can take is of the selected ID 
and can put effect on that.

(2)Alignment of textbox i had done putting text inside a tile? but i need 
parent container as canvas for my application. So is it poosible some other way.

(3)I have to implement Perspective effect as in the Photoshop via Flex.(that is 
all tha corner of image are flexible,we can move them anywhere,may be 
overlapping each other)

(4)Drawing toolbar i got as in Uckcanvas but regarding CIRCLE and STAR what to 
do i am not able to think.

Please FLEX volunteers help me..

Thanks in advance

Shubhra Tiwari



[flexcoders] Re: Custom ItemRenderer in List control and highlight

2009-05-28 Thread fonqiemp
Hi 

Sorry for the late response.

I found out that I just needed to use the padding-left, right, top and bottom 
css properties to control the layout of the highlights. Just wierd that the 
default style has no padding only on the right.

regards

--- In flexcoders@yahoogroups.com, Yves Riel r...@... wrote:

 Could be easier to help you out if you post some code ... especially if
 it's a really simple application.
 
 
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of fonqiemp
 Sent: Thursday, May 21, 2009 3:28 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Custom ItemRenderer in List control and highlight
 
 
 
 
 
 Hi all
 
 This is probably a really simple question, but I havn't been able to
 find the answer.
 
 I've created a really simple application containing a List control and a
 mxml component (extending Canvas).
 
 My List width is set to 300. The custom component width is also set to
 300.
 
 When I use my component as an itemRenderer for my list, the roll over
 and selected highlight border shows up fine on the top, left and
 bottom edges. But the right edge is missing.
 
 It's as if the canvas is too wide for the list, but if I specify a width
 of 290 in the canvas it's just the same.





[flexcoders] Data Grid : headers above and in the left side.

2009-05-28 Thread carlogiordano11
Hi guys,
someone knows how build a Data Grid with headers both above and to the left 
side. The standard Data Grid have headers only above and not in the left side. 
Graphically I would have a Data Grid in this way :

   Unit  | Value | Name
05/06 | mm   |  45.0 | Vte
06/06 | ml   |  0.88 | Vti
07/06 | m0   |  6.09 | Mdi
08/06 | cm   |  1.87 | Cqm

I appreciate any help.
Thanks in advance.

Carlo



[flexcoders] Re: Data Grid : headers above and in the left side.

2009-05-28 Thread markgoldin_2000
What if your left side headers are just another column with data looking like 
desired header text?
You will have to build your data with an extra column that is the first column 
in the DataGrid.

--- In flexcoders@yahoogroups.com, carlogiordano11 carlogiordan...@... 
wrote:

 Hi guys,
 someone knows how build a Data Grid with headers both above and to the left 
 side. The standard Data Grid have headers only above and not in the left 
 side. Graphically I would have a Data Grid in this way :
 
Unit  | Value | Name
 05/06 | mm   |  45.0 | Vte
 06/06 | ml   |  0.88 | Vti
 07/06 | m0   |  6.09 | Mdi
 08/06 | cm   |  1.87 | Cqm
 
 I appreciate any help.
 Thanks in advance.
 
 Carlo





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

2009-05-28 Thread Tracy Spratt
No simple example handy, but it is straightforward.

 

Declare a Class, implement public properties using either public variables
or getter/setter functions.

 

You could probably find an example if you search.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Angelo Anolin
Sent: Thursday, May 28, 2009 1:48 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Converting XML Data Retrieved from Web Service to
ArrayCollection

 






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

[flexcoders] High CPU usage redux

2009-05-28 Thread Tom McNeer
A couple of days ago, I posted a message regarding extremely high CPU usage
in an application I was building. Eventually, I concluded that the problem
was not the Flex app, but some other processes on the same machine.

However, I have since found out that I was incorrect -- the problem was the
Flex app after all. So for anyone who read the original post and wondered
what might be happening -- in particular, Rick Fotis, who attempted to help
-- here's what was going on:

The issue was caused by the combination of a creationPolicy setting and the
use of a set of skins called iCandy, from the ScaleNine site. Now -- I'm not
criticizing the developer of the skins. I don't know enough about what
really went on. But I do know this: I had set the creationPolicy on a
TabNavigator to all. When I removed this, the CPU usage dropped markedly.
But when I went into one of the tabs, the usage picked back up, although not
as much.

I removed the reference to the skin stylesheet. The CPU usage did what it
was supposed to do: spike occasionally, then drop to nothing.

So I can only conclude that the skins were causing continual redraws in the
background. I've found some blog posts from the folks at EffectiveUI
discussing performance problems with stateful skins, so I'm not the only one
who's encountered it. Here's one of the posts:
http://patrickhansen.com/blog/index.php/2009/03/05/flex-stateful-skins-vs-stateless
.

Moral is: be careful of stateless skins, even though they seem to be
recommended by Adobe. The use of a large number of skinned components
(checkboxes, text inputs,  etc.) can evidently be a problem -- and I didn't
even have that many.

I don't know enough to make a technical analysis of the issue; but I hope
this may save someone else a few hours (or in my case, days) of pain.

-- 
Thanks,

Tom

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


[flexcoders] Multiselect dropdown Menu

2009-05-28 Thread Kuldeep Atil
Hi All, 

I want to have a menu which allows multiple selection without closing/hiding 
it. While looking into the properties of the Menu control there is a property 
which says allowMultipleSelection but its not working.

Is this possible?

Any reply or pointers in this direction is appreciated.

Thanks in advance,
Kuldeep



[flexcoders] Run time Warning

2009-05-28 Thread markgoldin_2000
warning: unable to bind to property 'ext' on class 'XML' (class is not an 
IEventDispatcher)

It's coming from:
mx:FormItem label=Ext required=true includeInLayout=false
mx:TextInput id=ext 
focusOut=c.formatNumbers(ext, salesreps) width=10%

text={salesreps.selectedItem.ext}

restrict=0-9/   
/mx:FormItem

where salesreps is a DataGrid with an XML as a dataProvider.

Any idea?



Re: [flexcoders] High CPU usage redux

2009-05-28 Thread Rick Winscot
Tom,

Just a few quick points... you might already know but would be wise to cover
for sake of maintaining history.

Resources are allocated as components/controls/whatnot come into view. Your
observation that your application footprint increased when touching
creationPolicy is what one should expect. The best rule of thumb is to show
what you need... need what you show and wait as long as you possibly can
before showing anything.

With regard to skining. Using a skin in your application will, by its
nature, cause the application footprint to increase. Here Œfootprint¹ being
memory consumption and not necessarily cpu usage. So, an increased footprint
when adding skins into the mix is also something you will probably see.

The part that has me scratching my head is that you are seeing high cpu
usage - which is something that is typically linked to refresh/redraw rates.
How many frame per second are you running at? Have you tried the right click
- show redraw regions? If the whole app has a red box around it... That is
a good indicator that you are hitting the displaylist / refresh too hard. Do
you have any source we can take a look at?

Cheers,

Rick Winscot


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

  
   
 
   
 
 A couple of days ago, I posted a message regarding extremely high CPU usage in
 an application I was building. Eventually, I concluded that the problem was
 not the Flex app, but some other processes on the same machine.
 
 However, I have since found out that I was incorrect -- the problem was the
 Flex app after all. So for anyone who read the original post and wondered what
 might be happening -- in particular, Rick Fotis, who attempted to help --
 here's what was going on:
 
 The issue was caused by the combination of a creationPolicy setting and the
 use of a set of skins called iCandy, from the ScaleNine site. Now -- I'm not
 criticizing the developer of the skins. I don't know enough about what really
 went on. But I do know this: I had set the creationPolicy on a TabNavigator to
 all. When I removed this, the CPU usage dropped markedly. But when I went
 into one of the tabs, the usage picked back up, although not as much.
 
 I removed the reference to the skin stylesheet. The CPU usage did what it was
 supposed to do: spike occasionally, then drop to nothing.
 
 So I can only conclude that the skins were causing continual redraws in the
 background. I've found some blog posts from the folks at EffectiveUI
 discussing performance problems with stateful skins, so I'm not the only one
 who's encountered it. Here's one of the posts:
 http://patrickhansen.com/blog/index.php/2009/03/05/flex-stateful-skins-vs-stat
 eless.
 
 Moral is: be careful of stateless skins, even though they seem to be
 recommended by Adobe. The use of a large number of skinned components
 (checkboxes, text inputs,  etc.) can evidently be a problem -- and I didn't
 even have that many.
 
 I don't know enough to make a technical analysis of the issue; but I hope this
 may save someone else a few hours (or in my case, days) of pain.



RE: [flexcoders] Run time Warning

2009-05-28 Thread Jake Churchill
Convert the XML to an arraycollection of VOs and make the entire VO class
bindable.

 

Jake Churchill

CF Webtools

11204 Davenport, Ste. 100

Omaha, NE  68154

http://www.cfwebtools.com

402-408-3733 x103

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of markgoldin_2000
Sent: Thursday, May 28, 2009 8:28 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Run time Warning

 






warning: unable to bind to property 'ext' on class 'XML' (class is not an
IEventDispatcher)

It's coming from:
mx:FormItem label=Ext required=true includeInLayout=false
mx:TextInput id=ext focusOut=c.formatNumbers(ext, salesreps)
width=10%
text={salesreps.selectedItem.ext}
restrict=0-9/ 
/mx:FormItem

where salesreps is a DataGrid with an XML as a dataProvider.

Any idea?





[flexcoders] Re: Value Objects

2009-05-28 Thread Jason
Just realized I replied with the wrong subject line.  Here is my reply:

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 




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

2009-05-28 Thread thomas parquier
You could use an XMLListCollection :

 private var arrDP:XMLListCollection;
 ...
 arrDP = new XMLListCollection( _xmlData );



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/28 Angelo Anolin angelo_ano...@yahoo.com



 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

  



[flexcoders] Re: Run time Warning

2009-05-28 Thread markgoldin_2000
But my XML is set to bindable.

--- In flexcoders@yahoogroups.com, Jake Churchill j...@... wrote:

 Convert the XML to an arraycollection of VOs and make the entire VO class
 bindable.
 
  
 
 Jake Churchill
 
 CF Webtools
 
 11204 Davenport, Ste. 100
 
 Omaha, NE  68154
 
 http://www.cfwebtools.com
 
 402-408-3733 x103
 
  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of markgoldin_2000
 Sent: Thursday, May 28, 2009 8:28 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Run time Warning
 
  
 
 
 
 
 
 
 warning: unable to bind to property 'ext' on class 'XML' (class is not an
 IEventDispatcher)
 
 It's coming from:
 mx:FormItem label=Ext required=true includeInLayout=false
 mx:TextInput id=ext focusOut=c.formatNumbers(ext, salesreps)
 width=10%
 text={salesreps.selectedItem.ext}
 restrict=0-9/ 
 /mx:FormItem
 
 where salesreps is a DataGrid with an XML as a dataProvider.
 
 Any idea?





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

2009-05-28 Thread thomas parquier
[EDIT]

to get an XMLList from_xmlData :

 arrDP = new XMLListCollection( _xmlData.children() );


---
thomas

2009/5/28 thomas parquier mailingli...@web-attitude.fr

You could use an XMLListCollection :

 private var arrDP:XMLListCollection;
 ...
 arrDP = new XMLListCollection( _xmlData );



 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/28 Angelo Anolin angelo_ano...@yahoo.com



 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] Any ETA for Flex SDK 3.4 getting released?

2009-05-28 Thread Tom Chiverton
On Thursday 28 May 2009, Gregor Kiddie wrote:
 We're waiting for some of the issues fixed in 3.4, and well... I have to
 have some information to appease the almighty testers ;)

You can always go the 'monkey patch' route, or use a fixed SVN revision from 
the repository.

-- 
Helping to apprehensively repurpose frictionless 24/7 market-driven advanced 
e-tailers 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.
 

[flexcoders] Invoke RemoteObject synchronic

2009-05-28 Thread mhbmarcos
Hi!!!
i need invoke a RemoteObject in sync way?
when focus out in textField, execute a method that requiere the value returned 
by RemoteObject, but, this execution must be sync.
any solution for this?

Thanks



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

2009-05-28 Thread wrhinfl
How about moving one line of code from getGridData into serviceResultHandler, 
something like:

   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();
   }
   
   private function serviceResultHandler(event:ResultEvent) :void
   {
CursorManager.removeBusyCursor();
_xmlData = XML(event.result);
arrDP = new ArrayCollection(mx.utils.ArrayUtil.toArray(_xmlData));
this.MydataGrid.visible = true;
   }



Re: [flexcoders] Invoke RemoteObject synchronic

2009-05-28 Thread Fotis Chatzinikos
yes,

on focus out call the rpc method and turn the component into a waiting
data state,
for example disable it and show a loading indicator.

When you get the response from the server,
turn the component back to its normal state...

On Thu, May 28, 2009 at 6:49 PM, mhbmarcos mhbmar...@yahoo.com.ar wrote:



 Hi!!!
 i need invoke a RemoteObject in sync way?
 when focus out in textField, execute a method that requiere the value
 returned by RemoteObject, but, this execution must be sync.
 any solution for this?

 Thanks

  




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


[flexcoders] popup systemManager not working

2009-05-28 Thread Mark Hosny

Hey guys,

For some reason when I dispatch a custom event via the pop up, my  
main app isn't receiving the event.


In my main app I have a custom component called search, which  
contains a button to open up a pop window called new member. In my  
pop up I have this:


mx:Metadata
[Event(name=onSendNewMember,type=com.event.SendNewMember)]
/mx:Metadata

private function submitForm():void
{
newmemberinfo = new NewMemberInfo();
newmemberinfo.HOHlastName = HOHlastName_txt.text;

!---abbreviate VO's for space---

dispatchEvent(new SendNewMember 
(onSendNewMember,newmemberinfo));

}

Then in my main app

application.systemManager.addEventListener 
(onSendNewMember,onSendNewMember);


private function onSendNewMember(event:SendNewMember):void
{
Alert.show('GOT IT');
}


thanks,

hoz




[flexcoders] Re: popup systemManager not working

2009-05-28 Thread valdhor
Is the SendNewMember event set to bubble?

--- In flexcoders@yahoogroups.com, Mark Hosny h...@... wrote:

 Hey guys,
 
 For some reason when I dispatch a custom event via the pop up, my  
 main app isn't receiving the event.
 
 In my main app I have a custom component called search, which  
 contains a button to open up a pop window called new member. In my  
 pop up I have this:
 
 mx:Metadata
   [Event(name=onSendNewMember,type=com.event.SendNewMember)]
 /mx:Metadata
 
 private function submitForm():void
  {
   newmemberinfo = new NewMemberInfo();
   newmemberinfo.HOHlastName = HOHlastName_txt.text;
   
   !---abbreviate VO's for space---
   
  dispatchEvent(new SendNewMember 
 (onSendNewMember,newmemberinfo));
  }
 
 Then in my main app
 
 application.systemManager.addEventListener 
 (onSendNewMember,onSendNewMember);
 
 private function onSendNewMember(event:SendNewMember):void
   {
   Alert.show('GOT IT');
  }
 
 
 thanks,
 
 hoz





[flexcoders] Re: Invoke RemoteObject synchronic

2009-05-28 Thread mhbmarcos
i undertand, but, the handler event (Focus Out) is into the mxml component, so, 
the method for example is:

public function focusOutHandle(e:Event): void{
  
  var data:Object = invoke remote Object sync;
  
  
  
  /*working with data variable */
  data.set.;
  data.get.;
  trace(data);
}

are you understand me?

so, i need any solution to sync invocation.

Thanks



--- In flexcoders@yahoogroups.com, Fotis Chatzinikos fotis.chatzini...@... 
wrote:

 yes,
 
 on focus out call the rpc method and turn the component into a waiting
 data state,
 for example disable it and show a loading indicator.
 
 When you get the response from the server,
 turn the component back to its normal state...
 
 On Thu, May 28, 2009 at 6:49 PM, mhbmarcos mhbmar...@... wrote:
 
 
 
  Hi!!!
  i need invoke a RemoteObject in sync way?
  when focus out in textField, execute a method that requiere the value
  returned by RemoteObject, but, this execution must be sync.
  any solution for this?
 
  Thanks
 
   
 
 
 
 
 -- 
 Fotis Chatzinikos, Ph.D.
 Founder,
 Phinnovation
 fotis.chatzini...@...,





[flexcoders] Flex Data Grid Question

2009-05-28 Thread guess what

I need to draw a data grid where I need to do paint subtotals and and page 
total and group by some category . Can anyone provide me witha same xml for 
this kind of table 

  Item IDName   Qty  Price 
   
  Milk --- This is how it should be milk should be 
first row [Just a blank row with Milk in it ]

   1. Soy Milk  l5USD
   2. Choclate  215USD

  SubTotal   20 USD [ Again Blank row ]

  Water [ Again Blank Row ]
   
   1.  Aqua   1 10USD
   2.  Calistoga  1 10USD

  SubTotal   20 USD [ Again Blank row ]

  PurchaseTotal  40 USD [ Again Blank row ]


Can someone provide with an xml for this type of table in flex . Is it possible 
.





  


Re: [flexcoders] Re: Invoke RemoteObject synchronic

2009-05-28 Thread Fotis Chatzinikos
I do not get it... What is your problem?

On Thu, May 28, 2009 at 8:19 PM, mhbmarcos mhbmar...@yahoo.com.ar wrote:



 i undertand, but, the handler event (Focus Out) is into the mxml component,
 so, the method for example is:

 public function focusOutHandle(e:Event): void{
 
 var data:Object = invoke remote Object sync;
 

 
 /*working with data variable */
 data.set.;
 data.get.;
 trace(data);
 }

 are you understand me?

 so, i need any solution to sync invocation.

 Thanks


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Fotis
 Chatzinikos fotis.chatzini...@... wrote:
 
  yes,
 
  on focus out call the rpc method and turn the component into a waiting
  data state,
  for example disable it and show a loading indicator.
 
  When you get the response from the server,
  turn the component back to its normal state...
 
  On Thu, May 28, 2009 at 6:49 PM, mhbmarcos mhbmar...@... wrote:
 
  
  
   Hi!!!
   i need invoke a RemoteObject in sync way?
   when focus out in textField, execute a method that requiere the value
   returned by RemoteObject, but, this execution must be sync.
   any solution for this?
  
   Thanks
  
  
  
 
 
 
  --
  Fotis Chatzinikos, Ph.D.
  Founder,
  Phinnovation
  fotis.chatzini...@...,
 

  




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


[flexcoders] data binding in textinput ?

2009-05-28 Thread luvfotography
How do I get databinding to work in textinput?
In this example below, I have a TextInput defined with the text bound to 
{userName}, when I run the app, and enter text into the TextInput field, I 
would like the text entered assigned to the Bindable character string userName, 
however it is not.  What's the proper way to do this? 



?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
mx:Script
![CDATA[
[Bindable]
private var userName:String;
private function getName(event:Event):void {
trace('Username is: ' + userName);   
}
]]
/mx:Script

mx:TextInput x=46 y=42 id=myName_ti text={userName}/
mx:Button x=246 y=42 label=Button id=myButton 
click=getName(event)/

/mx:Application




[flexcoders] Re: Invoke RemoteObject synchronic

2009-05-28 Thread mhbmarcos
i have a mxml component, and this have a textField, in the focusOut of ths 
field, i have a handler,

public function focusOutHandle(e:Event): void{

var data:Object = service.getData();invoke remote Object sync;

   /*working with data variable */
   data.set.;
   data.get.;
  trace(data);
}

and, i need that service.getData() be sync invocation to remote Object, and 
not be async.
are you understand me?
is it posible ??

thanks


--- In flexcoders@yahoogroups.com, Fotis Chatzinikos fotis.chatzini...@... 
wrote:

 I do not get it... What is your problem?
 
 On Thu, May 28, 2009 at 8:19 PM, mhbmarcos mhbmar...@... wrote:
 
 
 
  i undertand, but, the handler event (Focus Out) is into the mxml component,
  so, the method for example is:
 
  public function focusOutHandle(e:Event): void{
  
  var data:Object = invoke remote Object sync;
  
 
  
  /*working with data variable */
  data.set.;
  data.get.;
  trace(data);
  }
 
  are you understand me?
 
  so, i need any solution to sync invocation.
 
  Thanks
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Fotis
  Chatzinikos fotis.chatzinikos@ wrote:
  
   yes,
  
   on focus out call the rpc method and turn the component into a waiting
   data state,
   for example disable it and show a loading indicator.
  
   When you get the response from the server,
   turn the component back to its normal state...
  
   On Thu, May 28, 2009 at 6:49 PM, mhbmarcos mhbmarcos@ wrote:
  
   
   
Hi!!!
i need invoke a RemoteObject in sync way?
when focus out in textField, execute a method that requiere the value
returned by RemoteObject, but, this execution must be sync.
any solution for this?
   
Thanks
   
   
   
  
  
  
   --
   Fotis Chatzinikos, Ph.D.
   Founder,
   Phinnovation
   Fotis.Chatzinikos@,
  
 
   
 
 
 
 
 -- 
 Fotis Chatzinikos, Ph.D.
 Founder,
 Phinnovation
 fotis.chatzini...@...,





Re: [flexcoders] Re: Invoke RemoteObject synchronic

2009-05-28 Thread Paul Kukiel
That can't be done.  You need to add a result handler to  
service.getData method and do your data manipulation in that method  
with the result of the remote object call.


Paul.


On 28/05/2009, at 1:52 PM, mhbmarcos wrote:




i have a mxml component, and this have a textField, in the focusOut  
of ths field, i have a handler,


public function focusOutHandle(e:Event): void{

var data:Object = service.getData();invoke remote Object sync;

/*working with data variable */
data.set.;
data.get.;
trace(data);
}

and, i need that service.getData() be sync invocation to remote  
Object, and not be async.

are you understand me?
is it posible ??

thanks

--- In flexcoders@yahoogroups.com, Fotis Chatzinikos  
fotis.chatzini...@... wrote:


 I do not get it... What is your problem?

 On Thu, May 28, 2009 at 8:19 PM, mhbmarcos mhbmar...@... wrote:

 
 
  i undertand, but, the handler event (Focus Out) is into the  
mxml component,

  so, the method for example is:
 
  public function focusOutHandle(e:Event): void{
  
  var data:Object = invoke remote Object sync;
  
 
  
  /*working with data variable */
  data.set.;
  data.get.;
  trace(data);
  }
 
  are you understand me?
 
  so, i need any solution to sync invocation.
 
  Thanks
 
 
  --- In flexcoders@yahoogroups.com flexcoders% 
40yahoogroups.com, Fotis

  Chatzinikos fotis.chatzinikos@ wrote:
  
   yes,
  
   on focus out call the rpc method and turn the component into  
a waiting

   data state,
   for example disable it and show a loading indicator.
  
   When you get the response from the server,
   turn the component back to its normal state...
  
   On Thu, May 28, 2009 at 6:49 PM, mhbmarcos mhbmarcos@ wrote:
  
   
   
Hi!!!
i need invoke a RemoteObject in sync way?
when focus out in textField, execute a method that requiere  
the value

returned by RemoteObject, but, this execution must be sync.
any solution for this?
   
Thanks
   
   
   
  
  
  
   --
   Fotis Chatzinikos, Ph.D.
   Founder,
   Phinnovation
   Fotis.Chatzinikos@,
  
 
 
 



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







Re: [flexcoders] High CPU usage redux

2009-05-28 Thread Tom McNeer
Rick,

On Thu, May 28, 2009 at 9:54 AM, Rick Winscot rick.wins...@zyche.comwrote:

   Your observation that your application footprint increased when touching
 creationPolicy is what one should expect.






Actually, I wasn't very clear: it wasn't that the application footprint
increased (though it did, minimally); rather it was that by having a
TabNavigator with a creationPolicy of all (which I have now managed to
work around), five components were created immediately, each of which added
to the CPU load because of the skinning issue that was common to all of
them.

an increased footprint when adding skins into the mix is also something you
 will probably see.






Sure. But this is CPU usage caused by the stateful skins.


 The part that has me scratching my head is that you are seeing high cpu
 usage - which is something that is typically linked to refresh/redraw rates.
 Do you have any source we can take a look at?








The source wouldn't help you, Rick. It's very typical forms-in-a-tab
navigator stuff. Yes, the issue must be redrawing -- pretty constant
redrawing I'd say.

If you look at the blog post I referenced, you'll get a better view of the
problem. Effective UI did a good deal of testing when they ran into the same
issue, and concluded that it had to be a result of the use of stateful skins
-- although they didn't seem to be able to determine the underlying cause.
They documented some pretty impressive CPU usage by simply adding more
skinned elements.

I'm just kinda surprised more people haven't run into it.



-- 
Thanks,

Tom

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


[flexcoders] adobe autocomplete

2009-05-28 Thread rbrueckmann78
Quick question for anyone using the Adobe autocomplete flex component in Flex 
3.  I have it bound to an array of custom objects.  Works great.  Have a custom 
filter function and a label function and it works beautifullly, except that 
when an item in the resultant filtered dataset has a width longer than the 
width of the autocomplete component, the cursor highlights the text and scrolls 
the selected label in the textinput pieve of the autocomp0lete all the way to 
the right, so the first portion of the lable of the selected item is cut off 
and hidden to the left.  Anyone know how to change this or gain access to the 
text input portion of the autocomplete component to manipultae the selection of 
the text?



Re: [flexcoders] data binding in textinput ?

2009-05-28 Thread Tom McNeer
Hi,

On Thu, May 28, 2009 at 1:45 PM, luvfotography 
ygro...@all-digital-links.com wrote:

   How do I get databinding to work in textinput?




I think you have the idea of databinding a little backwards. Basically, the
bound variable ('userName' in your example) is used to bring data *in*.

In other words, when you have an element like:

mx:TextInput x=46 y=42 id=myName_ti text={userName}/


... you're saying, I have a variable called 'userName,' and I want the
contents of that variable to be displayed in my text input.

So, for instance, if this text input were in an edit form, 'userName' might
represent data coming from a database, which is being placed in the form for
possible editing.

It doesn't mean that whatever is placed in the text input will be injected
into the 'userName' variable. Again, let's say you're pulling a user's
record from a database for editing, and placed the user's data into bound
variables -- one of which is 'userName.'

So the text input would display the current, existing value of 'userName.'
But if you then want to use the edited value, you have to pull it out.
Because what is typed into the text input is accessed through a different
variable -- in this case, 'myName_ti.text' -- not 'userName.' The latter is
simply what came in, not what's going out.

Now if you wanted to have a different MXML element bound to the value of the
text input, you could.

mx:Button label={myName_ti.text} /

... and whatever is typed into the text input will appear on the button.

But if you want to place the text content back into your 'userName'
variable, you'll need to put it there through an event.

You could use an onchange event in the text input to fire a function that
would place the myName.text into userName. But if you did that, you'd create
a circular binding which probably wouldn't be good.

Assuming this is a standard form-like application, you might have a Save
button with a click event. In the click handler function, you'd validate the
form input and place the contents of the form fields into a value object, or
various variables, then pass those to whatever service actually saves stuff
to the database.




-- 
Thanks,

Tom

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


[flexcoders] Re: Successive Videos Display

2009-05-28 Thread bharat_00001
Thanks for the suggestion. I have a bit of confusion. What do you mean by load 
the next one when while one is playing. ActionScript isn't multiothreaded. How 
can it load the next and play the current at the same time. Or did I not follow 
whatyou said correctly?


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

 On Wed, May 27, 2009 at 6:20 PM, bharat_1 bharat_00...@... 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: Invoke RemoteObject synchronic

2009-05-28 Thread mhbmarcos
i don´t invoke the resultFunction, i need 
invoke a serviceFunction without result Function, 
like other local function.
because, i need the result in the same method:

example, 

public function focusOutHandle( e:Event): void{
 
  var data:Object = invoke remote Object sync;
 
 
   /*working with data variable */
  data.set .;
  data.get .;
  trace(data);
}

the variable data, recive the result of invoke remote object in sync way, i 
need manipulete the result into de focusOutHandler.
The invoke to remote object is like a local function, is it posible?

thanks




Re: [flexcoders] popup systemManager not working

2009-05-28 Thread hoz

Here's my custom event, which works well with other applications...
package com.event
{
import flash.events.Event;
import com.vo.NewMemberInfo;

public class SendNewMember extends Event {
  
public var newmemberinfo:NewMemberInfo;
   
//Constructor
public function SendNewMember(type:String,
newmemberinfo:NewMemberInfo) {
super(type);
this.newmemberinfo = newmemberinfo;
}

override public function clone():Event {
return new SendNewMember(type, newmemberinfo);
}

}
}

valdhor-3 wrote:
 
 Is the SendNewMember event set to bubble?
 
 --- In flexcoders@yahoogroups.com, Mark Hosny h...@... wrote:

 Hey guys,
 
 For some reason when I dispatch a custom event via the pop up, my  
 main app isn't receiving the event.
 
 In my main app I have a custom component called search, which  
 contains a button to open up a pop window called new member. In my  
 pop up I have this:
 
 mx:Metadata
  [Event(name=onSendNewMember,type=com.event.SendNewMember)]
 /mx:Metadata
 
 private function submitForm():void
  {
  newmemberinfo = new NewMemberInfo();
  newmemberinfo.HOHlastName = HOHlastName_txt.text;
  
  !---abbreviate VO's for space---
  
  dispatchEvent(new SendNewMember 
 (onSendNewMember,newmemberinfo));
  }
 
 Then in my main app
 
 application.systemManager.addEventListener 
 (onSendNewMember,onSendNewMember);
 
 private function onSendNewMember(event:SendNewMember):void
  {
  Alert.show('GOT IT');
  }
 
 
 thanks,
 
 hoz

 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/popup-systemManager-not-working-tp23765693p23767440.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Re: data binding in textinput ?

2009-05-28 Thread markgoldin_2000
He is not the only one who would think that binding should work both directions.

--- In flexcoders@yahoogroups.com, Tom McNeer tmcn...@... wrote:

 Hi,
 
 On Thu, May 28, 2009 at 1:45 PM, luvfotography 
 ygro...@... wrote:
 
How do I get databinding to work in textinput?
 
 
 
 
 I think you have the idea of databinding a little backwards. Basically, the
 bound variable ('userName' in your example) is used to bring data *in*.
 
 In other words, when you have an element like:
 
 mx:TextInput x=46 y=42 id=myName_ti text={userName}/
 
 
 ... you're saying, I have a variable called 'userName,' and I want the
 contents of that variable to be displayed in my text input.
 
 So, for instance, if this text input were in an edit form, 'userName' might
 represent data coming from a database, which is being placed in the form for
 possible editing.
 
 It doesn't mean that whatever is placed in the text input will be injected
 into the 'userName' variable. Again, let's say you're pulling a user's
 record from a database for editing, and placed the user's data into bound
 variables -- one of which is 'userName.'
 
 So the text input would display the current, existing value of 'userName.'
 But if you then want to use the edited value, you have to pull it out.
 Because what is typed into the text input is accessed through a different
 variable -- in this case, 'myName_ti.text' -- not 'userName.' The latter is
 simply what came in, not what's going out.
 
 Now if you wanted to have a different MXML element bound to the value of the
 text input, you could.
 
 mx:Button label={myName_ti.text} /
 
 ... and whatever is typed into the text input will appear on the button.
 
 But if you want to place the text content back into your 'userName'
 variable, you'll need to put it there through an event.
 
 You could use an onchange event in the text input to fire a function that
 would place the myName.text into userName. But if you did that, you'd create
 a circular binding which probably wouldn't be good.
 
 Assuming this is a standard form-like application, you might have a Save
 button with a click event. In the click handler function, you'd validate the
 form input and place the contents of the form fields into a value object, or
 various variables, then pass those to whatever service actually saves stuff
 to the database.
 
 
 
 
 -- 
 Thanks,
 
 Tom
 
 Tom McNeer
 MediumCool
 http://www.mediumcool.com
 1735 Johnson Road NE
 Atlanta, GA 30306
 404.589.0560





[flexcoders] Re: Run time Warning

2009-05-28 Thread Tim Hoff

Hence the warning.  Like Array, XML is not bindable.  You might try
converting the XML to an XMLListCollection.

-TH

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

 But my XML is set to bindable.

 --- In flexcoders@yahoogroups.com, Jake Churchill jake@ wrote:
 
  Convert the XML to an arraycollection of VOs and make the entire VO
class
  bindable.
 
 
 
  Jake Churchill
 
  CF Webtools
 
  11204 Davenport, Ste. 100
 
  Omaha, NE 68154
 
  http://www.cfwebtools.com
 
  402-408-3733 x103
 
 
 
  From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com]
On
  Behalf Of markgoldin_2000
  Sent: Thursday, May 28, 2009 8:28 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Run time Warning
 
 
 
 
 
 
 
 
  warning: unable to bind to property 'ext' on class 'XML' (class is
not an
  IEventDispatcher)
 
  It's coming from:
  mx:FormItem label=Ext required=true includeInLayout=false
  mx:TextInput id=ext focusOut=c.formatNumbers(ext, salesreps)
  width=10%
  text={salesreps.selectedItem.ext}
  restrict=0-9/
  /mx:FormItem
 
  where salesreps is a DataGrid with an XML as a dataProvider.
 
  Any idea?
 






Re: [flexcoders] Re: Successive Videos Display

2009-05-28 Thread mark . jonkman
Flash may be single threaded in terms of ActionScript code execution, but when 
you call something to load, Flash doesn't stay locked down on the load, it 
continues to give a slice of its processing to multiple operations, one at a 
time, stepping through a list of active processes. It even idles for a few 
milliseconds and then begins the entire process over again, executing code in 
each movieclip, main timeline, load processes, drawing the screen, breathe and 
repeat (not necessarily in that order). All net operations are handled 
asynchronously, you start it and either check back later if its done or listen 
for an event. So in theory if you had multiple NetStream instances, you could 
begin loading a video in each one, then attach the stream to the Video instance 
when you want to actually view it. I wouldn't necessarily attempt to do to many 
simultaneously, but if you are doing progressive flv you could monitor when the 
first one has finished loading (not playing) and begin loading the next video 
assuming you can anticipate the play order. I haven't done this myself, but in 
theory its plausible and perhaps the only way to do what you want to do. 

Sincerely 
Mark R. Jonkman 


- Original Message - 
From: bharat_1 bharat_00...@yahoo.com 
To: flexcoders@yahoogroups.com 
Sent: Thursday, May 28, 2009 2:20:21 PM GMT -05:00 US/Canada Eastern 
Subject: [flexcoders] Re: Successive Videos Display 

Thanks for the suggestion. I have a bit of confusion. What do you mean by load 
the next one when while one is playing. ActionScript isn't multiothreaded. How 
can it load the next and play the current at the same time. Or did I not follow 
whatyou said correctly? 


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

On Wed, May 27, 2009 at 6:20 PM, bharat_1 bharat_00...@... 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 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 





[flexcoders] Re: Flex Data Grid Question

2009-05-28 Thread Tim Hoff

Check out the AdvancedDataGrid control and documentation.

-TH

--- In flexcoders@yahoogroups.com, guess what myworld10...@... wrote:


 I need to draw a data grid where I need to do paint subtotals and and
page total and group by some category . Can anyone provide me witha same
xml for this kind of table

 Item ID Name Qty Price

 Milk --- This is how it should be milk should
be first row [Just a blank row with Milk in it ]

 1. Soy Milk l 5USD
 2. Choclate 2 15USD

 SubTotal 20 USD [ Again Blank row ]

 Water [ Again Blank Row ]

 1. Aqua 1 10USD
 2. Calistoga 1 10USD

 SubTotal 20 USD [ Again Blank row ]

 PurchaseTotal 40 USD [ Again Blank row ]


 Can someone provide with an xml for this type of table in flex . Is it
possible .






[flexcoders] Re: Invoke RemoteObject synchronic

2009-05-28 Thread valdhor
You cannot do this.

RemoteObject calls are asyncronous.

You have to set up a result handler for the remoteObject call and then you can 
manipulate the returned data.




--- In flexcoders@yahoogroups.com, mhbmarcos mhbmar...@... wrote:

 i don´t invoke the resultFunction, i need 
 invoke a serviceFunction without result Function, 
 like other local function.
 because, i need the result in the same method:
 
 example, 
 
 public function focusOutHandle( e:Event): void{
  
   var data:Object = invoke remote Object sync;
  
  
/*working with data variable */
   data.set .;
   data.get .;
   trace(data);
 }
 
 the variable data, recive the result of invoke remote object in sync way, i 
 need manipulete the result into de focusOutHandler.
 The invoke to remote object is like a local function, is it posible?
 
 thanks





Re: [flexcoders] popup systemManager not working

2009-05-28 Thread hoz

Hey guys,

I added bubbles to true in my custom event, and it worked! OK, so I'm a
little puzzled b/c I have other custom events going without having to add
that. I thought Bubbles default was true...


hoz wrote:
 
 Here's my custom event, which works well with other applications...
 package com.event
 {
 import flash.events.Event;
 import com.vo.NewMemberInfo;
 
 public class SendNewMember extends Event {
   
 public var newmemberinfo:NewMemberInfo;

 //Constructor
 public function SendNewMember(type:String,
 newmemberinfo:NewMemberInfo) {
 super(type);
 this.newmemberinfo = newmemberinfo;
 }
 
 override public function clone():Event {
 return new SendNewMember(type, newmemberinfo);
 }
 
 }
 }
 
 valdhor-3 wrote:
 
 Is the SendNewMember event set to bubble?
 
 --- In flexcoders@yahoogroups.com, Mark Hosny h...@... wrote:

 Hey guys,
 
 For some reason when I dispatch a custom event via the pop up, my  
 main app isn't receiving the event.
 
 In my main app I have a custom component called search, which  
 contains a button to open up a pop window called new member. In my  
 pop up I have this:
 
 mx:Metadata
 [Event(name=onSendNewMember,type=com.event.SendNewMember)]
 /mx:Metadata
 
 private function submitForm():void
  {
 newmemberinfo = new NewMemberInfo();
 newmemberinfo.HOHlastName = HOHlastName_txt.text;
 
 !---abbreviate VO's for space---
 
  dispatchEvent(new SendNewMember 
 (onSendNewMember,newmemberinfo));
  }
 
 Then in my main app
 
 application.systemManager.addEventListener 
 (onSendNewMember,onSendNewMember);
 
 private function onSendNewMember(event:SendNewMember):void
 {
 Alert.show('GOT IT');
  }
 
 
 thanks,
 
 hoz

 
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/popup-systemManager-not-working-tp23765693p23767562.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Re: data binding in textinput ?

2009-05-28 Thread Tim Hoff

 You could use an onchange event in the text input to fire a function
that
 would place the myName.text into userName. But if you did that, you'd
create
 a circular binding which probably wouldn't be good.

It wouldn't be an infinite loop; so its not all that bad.

mx:TextInput id=myName_ti text={userName} change=userName =
myName_ti.text/

-TH

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

 He is not the only one who would think that binding should work both
directions.

 --- In flexcoders@yahoogroups.com, Tom McNeer tmcneer@ wrote:
 
  Hi,
 
  On Thu, May 28, 2009 at 1:45 PM, luvfotography 
  ygroups@ wrote:
 
   How do I get databinding to work in textinput?
  
 
 
 
  I think you have the idea of databinding a little backwards.
Basically, the
  bound variable ('userName' in your example) is used to bring data
*in*.
 
  In other words, when you have an element like:
 
  mx:TextInput x=46 y=42 id=myName_ti text={userName}/
 
 
  ... you're saying, I have a variable called 'userName,' and I want
the
  contents of that variable to be displayed in my text input.
 
  So, for instance, if this text input were in an edit form,
'userName' might
  represent data coming from a database, which is being placed in the
form for
  possible editing.
 
  It doesn't mean that whatever is placed in the text input will be
injected
  into the 'userName' variable. Again, let's say you're pulling a
user's
  record from a database for editing, and placed the user's data into
bound
  variables -- one of which is 'userName.'
 
  So the text input would display the current, existing value of
'userName.'
  But if you then want to use the edited value, you have to pull it
out.
  Because what is typed into the text input is accessed through a
different
  variable -- in this case, 'myName_ti.text' -- not 'userName.' The
latter is
  simply what came in, not what's going out.
 
  Now if you wanted to have a different MXML element bound to the
value of the
  text input, you could.
 
  mx:Button label={myName_ti.text} /
 
  ... and whatever is typed into the text input will appear on the
button.
 
  But if you want to place the text content back into your 'userName'
  variable, you'll need to put it there through an event.
 
  You could use an onchange event in the text input to fire a function
that
  would place the myName.text into userName. But if you did that,
you'd create
  a circular binding which probably wouldn't be good.
 
  Assuming this is a standard form-like application, you might have a
Save
  button with a click event. In the click handler function, you'd
validate the
  form input and place the contents of the form fields into a value
object, or
  various variables, then pass those to whatever service actually
saves stuff
  to the database.
 
 
 
 
  --
  Thanks,
 
  Tom
 
  Tom McNeer
  MediumCool
  http://www.mediumcool.com
  1735 Johnson Road NE
  Atlanta, GA 30306
  404.589.0560
 





[flexcoders] Re: popup systemManager not working

2009-05-28 Thread Tim Hoff

Popups are not on the same DisplayList as other components; so they have
to be treated a bit differently.

-TH

--- In flexcoders@yahoogroups.com, hoz h...@... wrote:


 Hey guys,

 I added bubbles to true in my custom event, and it worked! OK, so I'm
a
 little puzzled b/c I have other custom events going without having to
add
 that. I thought Bubbles default was true...


 hoz wrote:
 
  Here's my custom event, which works well with other applications...
  package com.event
  {
  import flash.events.Event;
  import com.vo.NewMemberInfo;
 
  public class SendNewMember extends Event {
 
  public var newmemberinfo:NewMemberInfo;
 
  //Constructor
  public function SendNewMember(type:String,
  newmemberinfo:NewMemberInfo) {
  super(type);
  this.newmemberinfo = newmemberinfo;
  }
 
  override public function clone():Event {
  return new SendNewMember(type, newmemberinfo);
  }
 
  }
  }
 
  valdhor-3 wrote:
 
  Is the SendNewMember event set to bubble?
 
  --- In flexcoders@yahoogroups.com, Mark Hosny hoz@ wrote:
 
  Hey guys,
 
  For some reason when I dispatch a custom event via the pop up, my
  main app isn't receiving the event.
 
  In my main app I have a custom component called search, which
  contains a button to open up a pop window called new member. In my
  pop up I have this:
 
  mx:Metadata
  [Event(name=onSendNewMember,type=com.event.SendNewMember)]
  /mx:Metadata
 
  private function submitForm():void
  {
  newmemberinfo = new NewMemberInfo();
  newmemberinfo.HOHlastName = HOHlastName_txt.text;
 
  !---abbreviate VO's for space---
 
  dispatchEvent(new SendNewMember
  (onSendNewMember,newmemberinfo));
  }
 
  Then in my main app
 
  application.systemManager.addEventListener
  (onSendNewMember,onSendNewMember);
 
  private function onSendNewMember(event:SendNewMember):void
  {
  Alert.show('GOT IT');
  }
 
 
  thanks,
 
  hoz
 
 
 
 
 
 
 

 --
 View this message in context:
http://www.nabble.com/popup-systemManager-not-working-tp23765693p2376756\
2.html
 Sent from the FlexCoders mailing list archive at Nabble.com.






Re: [flexcoders] Re: Flex Data Grid Question

2009-05-28 Thread guess what

I did , but I am not sure how to do with row and value on it for the example 
asked . Can you provide me with a sample .
The problem is I can group rows using Advanced Data grid , but if i wanted to 
display something like footer rows in betwen Data grid . I can not able to do 
it .
--- On Thu, 5/28/09, Tim Hoff timh...@aol.com wrote:

 From: Tim Hoff timh...@aol.com
 Subject: [flexcoders] Re: Flex Data Grid Question
 To: flexcoders@yahoogroups.com
 Date: Thursday, May 28, 2009, 1:37 PM
 
 
 
 
 
 
 
 
 
 
  
 
 
 
 
 
 
 
 
 
 
 
   
   
 
 Check out the AdvancedDataGrid control and documentation.
 
 
 
 -TH
 
 
 
 --- In flexcod...@yahoogro
 ups.com, guess what myworld100us@ ... wrote:
 
 
 
 
 
  I need to draw a data grid where I need to do paint
 subtotals and and
 
 page total and group by some category . Can anyone provide
 me witha same
 
 xml for this kind of table
 
 
 
  Item ID Name Qty Price
 
 
 
  Milk  - -- This is how it
 should be milk should
 
 be first row [Just a blank row with Milk in it ]
 
 
 
  1. Soy Milk l 5USD
 
  2. Choclate 2 15USD
 
 
 
  SubTotal 20 USD [ Again Blank row ]
 
 
 
  Water  - ---[ Again Blank Row ]
 
 
 
  1. Aqua 1 10USD
 
  2. Calistoga 1 10USD
 
 
 
  SubTotal 20 USD [ Again Blank row ]
 
 
 
  PurchaseTotal 40 USD [ Again Blank row ]
 
 
 
 
 
  Can someone provide with an xml for this type of table
 in flex . Is it
 
 possible .
 
 
 
 
 
 
  
 
   
 
 
 
   

   
   
 
 
 
 
   
 
 
 
 
   
   
 
 
   
   
   
 
 


  


[flexcoders] Re: Flex Data Grid Question

2009-05-28 Thread Tim Hoff

A quick Google search:

http://www.forta.com/blog/index.cfm/2008/1/29/Summarizing-Grouped-Data-W\
ith-Flex-3-AdvancedDataGrid
http://www.forta.com/blog/index.cfm/2008/1/29/Summarizing-Grouped-Data-\
With-Flex-3-AdvancedDataGrid

-TH

--- In flexcoders@yahoogroups.com, guess what myworld10...@... wrote:


 I did , but I am not sure how to do with row and value on it for the
example asked . Can you provide me with a sample .
 The problem is I can group rows using Advanced Data grid , but if i
wanted to display something like footer rows in betwen Data grid . I can
not able to do it .
 --- On Thu, 5/28/09, Tim Hoff timh...@... wrote:

  From: Tim Hoff timh...@...
  Subject: [flexcoders] Re: Flex Data Grid Question
  To: flexcoders@yahoogroups.com
  Date: Thursday, May 28, 2009, 1:37 PM
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  Check out the AdvancedDataGrid control and documentation.
 
 
 
  -TH
 
 
 
  --- In flexcod...@yahoogro
  ups.com, guess what myworld100us@ ... wrote:
 
  
 
  
 
   I need to draw a data grid where I need to do paint
  subtotals and and
 
  page total and group by some category . Can anyone provide
  me witha same
 
  xml for this kind of table
 
  
 
   Item ID Name Qty Price
 
  
 
   Milk  - -- This is how it
  should be milk should
 
  be first row [Just a blank row with Milk in it ]
 
  
 
   1. Soy Milk l 5USD
 
   2. Choclate 2 15USD
 
  
 
   SubTotal 20 USD [ Again Blank row ]
 
  
 
   Water  - ---[ Again Blank Row ]
 
  
 
   1. Aqua 1 10USD
 
   2. Calistoga 1 10USD
 
  
 
   SubTotal 20 USD [ Again Blank row ]
 
  
 
   PurchaseTotal 40 USD [ Again Blank row ]
 
  
 
  
 
   Can someone provide with an xml for this type of table
  in flex . Is it
 
  possible .
 
  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 





Re: [flexcoders] popup systemManager not working

2009-05-28 Thread hoz

Thanks!

Those crazy pop ups!! They do serve a good purpose, and hopefully this will
give a little insight for those who try to tackle them in their projects.


hoz wrote:
 
 Hey guys,
 
 For some reason when I dispatch a custom event via the pop up, my  
 main app isn't receiving the event.
 
 In my main app I have a custom component called search, which  
 contains a button to open up a pop window called new member. In my  
 pop up I have this:
 
 mx:Metadata
   [Event(name=onSendNewMember,type=com.event.SendNewMember)]
 /mx:Metadata
 
 private function submitForm():void
  {
   newmemberinfo = new NewMemberInfo();
   newmemberinfo.HOHlastName = HOHlastName_txt.text;
   
   !---abbreviate VO's for space---
   
  dispatchEvent(new SendNewMember 
 (onSendNewMember,newmemberinfo));
  }
 
 Then in my main app
 
 application.systemManager.addEventListener 
 (onSendNewMember,onSendNewMember);
 
 private function onSendNewMember(event:SendNewMember):void
   {
   Alert.show('GOT IT');
  }
 
 
 thanks,
 
 hoz
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/popup-systemManager-not-working-tp23765693p23767934.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] adobe autocomplete

2009-05-28 Thread Jeffry Houser

 I'm not sure I fully understand what you want to do, and I haven't 
delved into the Adobe AutoComplete. 

 Once you dig into the code and find a hook to the TextInput, I believe 
you can use setSelection method to move the cursor all the way to the 
left. 

rbrueckmann78 wrote:
 Quick question for anyone using the Adobe autocomplete flex component in Flex 
 3.  I have it bound to an array of custom objects.  Works great.  Have a 
 custom filter function and a label function and it works beautifullly, except 
 that when an item in the resultant filtered dataset has a width longer than 
 the width of the autocomplete component, the cursor highlights the text and 
 scrolls the selected label in the textinput pieve of the autocomp0lete all 
 the way to the right, so the first portion of the lable of the selected item 
 is cut off and hidden to the left.  Anyone know how to change this or gain 
 access to the text input portion of the autocomplete component to manipultae 
 the selection of the text?

   


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




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

2009-05-28 Thread Dharmendra Chauhan
Hi Alex,
 I think  , I failed to communicate the real issue.  Let  me  try  to
explain it
The issue is with callBack ,what is happening is as soon you hide Flex
application by opening another application(any app)  and then again you
come  back to  your flex  app , call back  does not work , they are
broken.I found following related jira for this.

http://bugs.adobe.com/jira/browse/FP-143

To  solve this issue , I am re-registering all callBacks on  ENTER_FRAME
event and issue appears to be solved but this  is leading to  memory
leak.

Neither Activate nor FocusEvent.FOCUS_IN does  serve my purpose , both
required  a mouse Clk before they dispached.

Workaroud for any of the above will solve my problem. I am wondering If
there is any event which gets fired when I swich back to the flex app
again.

  My application is  hosted as ActiveX control and I m calling callback
from Dot Net application.


Regard,
Dharmendra






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

 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...@...mailto:chauhan_icse%40yahoo.com wrote:

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

 activate?

 Manish




[flexcoders] keeping aspect ratios of containers

2009-05-28 Thread blc187
is there an easy way to keep a container at a specific aspect ratio?

i have an hDividedBox but i want the vbox on the left side to always be twice 
as high as it is wide.  how can i keep a container at this aspect ratio while 
having the child on the right in the hDividedBox fill the rest of the space?



[flexcoders] Re: Invoke RemoteObject synchronic

2009-05-28 Thread mhbmarcos
ok, thanks

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

 You cannot do this.
 
 RemoteObject calls are asyncronous.
 
 You have to set up a result handler for the remoteObject call and then you 
 can manipulate the returned data.
 
 
 
 
 --- In flexcoders@yahoogroups.com, mhbmarcos mhbmarcos@ wrote:
 
  i don´t invoke the resultFunction, i need 
  invoke a serviceFunction without result Function, 
  like other local function.
  because, i need the result in the same method:
  
  example, 
  
  public function focusOutHandle( e:Event): void{
   
var data:Object = invoke remote Object sync;
   
   
 /*working with data variable */
data.set .;
data.get .;
trace(data);
  }
  
  the variable data, recive the result of invoke remote object in sync way, i 
  need manipulete the result into de focusOutHandler.
  The invoke to remote object is like a local function, is it posible?
  
  thanks
 





[flexcoders] Re: Value Objects

2009-05-28 Thread mikeashields
Ironically upon reluctantly plunging back online today in a quest for VO 
understanding I came across this post:  
http://www.advantexllc.com/blog/post.cfm/how-oo-almost-destroyed-my-business 

Now let me first SHOUT a sincere thankyou to all community members who 
contribute their expertise to these forums.  Second I want to stress my 
frustration is similar to the above poster in the requirement to learn so 
extensively at the expense of getting things done.

That said, even my limited experience in HTML revealed the need of big apps 
such as the one I am attempting to have an architecture.  

So, rather than continuing to understand VOs as a building block toward 
implementing an architecture I've decided to tepidly take on one of 
Cairngorm/MVC/Swiz -- actually Mate is the leader after the first hour of 
reading fwiw.

Yet (in no small part because the decision above could be a blind alley) I 
would appreciate continued feedback on a few conclusions I set out below 
(hopefully) for the benefit of future readers.

1.)  MVC needs to be understood in the context that all three building blocks 
of a web app (Database -- WebServer/CF -- Frontend/Flex) might each contain 
some of all three MVC aspects (ie model exists both on View and obviously at 
dbase).  Hence for example a CF architecture like cfonwheels is potentially 
both  supplementary to and redundant to a flex architecture. Similar assertions 
apply to my intention to push (some) business logic past from CF into MySql 
Stored Procedures.  For better or worse though, many existing architectures 
focus solely on their layer (DB/WebServer/View).

2.)  Implementing any architecture infers learning and then working with a 
great deal of other peoples sometimes poorly documented code.  Yet this to an 
extent is not that different from using say MXML -- which I probably am 
semantically wrong to say but is arguably an architecture itself.  
Regardless, architectures add overhead to non-large apps (presumably there is 
an economy of scale effect).

3.)  Boiling everything down, the need is to manage DBase -- View 
interactions.  JSP/CF can assign properties to DB elements which Flex/AS can 
map to for increased efficiencies.  Cost/Benefit of CF included, are JSP a 
more programmically straightforward option??

As always, thanks in advance.



Re: [flexcoders] Re: Successive Videos Display

2009-05-28 Thread Manish Jethani
On Thu, May 28, 2009 at 11:50 PM, bharat_1 bharat_00...@yahoo.com wrote:
 Thanks for the suggestion. I have a bit of confusion. What do you mean by 
 load the next one when while one is playing. ActionScript isn't 
 multiothreaded. How can it load the next and play the current at the same 
 time. Or did I not follow whatyou said correctly?

You can call load() on one instance (or many instances) while the
first one is playing.

ActionScript is a programming language, and it has no native support
for threads (it has no native support for events either).

The Flash Player is the runtime. It has support for events, obviously,
through the events API.

The player is able to perform a number of asynchronous tasks in the
background while the application continues to function normally.
Typically for such tasks you'll get progress and complete events.
You don't have to do any multi-threading for such tasks yourself: just
start the task (by calling the load() method on VideoDisplay for
instance) and wait for the events.

Internally the player may be using multiple threads or just a single
thread for these background tasks. It doesn't matter either way. If it
uses a single thread, it'll just loop through these tasks in what can
be called the event loop and perform them little by little on each
iteration, at the same time processing user events as well. So you
continue to get your mouse and keyboard events while the data is still
downloading.

Manish


Re: [flexcoders] offset in chart with two series

2009-05-28 Thread thomas parquier
Dataproviders of the two series are sliced arrays from two bigger arrays,
the issue seems to be a mis-slicing of the original arrays...
Sorry for the pollution.

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/26 thomas parquier mailingli...@web-attitude.fr

 Hi,

 I think such a behavior has already been posted on the list, but google nor
 yahoo could get the email back.
 I wrote an application which can display multiple series on a chart, but
 when two lineseries are set, one is displaying with an offset though first
 and last data items have same xfield value, so I think the offset is a ui
 offset.

 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



Re: [flexcoders] keeping aspect ratios of containers

2009-05-28 Thread Manish Jethani
On Fri, May 29, 2009 at 12:42 AM, blc187 blc...@yahoo.com wrote:
 is there an easy way to keep a container at a specific aspect ratio?

 i have an hDividedBox but i want the vbox on the left side to always be twice 
 as high as it is wide.  how can i keep a container at this aspect ratio while 
 having the child on the right in the hDividedBox fill the rest of the space?

I don't know if this works:

 HDividedBox
   Child1 id=child1 width={child1.height / 2} /
   Child2 id=child2 width=100% /
 /

If that doesn't do the trick, you'll have to subclass HDividedBox and
implement updateDisplayList according to these rules.

Manish


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

2009-05-28 Thread Manish Jethani
On Fri, May 29, 2009 at 12:40 AM, Dharmendra Chauhan
chauhan_i...@yahoo.com wrote:

 The issue is with callBack ,what is happening is as soon you hide Flex
 application by opening another application(any app)  and then again you
 come  back to  your flex  app , call back  does not work , they are broken.I
 found following related jira for this.

 http://bugs.adobe.com/jira/browse/FP-143

 To  solve this issue , I am re-registering all callBacks on  ENTER_FRAME
 event and issue appears to be solved but this  is leading to  memory leak.

 Neither Activate nor FocusEvent.FOCUS_IN does  serve my purpose , both
 required  a mouse Clk before they dispached.

I thought you'd get 'activate' when the player got focus. You could
try setting the focus back to Flash through JavaScript (I don't
remember how to do this now). You should be getting a focus event on
the HTML/JS side at least.

Manish


Re: [flexcoders] Re: Invoke RemoteObject synchronic

2009-05-28 Thread Manish Jethani
On Thu, May 28, 2009 at 11:28 PM, Laurence MacNeill
lmacne...@comcast.net wrote:

 I think he means he wants to work on the data from within the calling
 function, rather than having to go to a result-handler function to use the
 data?  I didn't know that was possible, but I'm pretty new to Flex, so
 perhaps it's just something I've not yet experienced.

That's not possible. Very annoying at times. The best you can do is to
set up an inline event handler:

  component.loadData();
  component.addEventListener(complete, function (e:*):void {
  // process data
  });

I try to avoid that though in all but the rarest cases. It makes the code messy.

Manish


Re: [flexcoders] popup systemManager not working

2009-05-28 Thread Manish Jethani
On Fri, May 29, 2009 at 12:08 AM, hoz h...@satx.rr.com wrote:

 I added bubbles to true in my custom event, and it worked! OK, so I'm a
 little puzzled b/c I have other custom events going without having to add
 that. I thought Bubbles default was true...

bubbles is false by default.

It's not the popups that's the problem, it's the fact that you're not
listening for the event on the popup object itself.

If you did this:

  popup.addEventListener(...)

... it would work, without bubbles set to true.

Manish


Re: [flexcoders] data binding in textinput ?

2009-05-28 Thread Manish Jethani
On Thu, May 28, 2009 at 11:15 PM, luvfotography
ygro...@all-digital-links.com wrote:
 How do I get databinding to work in textinput?
 In this example below, I have a TextInput defined with the text bound to 
 {userName}, when I run the app, and enter text into the TextInput field, I 
 would like the text entered assigned to the Bindable character string 
 userName, however it is not.  What's the proper way to do this?

  mx:String id=userName{myName.text}/mx:String

MXML rules.

Manish


Re: [flexcoders] Re: Value Objects

2009-05-28 Thread Laurence MacNeill
At 03:49 PM 5/28/2009, you wrote:

3.) Boiling everything down, the need is to manage DBase -- View 
interactions. JSP/CF can assign properties to DB elements which 
Flex/AS can map to for increased efficiencies. Cost/Benefit of CF 
included, are JSP a more programmically straightforward option??

Being relatively new to Flex, I'm probably not qualified to answer 
this question, but in my (admittedly limited) experience, I've found 
CF to be the more straightforward approach, albeit the more 
expensive one, when compared to JSP.

FlexBuilder just makes it so easy (especially with the CFEclipse 
add-on) to work with your CF server-side stuff at the same time 
you're coding in Flex.  And the CF-wizards that are included with 
FlexBuilder are so easy to use -- only a few clicks to create the CF 
VO to go with your Action-Script VO, with minimal changes needed in 
the wizard-generated CF code to make it work.

I just find woking with CF to be a ton easier than working with JSP, 
I guess is what I'm trying to say.  FlexBuilder was created by Adobe, 
so they're probably biased towards CF, which is probably why working 
with CF within FlexBuilder is easier out-of-the-box.  But it works well for me.

Just a newbie's $0.02 worth.

Laurence MacNeill
Mableton, Georgia, USA



Re: [flexcoders] Re: Flex Data Grid Question

2009-05-28 Thread guess what
Thanks That was useful. 
But now since my collumns are also dynamic , How do i do Summary Fields and 
Grouping using Action Script . I did a search by in Google . But I coudnt find 
any example .
I have got the advanced Data grid working on Action Script . But i dont know 
how to add summary fields and grouping using Action Script . if you folks  can 
link me to some example I would appreciate 
 
Thanks 
 


--- On Thu, 5/28/09, Tim Hoff timh...@aol.com wrote:


From: Tim Hoff timh...@aol.com
Subject: [flexcoders] Re: Flex Data Grid Question
To: flexcoders@yahoogroups.com
Date: Thursday, May 28, 2009, 2:00 PM









A quick Google search:
http://www.forta. com/blog/ index.cfm/ 2008/1/29/ Summarizing- Grouped-Data- 
With-Flex- 3-AdvancedDataGr id
-TH

--- In flexcod...@yahoogro ups.com, guess what myworld100us@ ... wrote:

 
 I did , but I am not sure how to do with row and value on it for the example 
 asked . Can you provide me with a sample .
 The problem is I can group rows using Advanced Data grid , but if i wanted to 
 display something like footer rows in betwen Data grid . I can not able to do 
 it .
 --- On Thu, 5/28/09, Tim Hoff timh...@... wrote:
 
  From: Tim Hoff timh...@...
  Subject: [flexcoders] Re: Flex Data Grid Question
  To: flexcod...@yahoogro ups.com
  Date: Thursday, May 28, 2009, 1:37 PM
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  Check out the AdvancedDataGrid control and documentation.
  
  
  
  -TH
  
  
  
  --- In flexcod...@yahoogro
  ups.com, guess what myworld100us@ ... wrote:
  
  
  
  
  
   I need to draw a data grid where I need to do paint
  subtotals and and
  
  page total and group by some category . Can anyone provide
  me witha same
  
  xml for this kind of table
  
  
  
   Item ID Name Qty Price
  
  
  
   Milk  - -- This is how it
  should be milk should
  
  be first row [Just a blank row with Milk in it ]
  
  
  
   1. Soy Milk l 5USD
  
   2. Choclate 2 15USD
  
  
  
   SubTotal 20 USD [ Again Blank row ]
  
  
  
   Water  - ---[ Again Blank Row ]
  
  
  
   1. Aqua 1 10USD
  
   2. Calistoga 1 10USD
  
  
  
   SubTotal 20 USD [ Again Blank row ]
  
  
  
   PurchaseTotal 40 USD [ Again Blank row ]
  
  
  
  
  
   Can someone provide with an xml for this type of table
  in flex . Is it
  
  possible .
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 

















  

[flexcoders] best practice to handle overloading in AS3?

2009-05-28 Thread gwangdesign
Hi,

I am trying to overload a method (same name and different signatures)in a 
subclass. In the inherited class, the method looks like this:

  public function set dataProvider(value:Array):void

In my subclass I want the method to look like this:

  public function set dataProviderr(v:Object):void

So that I can handle different types.

I understand AS3 doesn't support overloading. What would be the smart way(s) to 
handle this?

Thanks.

geng 



Re: [flexcoders] best practice to handle overloading in AS3?

2009-05-28 Thread Pedro Sena
If you want the same method name in a subclass, we are talking about
override, not overload.

Flex 'deals with overload' making the arguments optionals, example:

public function test(obj:Object = null):void

then you can invoke it using test() or test(object).

Appears that you are trying to override parent's function but changing it
signature, that is not possible.

If you want to have in the same class, in the same function, receive two
different parameters, you can:

public function set dataProviderr(v:Object = null, a:Array = null):void

Then you can put the argument that you want, leaving the another one as null

or you can

public function set dataProviderr(v:*):void

This way you can pass anything you like.

Both solutions are ugly, IMHO, but is the way flex works.

HTH,

PS

On Thu, May 28, 2009 at 6:58 PM, gwangdesign gwangdes...@yahoo.com wrote:



 Hi,

 I am trying to overload a method (same name and different signatures)in a
 subclass. In the inherited class, the method looks like this:

 public function set dataProvider(value:Array):void

 In my subclass I want the method to look like this:

 public function set dataProviderr(v:Object):void

 So that I can handle different types.

 I understand AS3 doesn't support overloading. What would be the smart
 way(s) to handle this?

 Thanks.

 geng

  




-- 
/**
* Pedro Sena
* Systems Architect
* Sun Certified Java Programmer
* Sun Certified Web Component Developer
*/


[flexcoders] Re: best practice to handle overloading in AS3?

2009-05-28 Thread gwangdesign
Hi Pedro,

Thanks for the guide.

What if I don't have any control over my superclass, like if I were importing 
this from a swc library or something? 

For now I kinda give up the idea of overriding and ended up just use a 
slightly different method name (dataProviderr) for my overriden class:

   public function set dataProviderr(v:Object):void

Thanks again!
 
--- In flexcoders@yahoogroups.com, Pedro Sena sena.pe...@... wrote:

 If you want the same method name in a subclass, we are talking about
 override, not overload.
 
 Flex 'deals with overload' making the arguments optionals, example:
 
 public function test(obj:Object = null):void
 
 then you can invoke it using test() or test(object).
 
 Appears that you are trying to override parent's function but changing it
 signature, that is not possible.
 
 If you want to have in the same class, in the same function, receive two
 different parameters, you can:
 
 public function set dataProviderr(v:Object = null, a:Array = null):void
 
 Then you can put the argument that you want, leaving the another one as null
 
 or you can
 
 public function set dataProviderr(v:*):void
 
 This way you can pass anything you like.
 
 Both solutions are ugly, IMHO, but is the way flex works.
 
 HTH,
 
 PS
 
 On Thu, May 28, 2009 at 6:58 PM, gwangdesign gwangdes...@... wrote:
 
 
 
  Hi,
 
  I am trying to overload a method (same name and different signatures)in a
  subclass. In the inherited class, the method looks like this:
 
  public function set dataProvider(value:Array):void
 
  In my subclass I want the method to look like this:
 
  public function set dataProviderr(v:Object):void
 
  So that I can handle different types.
 
  I understand AS3 doesn't support overloading. What would be the smart
  way(s) to handle this?
 
  Thanks.
 
  geng
 
   
 
 
 
 
 -- 
 /**
 * Pedro Sena
 * Systems Architect
 * Sun Certified Java Programmer
 * Sun Certified Web Component Developer
 */





[flexcoders] Re: Data Grid : headers above and in the left side.

2009-05-28 Thread carlogiordano11
== What if your left side headers are just another column with data looking 
like desired header text?

Yes, can be a solution. But does exist some pre-build component that do this ?



[flexcoders] Calculate IRR

2009-05-28 Thread jonkma...@rogers.com
Hi
Has anyone successfully programmed an AS Class to calculate IRR (Internal Rate 
of Return)?

Rick



Re: [flexcoders] High CPU usage redux

2009-05-28 Thread Rick Winscot
Tom,

After a little more poking around I found this issue in the Adobe bug-base
for the Flash Player.

http://bugs.adobe.com/jira/browse/FP-1149
...and...
https://bugs.adobe.com/jira/browse/FP-2009

It looks like the root cause isn¹t with skinning but rather frame rate
handling which could be triggered in many different ways; one of them being
stateful skins. Nice. I downloaded the example at Effective UI for reference
and witnessed the problem first hand. I was able to get it to behave (kind
of) using a technique outlined by the masterful Grant Skinner.

http://www.gskinner.com/blog/archives/2009/05/idle_cpu_usage.html

The problem is that while the application has focus cpu usage will be
higher... So, I guess the real question is if cpu consumption while the
application is active is justifiable / manageable.

Cheers,

Rick Winscot




On 5/28/09 1:57 PM, Tom McNeer tmcn...@gmail.com wrote:

  
   
 
   
 
 Rick,
 
 On Thu, May 28, 2009 at 9:54 AM, Rick Winscot rick.wins...@zyche.com wrote:
  
   
 
 Your observation that your application footprint increased when touching
 creationPolicy is what one should expect.
 
 
 
 
 
 
 Actually, I wasn't very clear: it wasn't that the application footprint
 increased (though it did, minimally); rather it was that by having a
 TabNavigator with a creationPolicy of all (which I have now managed to work
 around), five components were created immediately, each of which added to the
 CPU load because of the skinning issue that was common to all of them.
 
 an increased footprint when adding skins into the mix is also something you
 will probably see.
 
 
 
 
 
 
 Sure. But this is CPU usage caused by the stateful skins.
  
 The part that has me scratching my head is that you are seeing high cpu usage
 - which is something that is typically linked to refresh/redraw rates. Do you
 have any source we can take a look at?
 
 
 
 
 
 
 
 
 The source wouldn't help you, Rick. It's very typical forms-in-a-tab navigator
 stuff. Yes, the issue must be redrawing -- pretty constant redrawing I'd say.
 
 If you look at the blog post I referenced, you'll get a better view of the
 problem. Effective UI did a good deal of testing when they ran into the same
 issue, and concluded that it had to be a result of the use of stateful skins
 -- although they didn't seem to be able to determine the underlying cause.
 They documented some pretty impressive CPU usage by simply adding more skinned
 elements.
 
 I'm just kinda surprised more people haven't run into it.
 
 



[flexcoders] Re: data binding in textinput ?

2009-05-28 Thread Tim Hoff

Ha, now you're just showing off. :)

-TH

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

 On Thu, May 28, 2009 at 11:15 PM, luvfotography
 ygro...@... wrote:
  How do I get databinding to work in textinput?
  In this example below, I have a TextInput defined with the text
bound to {userName}, when I run the app, and enter text into the
TextInput field, I would like the text entered assigned to the Bindable
character string userName, however it is not.  What's the proper way to
do this?

 mx:String id=userName{myName.text}/mx:String

 MXML rules.

 Manish






Re: [flexcoders] High CPU usage redux

2009-05-28 Thread Tom McNeer
Hi Rick,

Thanks for the thorough explanation. Interesting to know more about the
cause, though I sure hope they fix the bug.

The problem is that while the application has focus cpu usage will be
 higher... So, I guess the real question is if cpu consumption while the
 application is active is justifiable / manageable.








In my case, the answer is no, since I was looking at 80% CPU usage at one
point.

Again, I appreciate your following up on this.



-- 
Thanks,

Tom

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


[flexcoders] ADG/DataGrid prevent render even from firing immediately on propertyChange

2009-05-28 Thread tntomek
Hi,

Is there any way to tell the ADG to not re-render itself immediately after a 
propertyChanged even has been fired in the dataProvider? 

I have quite a wide row (lots of cells) and lots of custom logic that updates 
these dependent properties on each row. i.e. calculated columns. I am doing the 
calculations at dataProvider level vs labelFunctions. On each set function of 
one of my cells in the row I raise a propertyChanged event if the value was 
changed. Tracing through what the ADG is doing I'm finding that its 
re-rendering each time I raise this event even if its in the same row. Is there 
any way to tell the ADG to wait a few milliseconds in case another 
propertyChanged event comes in so as to render once instead of 10 times?

If there is no ADG option what is the best pattern for this assuming I want to 
do this in my underlying dataprovider objects. Should I raise custom events and 
fake a itemUpdated once I know there are no more changes? I don't see a clean 
way to do this however since I never really know when I'm done, and using a 
timer or something of this nature seems like a major hack.

-Tom



[flexcoders] Re: ADG/DataGrid prevent render even from firing immediately on propertyChange

2009-05-28 Thread foobone9
You might try enableAutoUpdate and disableAutoUpdate on ICollectionView, not 
sure if that has the desired affect or not.

You could also put custom events in your model objects and manually dispatch 
collection events or call explicitly tell the grid when to update.

--- In flexcoders@yahoogroups.com, tntomek tnto...@... wrote:

 Hi,
 
 Is there any way to tell the ADG to not re-render itself immediately after a 
 propertyChanged even has been fired in the dataProvider? 
 
 I have quite a wide row (lots of cells) and lots of custom logic that updates 
 these dependent properties on each row. i.e. calculated columns. I am doing 
 the calculations at dataProvider level vs labelFunctions. On each set 
 function of one of my cells in the row I raise a propertyChanged event if 
 the value was changed. Tracing through what the ADG is doing I'm finding that 
 its re-rendering each time I raise this event even if its in the same row. Is 
 there any way to tell the ADG to wait a few milliseconds in case another 
 propertyChanged event comes in so as to render once instead of 10 times?
 
 If there is no ADG option what is the best pattern for this assuming I want 
 to do this in my underlying dataprovider objects. Should I raise custom 
 events and fake a itemUpdated once I know there are no more changes? I don't 
 see a clean way to do this however since I never really know when I'm done, 
 and using a timer or something of this nature seems like a major hack.
 
 -Tom





[flexcoders] Compiling via Command Line

2009-05-28 Thread Angelo Anolin
I have created a Custom MXML
named PopupInfo.mxml component which is based from a TitleWindow.
 
Am using the MXMLC compiler
to compile my App.mxml into a SWF file and embed the same to my asp.net page.
 
The App.mxml file calls the
PopupInfo.mxml to display a Popup and I am calling it from App.mxml via the
following code:
 
import mx.managers.PopUpManager;
 
var winPopUpInfo:PopUpInfo =
PopUpManager.createPopUp(this, PopUpInfo, true) as PopUpInfo;
PopUpManager.centerPopUp(winPopUpInfo);
 
How then do I compile the
App.mxml altogether with the PopUpInfo.mxml using the command line compiler?
 
Currently, when I compile
App.mxml, I only issue the following in the DOS Command Line prompt:
 
C:\Flex_SDK_3\Bin\mxmlc
App.mxml
 
and the resulting App.swf
file, is the one which I embed to my web page.
 
How can I ensure then that
the PopUpInfom.mxml is also compiled using the command line compiler? 
 
Thanks


  

[flexcoders] Atlanta Flex 4 Pre-release Tour

2009-05-28 Thread app.developer
Who's attending the Atlanta  Flex 4 Pre-release Tour?



[flexcoders] unsubscribe

2009-05-28 Thread Scott Mulder
unsubscribe


RE: [flexcoders] Re: Run time Warning

2009-05-28 Thread Tracy Spratt
No, Tim that is not correct, XML *IS* bindable. XMLList is not bindable.

 

This warning is because selectedItem is an object and Object is not
bindable.  The fix is to cast/convert it to xml:

text={XML(salesreps.selectedItem).ext}

 

The warning is misleading.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tim Hoff
Sent: Thursday, May 28, 2009 2:35 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Run time Warning

 







Hence the warning. Like Array, XML is not bindable. You might try
converting the XML to an XMLListCollection.

-TH

--- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com,
markgoldin_2000
markgoldin_2...@... wrote:

 But my XML is set to bindable.

 --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com,
Jake Churchill jake@ wrote:
 
  Convert the XML to an arraycollection of VOs and make the entire VO
class
  bindable.
 
 
 
  Jake Churchill
 
  CF Webtools
 
  11204 Davenport, Ste. 100
 
  Omaha, NE 68154
 
  http://www.cfwebtoo http://www.cfwebtools.com ls.com
 
  402-408-3733 x103
 
 
 
  From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
[mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com]
On
  Behalf Of markgoldin_2000
  Sent: Thursday, May 28, 2009 8:28 AM
  To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
  Subject: [flexcoders] Run time Warning
 
 
 
 
 
 
 
 
  warning: unable to bind to property 'ext' on class 'XML' (class is
not an
  IEventDispatcher)
 
  It's coming from:
  mx:FormItem label=Ext required=true includeInLayout=false
  mx:TextInput id=ext focusOut=c.formatNumbers(ext, salesreps)
  width=10%
  text={salesreps.selectedItem.ext}
  restrict=0-9/
  /mx:FormItem
 
  where salesreps is a DataGrid with an XML as a dataProvider.
 
  Any idea?
 






[flexcoders] Re: Run time Warning

2009-05-28 Thread markgoldin_2000
Yes, that's what I did. Warning is gone.

--- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote:

 No, Tim that is not correct, XML *IS* bindable. XMLList is not bindable.
 
  
 
 This warning is because selectedItem is an object and Object is not
 bindable.  The fix is to cast/convert it to xml:
 
 text={XML(salesreps.selectedItem).ext}
 
  
 
 The warning is misleading.
 
  
 
 Tracy Spratt,
 
 Lariat Services, development services available
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Tim Hoff
 Sent: Thursday, May 28, 2009 2:35 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Run time Warning
 
  
 
 
 
 
 
 
 
 Hence the warning. Like Array, XML is not bindable. You might try
 converting the XML to an XMLListCollection.
 
 -TH
 
 --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com,
 markgoldin_2000
 markgoldin_2000@ wrote:
 
  But my XML is set to bindable.
 
  --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com,
 Jake Churchill jake@ wrote:
  
   Convert the XML to an arraycollection of VOs and make the entire VO
 class
   bindable.
  
  
  
   Jake Churchill
  
   CF Webtools
  
   11204 Davenport, Ste. 100
  
   Omaha, NE 68154
  
   http://www.cfwebtoo http://www.cfwebtools.com ls.com
  
   402-408-3733 x103
  
  
  
   From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
 [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com]
 On
   Behalf Of markgoldin_2000
   Sent: Thursday, May 28, 2009 8:28 AM
   To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
   Subject: [flexcoders] Run time Warning
  
  
  
  
  
  
  
  
   warning: unable to bind to property 'ext' on class 'XML' (class is
 not an
   IEventDispatcher)
  
   It's coming from:
   mx:FormItem label=Ext required=true includeInLayout=false
   mx:TextInput id=ext focusOut=c.formatNumbers(ext, salesreps)
   width=10%
   text={salesreps.selectedItem.ext}
   restrict=0-9/
   /mx:FormItem
  
   where salesreps is a DataGrid with an XML as a dataProvider.
  
   Any idea?
  
 





[flexcoders] Re: Run time Warning

2009-05-28 Thread Tim Hoff

ay, gotta work with xml more.  So its XMLList and Array; got it.  Thanks
Tracy.

-TH

--- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote:

 No, Tim that is not correct, XML *IS* bindable. XMLList is not
bindable.



 This warning is because selectedItem is an object and Object is not
 bindable. The fix is to cast/convert it to xml:

 text={XML(salesreps.selectedItem).ext}



 The warning is misleading.



 Tracy Spratt,

 Lariat Services, development services available

 _

 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com]
On
 Behalf Of Tim Hoff
 Sent: Thursday, May 28, 2009 2:35 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Run time Warning









 Hence the warning. Like Array, XML is not bindable. You might try
 converting the XML to an XMLListCollection.

 -TH

 --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com
ups.com,
 markgoldin_2000
 markgoldin_2000@ wrote:
 
  But my XML is set to bindable.
 
  --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com
ups.com,
 Jake Churchill jake@ wrote:
  
   Convert the XML to an arraycollection of VOs and make the entire
VO
 class
   bindable.
  
  
  
   Jake Churchill
  
   CF Webtools
  
   11204 Davenport, Ste. 100
  
   Omaha, NE 68154
  
   http://www.cfwebtoo http://www.cfwebtools.com ls.com
  
   402-408-3733 x103
  
  
  
   From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com
ups.com
 [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com
ups.com]
 On
   Behalf Of markgoldin_2000
   Sent: Thursday, May 28, 2009 8:28 AM
   To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com
ups.com
   Subject: [flexcoders] Run time Warning
  
  
  
  
  
  
  
  
   warning: unable to bind to property 'ext' on class 'XML' (class is
 not an
   IEventDispatcher)
  
   It's coming from:
   mx:FormItem label=Ext required=true includeInLayout=false
   mx:TextInput id=ext focusOut=c.formatNumbers(ext, salesreps)
   width=10%
   text={salesreps.selectedItem.ext}
   restrict=0-9/
   /mx:FormItem
  
   where salesreps is a DataGrid with an XML as a dataProvider.
  
   Any idea?