[flexcoders] Migrate Flex to Flash Lite

2009-04-23 Thread itdanny2002
We want to use a flex program (FP7) on 
mobile. However, not much mobile supports.
Both Flex Builder (Output Flash) and 
Flash CS4 (ouput Flash Lite) support ActionScript.
Can I change all code to ActionScript in Flex Builder
and then use it in Flash CS4 ?

Please show me the way. Thank you very much.







Re: [flexcoders] List sizing - height=100%

2009-04-23 Thread claudiu ursica
there is a rowCount property in the list...

tell you how many item should be displayed

http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/

C





From: arieljake arielj...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Wednesday, April 22, 2009 10:03:10 PM
Subject: [flexcoders] List sizing - height=100%





I am trying, in MXML, to size a list to 100% of its container, but when I do, 
it only shows 2 rows. It is using a custom item renderer. I tried setting a 
rowHeight as well but still doesn't size right. I also set an explicitHeight in 
the item renderer itself. Nothing.

In a fixed size layout, i can set the rowcount but I want it to be fluid in 
case the user resizes the window.

Anyone know why a list wouldn't size by percent to fill a parent container?


   


  

[flexcoders] Horizontal Axis

2009-04-23 Thread ak
Hi,


Is there any way to check whether the horizonatl axis is Linear axis or 
Category axis in a class extended from the Bar Chart.

Thanks



  Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo! 
Edition http://downloads.yahoo.com/in/firefox/

RE: [flexcoders] Drive Letters and Ant

2009-04-23 Thread Gregor Kiddie
Which version of flexTasks.jar are you using?

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

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

Registered Number: 1788577

Registered in the UK

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

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



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of cuttenv
Sent: 22 April 2009 21:16
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Drive Letters and Ant

 






So I have my Eclipse and Flex builder installed on my C: drive but all
of my projects in my workspace on D: 

Everything works fine but when I set the fork=true in my mxmlc to
increase the memory my Ant build fails with: 
[mxmlc] java.lang.NoClassDefFoundError: flex2/tools/Compiler 
[mxmlc] Exception in thread main 

Anyone have any thoughts??

http://bugs.adobe.com/jira/browse/SDK-20666
http://bugs.adobe.com/jira/browse/SDK-20666 





Re: [flexcoders] Migrate Flex to Flash Lite

2009-04-23 Thread Rick Winscot
What you are asking is a huge task... even the prospect of using classes in
Flash Lite will cause huge performance issues not to mention the fact that
you will have to translate/port any Flex framework bits you use in your Flex
app to Flash Lite. This would not be a trivial task.

I wouldn¹t recommend trying to create a Flash Lite product that maintains
parity with a Flex app without serious contemplation on what your users
Œactually¹ need and not what they Œthink¹ they need.

Rick Winscot


On 4/23/09 2:28 AM, itdanny2002 itdann...@gmail.com wrote:

  
   
 
   
 
 We want to use a flex program (FP7) on
 mobile. However, not much mobile supports.
 Both Flex Builder (Output Flash) and
 Flash CS4 (ouput Flash Lite) support ActionScript.
 Can I change all code to ActionScript in Flex Builder
 and then use it in Flash CS4 ?
 
 Please show me the way. Thank you very much.
 
   
 
 
 



[flexcoders] Re: Migrate Flex to Flash Lite

2009-04-23 Thread itdanny2002

Or, I should wait till FP 10
since it supposed to be used 
in all mobile ... in future.

--- In flexcoders@yahoogroups.com, itdanny2002 itdann...@... wrote:

 Thanks for your reply. OK. Then. 
 I may write a new small interface
 program to extract and display data 
 from server rather than a full 
 application program with edit 
 
 May I ask ... Any suggestion on 
 development tools on mobile ? Flash 
 CS4 Flash Lite or Flex Builder ?






Re: [flexcoders] Re: Migrate Flex to Flash Lite

2009-04-23 Thread Tom Chiverton
On Thursday 23 Apr 2009, itdanny2002 wrote:
 Or, I should wait till FP 10
 since it supposed to be used
 in all mobile ... in future.

Will your users wait ? Will they have the latest and greatest phones as soon 
as they come out ?

-- 
Helping to biannually innovate one-to-one total fifth-generation killer 
markets as part of the IT team of the year, '09 and '08

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



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

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

CONFIDENTIALITY

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

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

RE: [flexcoders] Polygon Flex Component

2009-04-23 Thread Kenneth Sutherland
http://www.flexibleexperiments.com/Flex/PrimitiveExplorer/Flex2Primitive
Explorer.html

 

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of sbaush09
Sent: 22 April 2009 14:01
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Polygon Flex Component

 






Hi all!
I'm searching for a Polygon MXML component; I would a component that
draw a simple polygon and a slider that set from UI the number of
facets. 

Does it exist?

Thanks!

Marco.





Disclaimer 
---
This electronic message contains information which may be privileged and 
confidential. The information is intended to be for the use of the 
individual(s) or entity named above. If you are not the intended recipient, be 
aware that any disclosure, copying, distribution or use of the contents of this 
information is prohibited. If you have received this electronic message in 
error, please notify us by telephone on 0131 476 6000 and delete the material 
from your computer. 
Registered in Scotland number: SC 172507. 
Registered office address: Quay House 142 Commercial Street Edinburgh EH6 6LB. 

This email message has been scanned for viruses by Mimecast.
---

[flexcoders] Dicom Dcmtk with Alchemy

2009-04-23 Thread christophe_jacquelin
Hello, 

Does someone has compiled the Dicom Dcmtk library with Alchemy ? 

Thank you,
Christophe,



[flexcoders] Blank Screen issue with application preloaders

2009-04-23 Thread b_alen
I get a blank screen for more than 10 seconds for the app that's about 700k in 
size. Only then the preloader appears and starts from somewhere around 70%. 

In the Flash days, this was easily solved by having one small SWF with 
preloader that would load the main SWF in empty movie clip. Is something like 
this possible in Flex? 

I did a small experiment with loading the Flex app into Flash SWF, but then the 
sizing and alignments were lost. I also tried loading a Flex app into a smaller 
Flex app, but still there was a blank screen for quite a while.

It's a huge usability issue knowing that users leave after 8 seconds, which is 
actualy true looking at google analytics reports.

I've checked numerous blogs about custom preloaders but only found that all of 
them have the same issue. 

These are all the apps and samples with the same issue:

http://tv.adobe.com/#
http://onflash.org/ted/2006/07/flex-2-custom-preloaders.php
http://onflash.org/ted/2006/07/flex-2-preloaders-swf-png-gif-examples.php
http://jessewarden.com/2007/07/making-a-cooler-preloader-in-flex-part-1-of-3.html






[flexcoders] Two way binding in Flex 4

2009-04-23 Thread Gregor Kiddie
Morning all (well it is here ;) ),

One for the Adobe guys I think, though anyone who's dug around in the
Flex 4 SDK can chip in!

 

Flex 4's two way binding... does it create an breakable reference in the
same way as MXML binding does just now? I'm trying to judge its
usefulness, and Ted Patrick's comments on his blog have totally confused
me!

http://www.onflex.org/ted/2008/09/useweakreferencesboolean-false.php#com
ment-6262590827069335129

Basically, will we be making the already bad memory leak problem worse
by using the two way binding?

 

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

 



Re: [flexcoders] LCDS - For a Chat Application

2009-04-23 Thread Tom Chiverton
On Tuesday 21 Apr 2009, Anthony DeBonis wrote:
 pick list of available rooms.  I have a basic MultiTopicProducer/
 MultiTopicConsumer set up but if a user comes online late they don't get
 the list of rooms… only new rooms that get created.  Or do we have to wait
 for Flash Collaboration Services (AFCS)

Make sure your server code keeps track of the overall list of rooms, and 
provides a method you can all via RemoteObject to provide that list.

 2)Online User list – need a way to have a server side list that is kept up
 today with who is online… something like a Server Side Shared object like
 Flash Media server has.

Again, just make a RemoteObject call when a user logs on.

 3) Make durable messages – so users who come online later can get caught up
 on messages they missed..   I tried a bunch of settings in
 messaging-config.xml  like durabletrue/durable  but they don't work or
 as the docs say they should.

See 1) :-)

-- 
Helping to assertively syndicate dynamic edge-of-your-seat one-to-one 
bandwidth as part of the IT team of the year, '09 and '08

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



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

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

CONFIDENTIALITY

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

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

Re: [flexcoders] chart axis renderers inside data area

2009-04-23 Thread thomas parquier
Maciek, pushing axisrenderer to annotationElements array doesnt seem to
work.

Sam, setting negative gutters works (any negative gutter does the same) but
not completely : axe is rendered in area, but only stroke and ticks, no
labels...

thomas



2009/4/22 Sam Lai samuel@gmail.com



 Can you have negative gutters?

 Probably not; I have enough trouble as it is trying to get rid of all
 the space used by the axes - I've made the axes invisible via numerous
 style/property settings, but there's still one or two pixels of space
 being allocated to it.

 2009/4/22 Maciek Sakrejda msakre...@truviso.com msakrejda%40truviso.com
 :

 
 
  I wonder if putting the AxisRenderer in the chart's annotationElements
 array
  would work...
 
 
  -Original Message-
  From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com on
 behalf of thomas parquier
  Sent: Tue 4/21/2009 11:17 AM
  To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
  Subject: Re: [flexcoders] chart axis renderers inside data area
 
  There may be an easy way to get plain current axis but rendered inside
 the
  series area, ie not having to use drawing api for axis with labels and
  avoiding rewrite those getminmax, getlabels (with droplabels, etc)
 methods.
 
  thomas
 
 
  2009/4/20 Tom Chiverton 
  tom.chiver...@halliwells.comtom.chiverton%40halliwells.com
 
 
 
 
 
 
  On Sunday 19 Apr 2009, thomas parquier wrote:
   Has anyone any suggestion about how to get axis rendered inside data
  area,
   as an overlay ? with someway no outside gutters...
 
  DataDrawingCannas from
  http://www.quietlyscheming.com/blog/charts/easy-custom-charts/ would do
  the
  job, maybe.
 
  --
  Helping to autoschediastically brand unique ubiquitous architectures 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 Tom.Chiverton%40halliwells.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.
 
 
 
 
 
 
 
  --
  http://www.web-attitude.fr/
  msn : thomas.parqu...@web-attitude.frthomas.parquier%40web-attitude.fr
  softphone : sip:webattit...@ekiga.net webattitude%40ekiga.net 
 sip%3awebattit...@ekiga.net sip%253Awebattitude%40ekiga.net
  téléphone portable : +33601 822 056
 
 
 
 
  




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


[flexcoders] Unloading Modules - Binding is the Enemy?

2009-04-23 Thread Battershall, Jeff
In testing via the Profiler, binding UI objects in a module to a model
(even if local to the module) appears to be causing a module's failure
to unload. This happens as soon as the UI component becomes active. In
fact, even if the source object (data provider) is set to null, the
binding persists and will prevent a module from unloading. Does this
issue have to be such a PITA? It appears that using curly braces for
binding in MXML can create Modules that won't unload. 

In FP 10, the Loader class has the new unloadAndStop() method. Would be
extremely handy to have something similar for Modules. Basically you
want to remove all listeners to a model and then unload the module. 

Seeking enlightenment - anyone got any?

Jeff Battershall
Application Architect
Dow Jones Indexes
jeff.battersh...@dowjones.com
(609) 520-5637 (p)
(484) 477-9900 (c)


Re: [flexcoders] chart axis renderers inside data area

2009-04-23 Thread Sam Lai
Thinking up the top of my head here -

Maybe you could inherit and trick the axis renderer into thinking it
is rendering the axis on top of the chart, and therefore the labels
are above the stroke and ticks (instead of below)?

That's what you want right?

2009/4/23 thomas parquier mailingli...@web-attitude.fr:


 Maciek, pushing axisrenderer to annotationElements array doesnt seem to
 work.

 Sam, setting negative gutters works (any negative gutter does the same) but
 not completely : axe is rendered in area, but only stroke and ticks, no
 labels...

 thomas



 2009/4/22 Sam Lai samuel@gmail.com


 Can you have negative gutters?

 Probably not; I have enough trouble as it is trying to get rid of all
 the space used by the axes - I've made the axes invisible via numerous
 style/property settings, but there's still one or two pixels of space
 being allocated to it.

 2009/4/22 Maciek Sakrejda msakre...@truviso.com:

 
 
  I wonder if putting the AxisRenderer in the chart's annotationElements
  array
  would work...
 
 
  -Original Message-
  From: flexcoders@yahoogroups.com on behalf of thomas parquier
  Sent: Tue 4/21/2009 11:17 AM
  To: flexcoders@yahoogroups.com
  Subject: Re: [flexcoders] chart axis renderers inside data area
 
  There may be an easy way to get plain current axis but rendered inside
  the
  series area, ie not having to use drawing api for axis with labels and
  avoiding rewrite those getminmax, getlabels (with droplabels, etc)
  methods.
 
  thomas
 
 
  2009/4/20 Tom Chiverton tom.chiver...@halliwells.com
 
 
 
 
 
  On Sunday 19 Apr 2009, thomas parquier wrote:
   Has anyone any suggestion about how to get axis rendered inside data
  area,
   as an overlay ? with someway no outside gutters...
 
  DataDrawingCannas from
  http://www.quietlyscheming.com/blog/charts/easy-custom-charts/ would do
  the
  job, maybe.
 
  --
  Helping to autoschediastically brand unique ubiquitous architectures 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.
 
 
 
 
 
 
 
  --
  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
 
 
 
 



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


 


Re: [flexcoders] Unloading Modules - Binding is the Enemy?

2009-04-23 Thread Pedro Sena
Hi Jeff,

The fact that you unload a module does not mean that it will be garbage
collected(the memory won't be released as soon as you unload your module).
Unload the module makes it available for garbage collection.

As far as I know, the module 'garbage' will be collected by the GC when
necessary, so don't think that unload a module means free memory in the
exactly same moment.

I'm supposing that you are testing in your development machine(probably a
good machine) so I suggest you to test it in a limited machine to see if
this memory is released when it is *necessary* , that is the point.

HTH,

Pedro Sena

On Thu, Apr 23, 2009 at 9:09 AM, Battershall, Jeff 
jeff.battersh...@dowjones.com wrote:



 In testing via the Profiler, binding UI objects in a module to a model
 (even if local to the module) appears to be causing a module's failure
 to unload. This happens as soon as the UI component becomes active. In
 fact, even if the source object (data provider) is set to null, the
 binding persists and will prevent a module from unloading. Does this
 issue have to be such a PITA? It appears that using curly braces for
 binding in MXML can create Modules that won't unload.

 In FP 10, the Loader class has the new unloadAndStop() method. Would be
 extremely handy to have something similar for Modules. Basically you
 want to remove all listeners to a model and then unload the module.

 Seeking enlightenment - anyone got any?

 Jeff Battershall
 Application Architect
 Dow Jones Indexes
 jeff.battersh...@dowjones.com jeff.battershall%40dowjones.com
 (609) 520-5637 (p)
 (484) 477-9900 (c)
  




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


RE: [flexcoders] Unloading Modules - Binding is the Enemy?

2009-04-23 Thread Battershall, Jeff
Pedro,
 
I've been running the GC immediately after unload - programmatically.
The module instance is released immediately if binding is inactive.  The
moment binding becomes active to a UI element of the Module, the
instance will not be released.  I was thinking that having the model
object I'm binding to be local to the module would address the behavior,
but sadly it does not appear to work.  
 
Jeff

-Original Message-
From: flexcoders@yahoogroups.com
[mailto:flexcod...@yahoogroups.com] On Behalf Of Pedro Sena
Sent: Thursday, April 23, 2009 8:26 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Unloading Modules - Binding is the
Enemy?




Hi Jeff,

The fact that you unload a module does not mean that it will be
garbage collected(the memory won't be released as soon as you unload
your module). Unload the module makes it available for garbage
collection.

As far as I know, the module 'garbage' will be collected by the
GC when necessary, so don't think that unload a module means free memory
in the exactly same moment.

I'm supposing that you are testing in your development
machine(probably a good machine) so I suggest you to test it in a
limited machine to see if this memory is released when it is necessary ,
that is the point.

HTH,

Pedro Sena


On Thu, Apr 23, 2009 at 9:09 AM, Battershall, Jeff
jeff.battersh...@dowjones.com wrote:




In testing via the Profiler, binding UI objects in a
module to a model
(even if local to the module) appears to be causing a
module's failure
to unload. This happens as soon as the UI component
becomes active. In
fact, even if the source object (data provider) is set
to null, the
binding persists and will prevent a module from
unloading. Does this
issue have to be such a PITA? It appears that using
curly braces for
binding in MXML can create Modules that won't unload. 

In FP 10, the Loader class has the new unloadAndStop()
method. Would be
extremely handy to have something similar for Modules.
Basically you
want to remove all listeners to a model and then unload
the module. 

Seeking enlightenment - anyone got any?

Jeff Battershall
Application Architect
Dow Jones Indexes
jeff.battersh...@dowjones.com
mailto:jeff.battershall%40dowjones.com 
(609) 520-5637 (p)
(484) 477-9900 (c)





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







Re: [flexcoders] maxWidth property not working on Advanced DataGrid

2009-04-23 Thread Marco Catunda
I didn't understand very well, but If you remove height=80 property
in below line,
the vertical scroll bar go away.

mx:AdvancedDataGrid width=318 height=80 id=dg
horizontalCenter=0 dataProvider={arr}
horizontalScrollPolicy=auto 

--
Marco Catunda


On Wed, Apr 22, 2009 at 8:52 AM, labosox lgad...@gmail.com wrote:


 Hello,

 I am trying to create a grid that will update its size on a column resize
 event. I want the grid to keep getting large until they hit a max width then
 turn on a horizontal scroll bar.

 Everything seems to work fine unless I have a vertical scroll bar present in
 the grid. When I try to re-size a column the datagrid adds a horizontal
 scroll bar automatically.

 Heres my code:

 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
 creationComplete=initApp() viewSourceURL=srcview/index.html
 mx:Script
 ![CDATA[
 import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
 import mx.controls.advancedDataGridClasses.AdvancedDataGridRendererProvider;
 import mx.events.IndexChangedEvent;
 import mx.events.ResizeEvent;
 import mx.collections.IViewCursor;
 import mx.collections.ArrayCollection;
 import mx.rpc.events.ResultEvent;
 import mx.events.DataGridEvent;
 import mx.events.AdvancedDataGridEvent;
 import mx.controls.dataGridClasses.DataGridColumn;
 import mx.managers.CursorManager;
 public var bDummy:Boolean = false;

 [Bindable]
 private var itemAC:ArrayCollection;

 private function initApp():void{

 dg.maxWidth = stuff.width;
 dg.addEventListener(AdvancedDataGridEvent.COLUMN_STRETCH, resizeCol);
 }

 private function resizeCol(event:AdvancedDataGridEvent):void
 {
 var _colIndex:Number = event.columnIndex;
 var width:Number;

 for(var i:int = 0; i = dg.columns.length - 1; i++)
 {
 width += dg.columns[i].width;
 }

 dg.width = width;

 //ive tried to add 18 here to handle the scroll bar but then the maxWidth
 //is ignored and the grid keeps resizing outside of its maxWidth

 }

 ]]
 /mx:Script
 mx:Array id=arr
 mx:Object name=Redsox quanity=10 cost=1000/
 mx:Object name=Rays quanity=11 cost=500/
 mx:Object name=Yankees quanity=20 cost=2000/
 /mx:Array
 mx:Canvas width=500 height=45% backgroundColor=red
 horizontalCenter=0
 verticalCenter=-65 id=stuff verticalScrollPolicy=off
 horizontalScrollPolicy=off
 mx:AdvancedDataGrid width=318 height=80 id=dg horizontalCenter=0
 dataProvider={arr}
 horizontalScrollPolicy=auto 
 mx:columns
 mx:AdvancedDataGridColumn width=100 headerText=name dataField=name/
 mx:AdvancedDataGridColumn width=100 headerText=quanity
 dataField=quanity/
 mx:AdvancedDataGridColumn width=100 headerText=cost dataField=cost/
 /mx:columns
 /mx:AdvancedDataGrid
 /mx:Canvas

 /mx:Application

 


Re: [flexcoders] Unloading Modules - Binding is the Enemy?

2009-04-23 Thread Pedro Sena
Jeff,

Calling GC programmatically does not mean that it will be executed.

Like java, the GC in flex is not under programmer's control. You may call
it, but it won't be executed if it is not necessary.

Clicking the Run Garbage Collector button does not guarantee that all
objects that are eligible for garbage collection will be garbage collected.
Garbage collection is typically triggered by the allocation of memory for
new resources.

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

Regards,

Pedro Sena

On Thu, Apr 23, 2009 at 9:34 AM, Battershall, Jeff 
jeff.battersh...@dowjones.com wrote:



  Pedro,

 I've been running the GC immediately after unload - programmatically.  The
 module instance is released immediately if binding is inactive.  The moment
 binding becomes active to a UI element of the Module, the instance will not
 be released.  I was thinking that having the model object I'm binding to be
 local to the module would address the behavior, but sadly it does not appear
 to work.

 Jeff

  -Original Message-
 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Pedro Sena
 *Sent:* Thursday, April 23, 2009 8:26 AM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Unloading Modules - Binding is the Enemy?

 Hi Jeff,

 The fact that you unload a module does not mean that it will be garbage
 collected(the memory won't be released as soon as you unload your module).
 Unload the module makes it available for garbage collection.

 As far as I know, the module 'garbage' will be collected by the GC when
 necessary, so don't think that unload a module means free memory in the
 exactly same moment.

 I'm supposing that you are testing in your development machine(probably a
 good machine) so I suggest you to test it in a limited machine to see if
 this memory is released when it is *necessary* , that is the point.

 HTH,

 Pedro Sena

 On Thu, Apr 23, 2009 at 9:09 AM, Battershall, Jeff 
 jeff.battersh...@dowjones.com wrote:



 In testing via the Profiler, binding UI objects in a module to a model
 (even if local to the module) appears to be causing a module's failure
 to unload. This happens as soon as the UI component becomes active. In
 fact, even if the source object (data provider) is set to null, the
 binding persists and will prevent a module from unloading. Does this
 issue have to be such a PITA? It appears that using curly braces for
 binding in MXML can create Modules that won't unload.

 In FP 10, the Loader class has the new unloadAndStop() method. Would be
 extremely handy to have something similar for Modules. Basically you
 want to remove all listeners to a model and then unload the module.

 Seeking enlightenment - anyone got any?

 Jeff Battershall
 Application Architect
 Dow Jones Indexes
 jeff.battersh...@dowjones.com jeff.battershall%40dowjones.com
 (609) 520-5637 (p)
 (484) 477-9900 (c)




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

  




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


RE: [flexcoders] Unloading Modules - Binding is the Enemy?

2009-04-23 Thread Battershall, Jeff
Thanks Pedro,
 
I've seen what your describing in the docs - I'm looking at this via the
profiler which is giving me feedback as to number of live instances,
etc. 
 
Here's what I'm basing my statements on:.
 
1) I start up my app, which loads modules at runtime based upon user
choice from a menu.
 
2) Module exectues Cairngorm Event/Command/Delegate to get array to
populate a combo box. I'm passing a reference to the module's model in
my Cairngorm event and the model is updated upon completion of the
Command.
 
3) Combobox is bound (via MXML) to the model.
 
4) If I don't interact with the combobox, I can then logout and unload
the module successfully. The profiler tells me there was previously 1
instance of the module and now there are zero instances.
 
5) If I make the combobox active (by interacting with it in any way),
and then logout, the module remains in memory, with the profiler
reporting one instance instead of zero.
 
6) If I then login again, the Profiler reports 2 active instances of the
module.  Note that any model objects are duplicated as well. For
example, if my list of suppliers (used to popuate my combobox) (a
strongly typed AS class) was previously 64, the profiler now reports
there are 128 instances.  
 
There's my behavior.  When my UI object (in this case ComboBox), becomes
active, the binding becomes active and then the module will not unload,
even if I set the modules model to null before attempting to unload.  It
would appear that I need to invalidate all outstanding bindings to any
data object before the module will fully unload.  This would seem to
indicate that MXML binding (via curly braces) isn't going to allow this.
 
Jeff 

-Original Message-
From: flexcoders@yahoogroups.com
[mailto:flexcod...@yahoogroups.com] On Behalf Of Pedro Sena
Sent: Thursday, April 23, 2009 8:43 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Unloading Modules - Binding is the
Enemy?




Jeff,

Calling GC programmatically does not mean that it will be
executed.

Like java, the GC in flex is not under programmer's control. You
may call it, but it won't be executed if it is not necessary.

Clicking the Run Garbage Collector button does not guarantee
that all objects that are eligible for garbage collection will be
garbage collected. Garbage collection is typically triggered by the
allocation of memory for new resources.


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

Regards,

Pedro Sena


On Thu, Apr 23, 2009 at 9:34 AM, Battershall, Jeff
jeff.battersh...@dowjones.com wrote:






Pedro,
 
I've been running the GC immediately after unload -
programmatically.  The module instance is released immediately if
binding is inactive.  The moment binding becomes active to a UI element
of the Module, the instance will not be released.  I was thinking that
having the model object I'm binding to be local to the module would
address the behavior, but sadly it does not appear to work.  
 
Jeff

-Original Message-
From: flexcoders@yahoogroups.com
[mailto:flexcod...@yahoogroups.com] On Behalf Of Pedro Sena
Sent: Thursday, April 23, 2009 8:26 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Unloading Modules -
Binding is the Enemy?


Hi Jeff,

The fact that you unload a module does not mean
that it will be garbage collected(the memory won't be released as soon
as you unload your module). Unload the module makes it available for
garbage collection.

As far as I know, the module 'garbage' will be
collected by the GC when necessary, so don't think that unload a module
means free memory in the exactly same moment.

I'm supposing that you are testing in your
development machine(probably a good machine) so I suggest you to test it
in a limited machine to see if this memory is released when it is
necessary , that is the point.

HTH,

Pedro Sena


On Thu, Apr 23, 2009 at 9:09 AM, Battershall,
Jeff jeff.battersh...@dowjones.com wrote:




In testing via the Profiler, binding UI
objects in a module to a model
(even if local to the module) appears to
be causing a module's failure
 

RE: [flexcoders] Unloading Modules - Binding is the Enemy?

2009-04-23 Thread Gregor Kiddie
It does sound like you are describing the bug where the focus manager
holds onto the reference of the combo box and stops the module
unloading...

If you lose the combobox focus, does the module unload?

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

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

Registered Number: 1788577

Registered in the UK

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

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



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Battershall, Jeff
Sent: 23 April 2009 14:32
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Unloading Modules - Binding is the Enemy?

 






Thanks Pedro,

 

I've seen what your describing in the docs - I'm looking at this via the
profiler which is giving me feedback as to number of live instances,
etc. 

 

Here's what I'm basing my statements on:.

 

1) I start up my app, which loads modules at runtime based upon user
choice from a menu.

 

2) Module exectues Cairngorm Event/Command/Delegate to get array to
populate a combo box. I'm passing a reference to the module's model in
my Cairngorm event and the model is updated upon completion of the
Command.

 

3) Combobox is bound (via MXML) to the model.

 

4) If I don't interact with the combobox, I can then logout and unload
the module successfully. The profiler tells me there was previously 1
instance of the module and now there are zero instances.

 

5) If I make the combobox active (by interacting with it in any way),
and then logout, the module remains in memory, with the profiler
reporting one instance instead of zero.

 

6) If I then login again, the Profiler reports 2 active instances of the
module.  Note that any model objects are duplicated as well. For
example, if my list of suppliers (used to popuate my combobox) (a
strongly typed AS class) was previously 64, the profiler now reports
there are 128 instances.  

 

There's my behavior.  When my UI object (in this case ComboBox), becomes
active, the binding becomes active and then the module will not unload,
even if I set the modules model to null before attempting to unload.  It
would appear that I need to invalidate all outstanding bindings to any
data object before the module will fully unload.  This would seem to
indicate that MXML binding (via curly braces) isn't going to allow this.

 

Jeff 



Re: [flexcoders] chart axis renderers inside data area

2009-04-23 Thread thomas parquier
Using negative labelGap draws labels inside data area.

thx



2009/4/23 Sam Lai samuel@gmail.com



 Thinking up the top of my head here -

 Maybe you could inherit and trick the axis renderer into thinking it
 is rendering the axis on top of the chart, and therefore the labels
 are above the stroke and ticks (instead of below)?

 That's what you want right?

 2009/4/23 thomas parquier 
 mailingli...@web-attitude.frmailinglists%40web-attitude.fr
 :

 
 
  Maciek, pushing axisrenderer to annotationElements array doesnt seem to
  work.
 
  Sam, setting negative gutters works (any negative gutter does the same)
 but
  not completely : axe is rendered in area, but only stroke and ticks, no
  labels...
 
  thomas
 
 
 
  2009/4/22 Sam Lai samuel@gmail.com samuel.lai%40gmail.com
 
 
  Can you have negative gutters?
 
  Probably not; I have enough trouble as it is trying to get rid of all
  the space used by the axes - I've made the axes invisible via numerous
  style/property settings, but there's still one or two pixels of space
  being allocated to it.
 
  2009/4/22 Maciek Sakrejda msakre...@truviso.commsakrejda%40truviso.com
 :
 
  
  
   I wonder if putting the AxisRenderer in the chart's annotationElements
   array
   would work...
  
  
   -Original Message-
   From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com on
 behalf of thomas parquier
   Sent: Tue 4/21/2009 11:17 AM
   To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
   Subject: Re: [flexcoders] chart axis renderers inside data area
  
   There may be an easy way to get plain current axis but rendered
 inside
   the
   series area, ie not having to use drawing api for axis with labels and
   avoiding rewrite those getminmax, getlabels (with droplabels, etc)
   methods.
  
   thomas
  
  
   2009/4/20 Tom Chiverton 
   tom.chiver...@halliwells.comtom.chiverton%40halliwells.com
 
  
  
  
  
  
   On Sunday 19 Apr 2009, thomas parquier wrote:
Has anyone any suggestion about how to get axis rendered inside
 data
   area,
as an overlay ? with someway no outside gutters...
  
   DataDrawingCannas from
   http://www.quietlyscheming.com/blog/charts/easy-custom-charts/ would
 do
   the
   job, maybe.
  
   --
   Helping to autoschediastically brand unique ubiquitous architectures
 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 Tom.Chiverton%40halliwells.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.
  
  
  
  
  
  
  
   --
   http://www.web-attitude.fr/
   msn : thomas.parqu...@web-attitude.frthomas.parquier%40web-attitude.fr
   softphone : sip:webattit...@ekiga.net webattitude%40ekiga.net 
 sip%3awebattit...@ekiga.net sip%253Awebattitude%40ekiga.net
   téléphone portable : +33601 822 056
  
  
  
  
 
 
 
  --
  http://www.web-attitude.fr/
  msn : thomas.parqu...@web-attitude.frthomas.parquier%40web-attitude.fr
  softphone : sip:webattit...@ekiga.net webattitude%40ekiga.net
  téléphone portable : +33601 822 056
 
 
 
  




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


[flexcoders] DataGrid combobox erasing items from it's list

2009-04-23 Thread netdeep

I have a DataGrid that is linked to an array of custom data objects which I 
call a seriesList.  You are supposed to be able to choose the name of each 
series via a combobox in the datagrid.  It works fine except when the user 
selects the combobox and then clicks somewhere else in the interface, which 
closes the combobox and erases whichever item is previously selected!


!--  Definition in application  --
!--  axis.seriesList is and ArrayCollection of actionscript objects called 
SeriesObjects which have a var name:String variable --
mx:DataGrid id=seriesTable color=black fontSize=9 rowHeight=30 
editable=true resizeEffect=slow rollOverColor=#CC
selectionColor=#99 dataProvider={axis.seriesList} width=100%
rowCount={axis.seriesList.length  2 ? axis.seriesList.length : 2} 
mx:columns  
 mx:DataGridColumn dataField=name headerText=Name width=280 
headerStyleName=centered id=nameColumn
 rendererIsEditor=true  editorDataField=result 
itemRenderer=renderer.SeriesBoxRenderer/
/mx:columns
/mx:DataGrid


!--  SeriesBoxRenderer --
mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=init() 
horizontalAlign=center
   mx:Script
![CDATA[
import mx.collections.ArrayCollection;
// Define a property for returning the new value to the cell.
public var result:String=;
   
[Bindable]
private var dpValue:ArrayCollection;
   
private function init():void {
// list of possible names to choose from for this series
dpValue = mx.core.Application.application.seriesArray;
}
   
// Override the set method for the data property.
override public function set data(value:Object):void {
if (dpValue == null) init();
super.data = value;
if (value != null) {
var currentValue:String = value.name;
var len:int = dpValue.length;
for (var i:int = 0; i  len; i++) {
if (dpValue[i].name == currentValue) {
editor.selectedIndex = i;
return;
}
}
}
editor.selectedIndex = 0;}
   
public function onChange():void {
var index:int = editor.selectedIndex;
result = dpValue[index].name;
data.name = dpValue[index].name;
}   
 
]]
/mx:Script
 mx:ComboBox id=editor textAlign=left labelField=name 
dataProvider={dpValue}  change=onChange()/
/mx:VBox






Re: [flexcoders] e4x challenge

2009-04-23 Thread Daniel Freiman
If you want to select them, then:

XMLList list = xml.descendants().(@type = file)

otherwise, i'd still get that list and then loop through it and delete each
by doing (exact code might need some cleaning):

for (each item:XML in list) {
   delete item.parent()[item.childIndex()];
}



On Wed, Apr 22, 2009 at 7:14 PM, Michael Slinn msl...@mslinn.com wrote:



 I would like to filter out all elements with type=file from the following
 XML. That turns out to be rather difficult because node/ elements are
 nested. Any suggestions?

 ?xml version=1.0 encoding=UTF-8?
 node name=classes type=dir uri=file:/classes/
 node name=spring-beans-2.0.dtd type=file
 uri=file:/classes/spring-beans-2.0.dtd /node name=.svn type=dir
 uri=file:/classes/.svn/node name=props type=dir
 uri=file:/classes/.svn/props/ /node name=text-base type=dir
 uri=file:/classes/.svn/text-base/node name=sample.log4j.xml.svn-base
 type=file uri=file:/classes/.svn/text-base/sample.log4j.xml.svn-base
 //nodenode name=format type=file uri=file:/classes/.svn/format
 /node name=prop-base type=dir
 uri=file:/classes/.svn/prop-base/node name=sample.log4j.xml.svn-base
 type=file uri=file:/classes/.svn/prop-base/sample.log4j.xml.svn-base
 //nodenode name=entries type=file uri=file:/classes/.svn/entries
 /node name=tmp type=dir uri=file:/classes/.svn/tmp/node
 name=props type=dir uri=file:/classes/.svn/tmp/props/ /node
 name=text-base type=dir uri=file:/classes/.svn/tmp/text-base/ /node
 name=prop-base type=dir uri=file:/classes/.svn/tmp/prop-base/
 //node/nodenode name=com type=dir uri=file:/classes/com/node
 name=.svn type=dir uri=file:/classes/com/.svn/node name=props
 type=dir uri=file:/classes/com/.svn/props/ /node name=text-base
 type=dir uri=file:/classes/com/.svn/text-base/ /node name=format
 type=file uri=file:/classes/com/.svn/format /node name=prop-base
 type=dir uri=file:/classes/com/.svn/prop-base/ /node name=entries
 type=file uri=file:/classes/com/.svn/entries /node name=tmp
 type=dir uri=file:/classes/com/.svn/tmp/node name=props type=dir
 uri=file:/classes/com/.svn/tmp/props/ /node name=text-base type=dir
 uri=file:/classes/com/.svn/tmp/text-base/ /node name=prop-base
 type=dir uri=file:/classes/com/.svn/tmp/prop-base/ //node/nodenode
 name=kahootz type=dir uri=file:/classes/com/kahootz/node
 name=activemq.xml type=file uri=file:/classes/com/kahootz/activemq.xml
 /node name=context type=dir
 uri=file:/classes/com/kahootz/context/node name=remote-jms-context.xml
 type=file uri=file:/classes/com/kahootz/context/remote-jms-context.xml
 /node name=.svn type=dir
 uri=file:/classes/com/kahootz/context/.svn/node name=props type=dir
 uri=file:/classes/com/kahootz/context/.svn/props/ /node name=text-base
 type=dir uri=file:/classes/com/kahootz/context/.svn/text-base/node
 name=jms-context.xml.svn-base type=file
 uri=file:/classes/com/kahootz/context/.svn/text-base/jms-context.xml.svn-base
 /node name=remote-jms-context.xml.svn-base type=file
 uri=file:/classes/com/kahootz/context/.svn/text-base/remote-jms-context.xml.svn-base
 //nodenode name=format type=file
 uri=file:/classes/com/kahootz/context/.svn/format /node name=prop-base
 type=dir uri=file:/classes/com/kahootz/context/.svn/prop-base/node
 name=jms-context.xml.svn-base type=file
 uri=file:/classes/com/kahootz/context/.svn/prop-base/jms-context.xml.svn-base
 /node name=remote-jms-context.xml.svn-base type=file
 uri=file:/classes/com/kahootz/context/.svn/prop-base/remote-jms-context.xml.svn-base
 //nodenode name=entries type=file
 uri=file:/classes/com/kahootz/context/.svn/entries /node name=tmp
 type=dir uri=file:/classes/com/kahootz/context/.svn/tmp/node
 name=props type=dir
 uri=file:/classes/com/kahootz/context/.svn/tmp/props/ /node
 name=text-base type=dir
 uri=file:/classes/com/kahootz/context/.svn/tmp/text-base/ /node
 name=prop-base type=dir
 uri=file:/classes/com/kahootz/context/.svn/tmp/prop-base/
 //node/nodenode name=server-context.xml type=file
 uri=file:/classes/com/kahootz/context/server-context.xml /node
 name=jms-context.xml type=file
 uri=file:/classes/com/kahootz/context/jms-context.xml //nodenode
 name=space type=dir uri=file:/classes/com/kahootz/space/node
 name=context type=dir
 uri=file:/classes/com/kahootz/space/context/node
 name=remote-space-context.xml type=file
 uri=file:/classes/com/kahootz/space/context/remote-space-context.xml
 /node name=.svn type=dir
 uri=file:/classes/com/kahootz/space/context/.svn/node name=props
 type=dir uri=file:/classes/com/kahootz/space/context/.svn/props/ /node
 name=text-base type=dir
 uri=file:/classes/com/kahootz/space/context/.svn/text-base/node
 name=space-context.xml.svn-base type=file
 uri=file:/classes/com/kahootz/space/context/.svn/text-base/space-context.xml.svn-base
 /node name=local-space-context.xml.svn-base type=file
 uri=file:/classes/com/kahootz/space/context/.svn/text-base/local-space-context.xml.svn-base
 /node name=remote-space-context.xml.svn-base type=file
 

RE: [flexcoders] Unloading Modules - Binding is the Enemy?

2009-04-23 Thread Battershall, Jeff
Gregor,
 
Very interesting indeed.  If I login, load the module, interact with the
combobox, logout, the instance remains in the profiler.  However if I do
all that and THEN load another module and logout, the number of
instances of the first module goes to zero.  These modules are being
loaded into a ViewStack, BTW.  
 
Is this the FocusManager bug you described?  Is there a workaround?
 
I'd be thrilled to discover that Binding was not the culprit here.
 
Jeff

-Original Message-
From: flexcoders@yahoogroups.com
[mailto:flexcod...@yahoogroups.com] On Behalf Of Gregor Kiddie
Sent: Thursday, April 23, 2009 9:40 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Unloading Modules - Binding is the
Enemy?





It does sound like you are describing the bug where the focus
manager holds onto the reference of the combo box and stops the module
unloading...

If you lose the combobox focus, does the module unload?

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

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

Registered Number: 1788577

Registered in the UK

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

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





From: flexcoders@yahoogroups.com
[mailto:flexcod...@yahoogroups.com] On Behalf Of Battershall, Jeff
Sent: 23 April 2009 14:32
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Unloading Modules - Binding is the
Enemy?

 






Thanks Pedro,

 

I've seen what your describing in the docs - I'm looking at this
via the profiler which is giving me feedback as to number of live
instances, etc. 

 

Here's what I'm basing my statements on:.

 

1) I start up my app, which loads modules at runtime based upon
user choice from a menu.

 

2) Module exectues Cairngorm Event/Command/Delegate to get array
to populate a combo box. I'm passing a reference to the module's model
in my Cairngorm event and the model is updated upon completion of the
Command.

 

3) Combobox is bound (via MXML) to the model.

 

4) If I don't interact with the combobox, I can then logout and
unload the module successfully. The profiler tells me there was
previously 1 instance of the module and now there are zero instances.

 

5) If I make the combobox active (by interacting with it in any
way), and then logout, the module remains in memory, with the profiler
reporting one instance instead of zero.

 

6) If I then login again, the Profiler reports 2 active
instances of the module.  Note that any model objects are duplicated as
well. For example, if my list of suppliers (used to popuate my combobox)
(a strongly typed AS class) was previously 64, the profiler now reports
there are 128 instances.  

 

There's my behavior.  When my UI object (in this case ComboBox),
becomes active, the binding becomes active and then the module will not
unload, even if I set the modules model to null before attempting to
unload.  It would appear that I need to invalidate all outstanding
bindings to any data object before the module will fully unload.  This
would seem to indicate that MXML binding (via curly braces) isn't going
to allow this.

 

Jeff 







RE: [flexcoders] Re: HTTPService mistery

2009-04-23 Thread Tracy Spratt
What is the result format of the HTTPService call?  The default object
causes the flex client to process the incoming data into a tree of dynamic
objects.  The speed of this process would be subject to the local cpu.  You
could set resultFormat to e4x, and re-run the benchmarks.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of markgoldin_2000
Sent: Wednesday, April 22, 2009 11:15 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: HTTPService mistery

 






While it seems to me I am missing something obvious I am pretty sertant it
is somewhere in the send command. I have traced an execution to the point
that for a low end box it takes about 5 sec. between a send command and an
HTTPService callback function call. I have timed my server and it does not
take time at all. I timed the server for both my development computer and a
low level box. Server time is exactly the same. (what else whould one
expect?) But time it tales for an execution to get into a callback function
is very different. So, I am assuming that it takes some time for a low end
box to send a data request to the server.

--- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com,
Tracy Spratt tr...@... wrote:

 I would not expect the quality of the client to significantly affect the
 speed of the data service call.
 
 
 
 However, a slow computer *will* have issues with rendering the content.
 Have you determined definitively that the speed issue is with the data
 service call and not the rendering?
 
 
 
 Tracy Spratt,
 
 Lariat Services, development services available
 
 _ 
 
 From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
[mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com]
On
 Behalf Of markgoldin_2000
 Sent: Wednesday, April 22, 2009 7:06 PM
 To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
 Subject: [flexcoders] HTTPService mistery
 
 
 
 
 
 
 
 
 Is it possible that on low end computers HTTPService.send command would
take
 up to 10 or more times longer than on a more or less decent computer? Is
 there a way of tracking HTTPService.send command?
 
 Thanks






[flexcoders] Re: Flash player 10 Debug not recognized in FB3

2009-04-23 Thread Jason
 For FB3 you also need to make sure that you have I believe FB 3.0.2 in order 
 to use FP 10 Debug player properly. Less then that and I was getting a ton 
 warnings about not having the debug player.

Thanks Mark, I see my version of Flexbuilder is 3.0.1, not 3.0.2!  I'll try 
upgrading!

Everyone else, thanks for responding - a lot of you have been recommending I 
understand there are two different versions of the Flash player - the regular 
release and the debug version.  I'm not sure how I gave the impression I didn't 
understand that, even from the beginning, I clearly do - especially if you read 
my original post.  Funny, because I titled this thread, Flash player 10 
Debug  Maybe when Alex called them binaries instead of players and I was 
confused by that and asked a question about what he meant, that threw some of 
you off. Sorry! ;)  It was just because never heard of the Flash players being 
called a binaries before - so I didn't know if he was talking about something 
else entirely. Also, as I stated, I have run the uinstaller and then the 
installer for the DEBUG version of the player without luck, as I mentioned.  

So sorry for any confusion, didn't mean to waste your time responding to the 
wrong question.  My problem is that after uninstalling FP10 and re-installing 
FP10 DEBUG version, FB3 still does not recognize it.  

I'm going to take Mark's advice and upgrade FB3 and see if that works.  Thanks 
everyone for your help!

Jason



[flexcoders] Working With Dynamic Datagrid

2009-04-23 Thread blkmajk111
Hey All,

I'm having an issue that I was hoping someone can help me out with.

I need to populate a datagrid based on XML being returned to Flex. The 
structure of the XML is as follows: 

root
 lab id=2 title=Chemical Materials
  assignment assignmentid=2 name=s2 s2 grade=B/
  assignment assignmentid=4  name=s1 s1 grade=C/
  assignment assignmentid=6  name=John Smith grade=B/
 /lab
 lab id=8 title=BioChem
  assignment assignmentid=3 name=s2 s2 grade=F/
  assignment assignmentid=5 name=John Smith grade=D/
 /lab
/root

When this XML gets returned to Flex I need to throw it into a Datagrid for 
diaplay. The catch is there can be any number of columns in the datagrid 
becasue the assignments can be of different quantities.

Here is the code that I am using to make the grid:

 private function getGradebookSectionDb(event:ResultEvent):void{
  var gradebookBySection:XMLList = event.result.lab;

  var cols:Array=new Array;

  for (var i:int=0;igradebookBySection.length();i++){
var col:DataGridColumn=new DataGridColumn();
col.headertext=gradebookbysection[...@title.toxmlstring();
  
col.dataField=gradebookBySection[i].children()@grade.toxmlstring();
cols.push(col);
gradebookDatagrid.columns=cols;
gradebookDatagrid.visible=true; 
 }

When I do this, the columns get created from the XML very nicely with the 
headers displaying correctly but there is no data showing up in the columns. I 
would like to get one of the attribute values in each column but for some 
reason nothing comes up. When I do a trace on the col.datafield I get the 
right information coming back in the trace but nothing shows up in the column.

I would have just assigned the XML as a datapovider to the datagrid but as the 
amount of assignments returned can change, I saw this as my only option.

Can anyone help me with this?

Thanks!



[flexcoders] Re: Stop sending data on socket aftter flush()

2009-04-23 Thread rangyjohn
--- In flexcoders@yahoogroups.com, rangyjohn debace...@... wrote:

 Is it possible? I tried with close() method and tested with wireshark but it 
 continue sending data.
 
 Thanks!


Is it possible that nobody run on this problem? This is something very simple 
and common but don't work :(



Re: [flexcoders] Re: RegEx string via cell ItemRenderer to colorize specific characters or a better method?

2009-04-23 Thread Adrian Williams

Hi Tim,

   This is perfect!  It very nicely replaces ALL the instances of the 
find value. 


Thanks!!
Adrian

Tim Hoff wrote:



Hi Adrian,

I came across this function recently, that may suit you needs:

*public* *static* *function* StringReplaceAll( source:String, 
find:String, replacement:String ) : String

{
* return* source.split( find ).join( replacement );
}

-TH

--- In flexcoders@yahoogroups.com, Adrian Williams adri...@... wrote:

 Hi Tracy,

 This is an interesting idea...but you have me at a bit of a
 lossI was already heading down part of the same path you laid out
 here...here is my renderer code thus far:

 First, the column from my ADG:
 mx:AdvancedDataGridColumn id=groupedHVR1 dataField=Hvr1M
 headerText=HVR1 Mutations headerWordWrap=true textAlign=left
 wordWrap=true editable=false width=100 showDataTips=true
 itemRenderer=renderers.GeneralRenderers.AminoAcidRenderer /


 now the AminoAcidRenderer.mxml:

 ?xml version=1.0 encoding=utf-8?
 mx:Label xmlns:mx=http://www.adobe.com/2006/mxml;
 implements=mx.core.IFactory truncateToFit=true
 width=100% height=100% paddingLeft=2 paddingRight=2
 mx:Script
 ![CDATA[
 import mx.utils.ObjectProxy;

 override public function set text(value:String):void
 {
 if (value != null  value !=value != )
 {
 value = String(value.replace(G,'font
 color=blackG/font'));
 value = String(value.replace(A,'font
 color=greenA/font'));
 value = String(value.replace(T,'font
 color=redT/font'));
 value = String(value.replace(C,'font
 color=blueC/font'));

 super.htmlText = value;
 }
 else
 {
 super.htmlText = value;
 }
 }

 public function newInstance():*
 {
 return new AminoAcidRenderer();
 }
 ]]
 /mx:Script
 /mx:Label

 But, alas, there are a couple of problems here. First, the
 string.replace() only affects the first occurrence of the pattern and
 not every occurrence (I wonder if a regex would remedy that?). Then
 although the substitution gets done for those patterns that are found,
 the htmlText isn't getting rendered...and I wonder if it's due to the
 function set text instead of function set htmlText, which I tried and
 literally got nothing.

 I've also looked at the TextRange that someone else suggested but
 not sure how to possibly use that as it needs a begin/end index and the
 letters are sporadic from one string to the next.

 How would I setup the labelFunction to parse the string to get the
 letters?

 Thanks in advance!
 Adrian



 Tracy Spratt wrote:
 
 
  I suggest that you use a labelFunction feeding a renderer that uses
  htmlText. The label function would simply parse the strings to get
  the letters, and wrap them in a Font tag specifying the color. This
  would be very easy.
 
 
 
  Tracy Spratt,
 
  Lariat Services, development services available
 
  


 
  *From:* flexcoders@yahoogroups.com 
[mailto:flexcod...@yahoogroups.com]

  *On Behalf Of *valdhor
  *Sent:* Wednesday, April 22, 2009 4:44 PM
  *To:* flexcoders@yahoogroups.com
  *Subject:* [flexcoders] Re: RegEx string via cell ItemRenderer to
  colorize specific characters or a better method?
 
 
 
 
 
 
  Have a look into TextRange.
 
  --- In flexcoders@yahoogroups.com
  mailto:flexcoders%40yahoogroups.com, Adrian Williams adrianw@
  wrote:
  
   Hi All,
  
   Here's a fun one!
  
   I have a column in an ADG, and the cells can contain a variety of
   data including:
  
   16223T,16290T,16319A,16362C,16524G
   or
   73G,249-,263G,290-,291-,309.1C,315.1C,489C,493G,522-,523-
  
   What I need to do is for each of the letters (there's four possible
   - A,T,C,G) I need to be able to change the font color specific 
to each
   letter...i.e. all the A's need to be green, the C's need to 
be blue,

   the G's need to be black and the T's need to be red.
  
   As I've been thinking about it, I figure I'm going to have to use a
   custom itemRenderer for the cell to manipulate the data to begin 
with.
   But within the renderer, I'm quasi-stuck. I figure the simplest 
way to
   ID the letters is to RegExp the data...then possibly using a 
switch/case
   to set the colors for the letters...but not sure how to affect 
just the
   individual letters in the overall string and then return that 
with the

   cell's renderer??
  
   Anyone have any thoughts on this?
  
   Thanks!
   Adrian
  
 
 





Re: [flexcoders] Working With Dynamic Datagrid

2009-04-23 Thread Willy Ci
try this, my old code,

mx:DataGrid id=dg3 width=100% dataProvider={orgXML.location}
creationComplete=dg3.columns =
generateCols(orgXML.location, false) rowHeight=20
click=selectStore(event)  updateComplete=d3build()
allowMultipleSelection=true variableRowHeight=true /

private function generateCols(input:XMLList, useAttributes:Boolean =
false):Array
{
var e1:XML = input[0];
var columns:Array = [];
var children:XMLList ;

if (useAttributes)
{
children = e1.attributes();
}
else
{
children = e1.children();
}

for each(var child:XML in children)
{
var col:DataGridColumn = new DataGridColumn();
col.dataField = useAttributes ? @ + child.name() : child.name();
var fieldName:String = child.name();
col.headerText = fieldName.charAt(0).toUpperCase() +
fieldName.substr(1);
// create itemrenderer
if(col.headerText == Survey)
col.itemRenderer = new ClassFactory(imageCR);
else if (col.headerText == Percent )
col.itemRenderer = new ClassFactory(percentCR);


var tempObj:Object = new Object();
tempObj = {
label : col.headerText
}

cList.addItem(tempObj);
columns.push(col);


}
return columns;
}


Willy
617-606-3437
--
6 X 9 = 42

Q: How do you spell google?
A: Why don't you google it?
--


On Thu, Apr 23, 2009 at 9:05 AM, blkmajk111 jacker...@latenitelabs.comwrote:



 Hey All,

 I'm having an issue that I was hoping someone can help me out with.

 I need to populate a datagrid based on XML being returned to Flex. The
 structure of the XML is as follows:

 root
 lab id=2 title=Chemical Materials
 assignment assignmentid=2 name=s2 s2 grade=B/
 assignment assignmentid=4 name=s1 s1 grade=C/
 assignment assignmentid=6 name=John Smith grade=B/
 /lab
 lab id=8 title=BioChem
 assignment assignmentid=3 name=s2 s2 grade=F/
 assignment assignmentid=5 name=John Smith grade=D/
 /lab
 /root

 When this XML gets returned to Flex I need to throw it into a Datagrid for
 diaplay. The catch is there can be any number of columns in the datagrid
 becasue the assignments can be of different quantities.

 Here is the code that I am using to make the grid:

 private function getGradebookSectionDb(event:ResultEvent):void{
 var gradebookBySection:XMLList = event.result.lab;

 var cols:Array=new Array;

 for (var i:int=0;igradebookBySection.length();i++){
 var col:DataGridColumn=new DataGridColumn();
 col.headertext=gradebookbysection[...@title.toxmlstring();
 col.dataField=gradebookBySection[i].children()@grade.toxmlstring();
 cols.push(col);
 gradebookDatagrid.columns=cols;
 gradebookDatagrid.visible=true;
 }

 When I do this, the columns get created from the XML very nicely with the
 headers displaying correctly but there is no data showing up in the columns.
 I would like to get one of the attribute values in each column but for some
 reason nothing comes up. When I do a trace on the col.datafield I get the
 right information coming back in the trace but nothing shows up in the
 column.

 I would have just assigned the XML as a datapovider to the datagrid but as
 the amount of assignments returned can change, I saw this as my only option.

 Can anyone help me with this?

 Thanks!

  



[flexcoders] Re: maxWidth property not working on Advanced DataGrid

2009-04-23 Thread labosox
I placed the height at 80 so that I could force a vertical scroll bar. That way 
I didnt have to add more data to turn on the vertical scroll bar.

basically I need a grid to resize its entire width on a column resize event. 
When the grid's width is too large to fit in a panel, I want the grids 
horizontal scroll bar to come on. The code below doesnt work if a vertical 
scroll bar is present. 

Let me know if the scenario doesnt make sense.


--- In flexcoders@yahoogroups.com, Marco Catunda marco.catu...@... wrote:

 I didn't understand very well, but If you remove height=80 property
 in below line,
 the vertical scroll bar go away.
 
 mx:AdvancedDataGrid width=318 height=80 id=dg
 horizontalCenter=0 dataProvider={arr}
 horizontalScrollPolicy=auto 
 
 --
 Marco Catunda
 
 
 On Wed, Apr 22, 2009 at 8:52 AM, labosox lgad...@... wrote:
 
 
  Hello,
 
  I am trying to create a grid that will update its size on a column resize
  event. I want the grid to keep getting large until they hit a max width then
  turn on a horizontal scroll bar.
 
  Everything seems to work fine unless I have a vertical scroll bar present in
  the grid. When I try to re-size a column the datagrid adds a horizontal
  scroll bar automatically.
 
  Heres my code:
 
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
  creationComplete=initApp() viewSourceURL=srcview/index.html
  mx:Script
  ![CDATA[
  import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
  import mx.controls.advancedDataGridClasses.AdvancedDataGridRendererProvider;
  import mx.events.IndexChangedEvent;
  import mx.events.ResizeEvent;
  import mx.collections.IViewCursor;
  import mx.collections.ArrayCollection;
  import mx.rpc.events.ResultEvent;
  import mx.events.DataGridEvent;
  import mx.events.AdvancedDataGridEvent;
  import mx.controls.dataGridClasses.DataGridColumn;
  import mx.managers.CursorManager;
  public var bDummy:Boolean = false;
 
  [Bindable]
  private var itemAC:ArrayCollection;
 
  private function initApp():void{
 
  dg.maxWidth = stuff.width;
  dg.addEventListener(AdvancedDataGridEvent.COLUMN_STRETCH, resizeCol);
  }
 
  private function resizeCol(event:AdvancedDataGridEvent):void
  {
  var _colIndex:Number = event.columnIndex;
  var width:Number;
 
  for(var i:int = 0; i = dg.columns.length - 1; i++)
  {
  width += dg.columns[i].width;
  }
 
  dg.width = width;
 
  //ive tried to add 18 here to handle the scroll bar but then the maxWidth
  //is ignored and the grid keeps resizing outside of its maxWidth
 
  }
 
  ]]
  /mx:Script
  mx:Array id=arr
  mx:Object name=Redsox quanity=10 cost=1000/
  mx:Object name=Rays quanity=11 cost=500/
  mx:Object name=Yankees quanity=20 cost=2000/
  /mx:Array
  mx:Canvas width=500 height=45% backgroundColor=red
  horizontalCenter=0
  verticalCenter=-65 id=stuff verticalScrollPolicy=off
  horizontalScrollPolicy=off
  mx:AdvancedDataGrid width=318 height=80 id=dg horizontalCenter=0
  dataProvider={arr}
  horizontalScrollPolicy=auto 
  mx:columns
  mx:AdvancedDataGridColumn width=100 headerText=name dataField=name/
  mx:AdvancedDataGridColumn width=100 headerText=quanity
  dataField=quanity/
  mx:AdvancedDataGridColumn width=100 headerText=cost dataField=cost/
  /mx:columns
  /mx:AdvancedDataGrid
  /mx:Canvas
 
  /mx:Application
 
 





[flexcoders] Question about ASDocs

2009-04-23 Thread timgerr
When I run ASDocs on a project that works fine, I get some errors that somthing 
was not found at compile time.  Is there a way to turn off errors and just 
write the documentation???


Thanks,
timgerr



RE: [flexcoders] Working With Dynamic Datagrid

2009-04-23 Thread Tracy Spratt
I don't see where you are you assigning the dataProvider.  Either assign the
data to a bindable var  in the result handler, of assign the dataProvider
directly.  If assigning directly, you might need to use callLater()

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of blkmajk111
Sent: Thursday, April 23, 2009 9:06 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Working With Dynamic Datagrid

 






Hey All,

I'm having an issue that I was hoping someone can help me out with.

I need to populate a datagrid based on XML being returned to Flex. The
structure of the XML is as follows: 

root
lab id=2 title=Chemical Materials
assignment assignmentid=2 name=s2 s2 grade=B/
assignment assignmentid=4 name=s1 s1 grade=C/
assignment assignmentid=6 name=John Smith grade=B/
/lab
lab id=8 title=BioChem
assignment assignmentid=3 name=s2 s2 grade=F/
assignment assignmentid=5 name=John Smith grade=D/
/lab
/root

When this XML gets returned to Flex I need to throw it into a Datagrid for
diaplay. The catch is there can be any number of columns in the datagrid
becasue the assignments can be of different quantities.

Here is the code that I am using to make the grid:

private function getGradebookSectionDb(event:ResultEvent):void{
var gradebookBySection:XMLList = event.result.lab;

var cols:Array=new Array;

for (var i:int=0;igradebookBySection.length();i++){
var col:DataGridColumn=new DataGridColumn();
col.headertext=gradebookbysection[...@title.toxmlstring();
col.dataField=gradebookBySection[i].children()@grade.toxmlstring();
cols.push(col);
gradebookDatagrid.columns=cols;
gradebookDatagrid.visible=true; 
}

When I do this, the columns get created from the XML very nicely with the
headers displaying correctly but there is no data showing up in the columns.
I would like to get one of the attribute values in each column but for some
reason nothing comes up. When I do a trace on the col.datafield I get the
right information coming back in the trace but nothing shows up in the
column.

I would have just assigned the XML as a datapovider to the datagrid but as
the amount of assignments returned can change, I saw this as my only option.

Can anyone help me with this?

Thanks!





[flexcoders] 360|Whisperings online Technical articles, looking for authors.

2009-04-23 Thread John Wilker
For those that don't know me, I'm John Wilker, co-founder of 360|Conferences
(360|Flex, and 360|iDev). Tom Ortega and I have created a new venture to go
along with our community oriented conferences. 360|Whisperings (
http://www.360whisperings.com). For those of you who own Amazon Kindles you
know that Whispernet is the delivery medium for purchased content.

We've created a site where people can come and browse the available content
and instead of subscribing for all you can eat, simply purchase the articles
that they want. Subscriptions are great, but you have to get your money's
worth. We're looking to go more the iTunes route, for a buck or two, get the
same quality article you would from a pay site or journal, knowing it's
quality content, and not have to pay for the content you don't want or need.

We're not just going to be limited to the Kindle (and the iPhone/iTouch
technically) but that's a good turn key place to start. Our goal is to offer
content in as many formats as we can (PDF, ePub, Mobi, PRC, etc) so that
everyone can get access. We'll take care of editing and marketing the
content and reporting on sales. The split is 60/40 us, in exchange for the
stuff I just mentioned. Our conference sites will link to and highlight
content as well as the primary site itself. I know it seems like small
change, and it is to start, but the more articles we get, the more momentum
this offering builds.

We've got a few folks signed on right now, coming up with article ideas.
We're hoping to get a few more folks for the official launch so that we've
got a good library set up and ready for folks. Why subscribe to sites and
journals, and have no idea how much value you'll get from the content? Just
pay for what you want. We're looking for technical content on any topic; CF,
FLex, Flash, AIR, Java, etc.


RE: [flexcoders] e4x challenge

2009-04-23 Thread Tracy Spratt
Ah, great solution!  Lots simpler than my recursive transformation
suggestion.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Daniel Freiman
Sent: Thursday, April 23, 2009 10:03 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] e4x challenge

 






If you want to select them, then:

XMLList list = xml.descendants().(@type = file)

otherwise, i'd still get that list and then loop through it and delete each
by doing (exact code might need some cleaning):

for (each item:XML in list) {
   delete item.parent()[item.childIndex()];
}




On Wed, Apr 22, 2009 at 7:14 PM, Michael Slinn msl...@mslinn.
mailto:msl...@mslinn.com com wrote:

 

I would like to filter out all elements with type=file from the following
XML. That turns out to be rather difficult because node/ elements are
nested. Any suggestions?

?xml version=1.0 encoding=UTF-8?
node name=classes type=dir uri=file:/classes/
node name=spring-beans-2.0.dtd type=file
uri=file:/classes/spring-beans-2.0.dtd /node name=.svn type=dir
uri=file:/classes/.svn/node name=props type=dir
uri=file:/classes/.svn/props/ /node name=text-base type=dir
uri=file:/classes/.svn/text-base/node name=sample.log4j.xml.svn-base
type=file uri=file:/classes/.svn/text-base/sample.log4j.xml.svn-base
//nodenode name=format type=file uri=file:/classes/.svn/format
/node name=prop-base type=dir
uri=file:/classes/.svn/prop-base/node name=sample.log4j.xml.svn-base
type=file uri=file:/classes/.svn/prop-base/sample.log4j.xml.svn-base
//nodenode name=entries type=file uri=file:/classes/.svn/entries
/node name=tmp type=dir uri=file:/classes/.svn/tmp/node
name=props type=dir uri=file:/classes/.svn/tmp/props/ /node
name=text-base type=dir uri=file:/classes/.svn/tmp/text-base/ /node
name=prop-base type=dir uri=file:/classes/.svn/tmp/prop-base/
//node/nodenode name=com type=dir uri=file:/classes/com/node
name=.svn type=dir uri=file:/classes/com/.svn/node name=props
type=dir uri=file:/classes/com/.svn/props/ /node name=text-base
type=dir uri=file:/classes/com/.svn/text-base/ /node name=format
type=file uri=file:/classes/com/.svn/format /node name=prop-base
type=dir uri=file:/classes/com/.svn/prop-base/ /node name=entries
type=file uri=file:/classes/com/.svn/entries /node name=tmp
type=dir uri=file:/classes/com/.svn/tmp/node name=props type=dir
uri=file:/classes/com/.svn/tmp/props/ /node name=text-base type=dir
uri=file:/classes/com/.svn/tmp/text-base/ /node name=prop-base
type=dir uri=file:/classes/com/.svn/tmp/prop-base/ //node/nodenode
name=kahootz type=dir uri=file:/classes/com/kahootz/node
name=activemq.xml type=file uri=file:/classes/com/kahootz/activemq.xml
/node name=context type=dir
uri=file:/classes/com/kahootz/context/node name=remote-jms-context.xml
type=file uri=file:/classes/com/kahootz/context/remote-jms-context.xml
/node name=.svn type=dir
uri=file:/classes/com/kahootz/context/.svn/node name=props type=dir
uri=file:/classes/com/kahootz/context/.svn/props/ /node name=text-base
type=dir uri=file:/classes/com/kahootz/context/.svn/text-base/node
name=jms-context.xml.svn-base type=file
uri=file:/classes/com/kahootz/context/.svn/text-base/jms-context.xml.svn-ba
se /node name=remote-jms-context.xml.svn-base type=file
uri=file:/classes/com/kahootz/context/.svn/text-base/remote-jms-context.xml
.svn-base //nodenode name=format type=file
uri=file:/classes/com/kahootz/context/.svn/format /node name=prop-base
type=dir uri=file:/classes/com/kahootz/context/.svn/prop-base/node
name=jms-context.xml.svn-base type=file
uri=file:/classes/com/kahootz/context/.svn/prop-base/jms-context.xml.svn-ba
se /node name=remote-jms-context.xml.svn-base type=file
uri=file:/classes/com/kahootz/context/.svn/prop-base/remote-jms-context.xml
.svn-base //nodenode name=entries type=file
uri=file:/classes/com/kahootz/context/.svn/entries /node name=tmp
type=dir uri=file:/classes/com/kahootz/context/.svn/tmp/node
name=props type=dir
uri=file:/classes/com/kahootz/context/.svn/tmp/props/ /node
name=text-base type=dir
uri=file:/classes/com/kahootz/context/.svn/tmp/text-base/ /node
name=prop-base type=dir
uri=file:/classes/com/kahootz/context/.svn/tmp/prop-base/
//node/nodenode name=server-context.xml type=file
uri=file:/classes/com/kahootz/context/server-context.xml /node
name=jms-context.xml type=file
uri=file:/classes/com/kahootz/context/jms-context.xml //nodenode
name=space type=dir uri=file:/classes/com/kahootz/space/node
name=context type=dir
uri=file:/classes/com/kahootz/space/context/node
name=remote-space-context.xml type=file
uri=file:/classes/com/kahootz/space/context/remote-space-context.xml
/node name=.svn type=dir
uri=file:/classes/com/kahootz/space/context/.svn/node name=props
type=dir uri=file:/classes/com/kahootz/space/context/.svn/props/ /node
name=text-base type=dir
uri=file:/classes/com/kahootz/space/context/.svn/text-base/node
name=space-context.xml.svn-base type=file

RE: [flexcoders] DataGrid combobox erasing items from it's list

2009-04-23 Thread Tracy Spratt
So the scenario is:

1.  user clicks cell, CB editor appears
2.  user clicks away somewhere, without selecting anything
3.  ComboBox closes
4.  an empty string is stored in the dataProvider

 

Yes?  Is the change event and handler firing in this case?

 

If so, then I think you need to make the renderer set the ComboBox's
selectedIndex to display the current value.  Thus however the change event
was caused, the correct value would be put back in the property.

 

I think you would want this behavior anyway.  Note you can't directly set
selectedItem, but must loop over the dataProvider comparing property values,
then using the loop index to set the selectedIndex.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of netdeep
Sent: Thursday, April 23, 2009 9:57 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] DataGrid combobox erasing items from it's list

 







I have a DataGrid that is linked to an array of custom data objects which I
call a seriesList. You are supposed to be able to choose the name of each
series via a combobox in the datagrid. It works fine except when the user
selects the combobox and then clicks somewhere else in the interface, which
closes the combobox and erases whichever item is previously selected!

!-- Definition in application --
!-- axis.seriesList is and ArrayCollection of actionscript objects called
SeriesObjects which have a var name:String variable --
mx:DataGrid id=seriesTable color=black fontSize=9 rowHeight=30
editable=true resizeEffect=slow rollOverColor=#CC
selectionColor=#99 dataProvider={axis.seriesList} width=100%
rowCount={axis.seriesList.length  2 ? axis.seriesList.length : 2} 
mx:columns 
mx:DataGridColumn dataField=name headerText=Name width=280
headerStyleName=centered id=nameColumn
rendererIsEditor=true editorDataField=result
itemRenderer=renderer.SeriesBoxRenderer/
/mx:columns
/mx:DataGrid

!-- SeriesBoxRenderer --
mx:VBox xmlns:mx=http://www.adobe. http://www.adobe.com/2006/mxml
com/2006/mxml creationComplete=init() horizontalAlign=center
mx:Script
![CDATA[
import mx.collections.ArrayCollection;
// Define a property for returning the new value to the cell.
public var result:String=;

[Bindable]
private var dpValue:ArrayCollection;

private function init():void {
// list of possible names to choose from for this series
dpValue = mx.core.Application.application.seriesArray;
}

// Override the set method for the data property.
override public function set data(value:Object):void {
if (dpValue == null) init();
super.data = value;
if (value != null) {
var currentValue:String = value.name;
var len:int = dpValue.length;
for (var i:int = 0; i  len; i++) {
if (dpValue[i].name == currentValue) {
editor.selectedIndex = i;
return;
}
}
}
editor.selectedIndex = 0; }

public function onChange():void {
var index:int = editor.selectedIndex;
result = dpValue[index].name;
data.name = dpValue[index].name;
} 

]]
/mx:Script
mx:ComboBox id=editor textAlign=left labelField=name
dataProvider={dpValue} change=onChange()/
/mx:VBox





Re: [flexcoders] Unloading Modules - Binding is the Enemy?

2009-04-23 Thread Marvin Froeder
Hi Jeff,
Just curiosity, what Application Domain are you using?
http://livedocs.adobe.com/flex/3/html/help.html?content=18_Client_System_Environment_5.html


http://livedocs.adobe.com/flex/3/html/help.html?content=18_Client_System_Environment_5.html
VELO

On Thu, Apr 23, 2009 at 11:13 AM, Battershall, Jeff 
jeff.battersh...@dowjones.com wrote:



  Gregor,

 Very interesting indeed.  If I login, load the module, interact with the
 combobox, logout, the instance remains in the profiler.  However if I do all
 that and THEN load another module and logout, the number of instances of the
 first module goes to zero.  These modules are being loaded into a ViewStack,
 BTW.

 Is this the FocusManager bug you described?  Is there a workaround?

 I'd be thrilled to discover that Binding was not the culprit here.

 Jeff

  -Original Message-
 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Gregor Kiddie
 *Sent:* Thursday, April 23, 2009 9:40 AM
 *To:* flexcoders@yahoogroups.com
 *Subject:* RE: [flexcoders] Unloading Modules - Binding is the Enemy?

  It does sound like you are describing the bug where the focus manager
 holds onto the reference of the combo box and stops the module unloading…

 If you lose the combobox focus, does the module unload?



 Gk.

 *Gregor Kiddie*
 Senior Developer
 *INPS*

 Tel:   01382 564343

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

 Registered Number: 1788577

 Registered in the UK

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

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

 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Battershall, Jeff
 *Sent:* 23 April 2009 14:32
 *To:* flexcoders@yahoogroups.com
 *Subject:* RE: [flexcoders] Unloading Modules - Binding is the Enemy?






  Thanks Pedro,



 I've seen what your describing in the docs - I'm looking at this via the
 profiler which is giving me feedback as to number of live instances, etc.



 Here's what I'm basing my statements on:.



 1) I start up my app, which loads modules at runtime based upon user choice
 from a menu.



 2) Module exectues Cairngorm Event/Command/Delegate to get array to
 populate a combo box. I'm passing a reference to the module's model in my
 Cairngorm event and the model is updated upon completion of the Command.



 3) Combobox is bound (via MXML) to the model.



 4) If I don't interact with the combobox, I can then logout and unload the
 module successfully. The profiler tells me there was previously 1 instance
 of the module and now there are zero instances.



 5) If I make the combobox active (by interacting with it in any way), and
 then logout, the module remains in memory, with the profiler reporting one
 instance instead of zero.



 6) If I then login again, the Profiler reports 2 active instances of the
 module.  Note that any model objects are duplicated as well. For example, if
 my list of suppliers (used to popuate my combobox) (a strongly typed AS
 class) was previously 64, the profiler now reports there are 128 instances.




 There's my behavior.  When my UI object (in this case ComboBox), becomes
 active, the binding becomes active and then the module will not unload, even
 if I set the modules model to null before attempting to unload.  It would
 appear that I need to invalidate all outstanding bindings to any data object
 before the module will fully unload.  This would seem to indicate that MXML
 binding (via curly braces) isn't going to allow this.



 Jeff

  



[flexcoders] How to zoom and pan everything in Stage

2009-04-23 Thread ACasualObserver
We have an Actionscript 3 application that adds several Layers (Sprite 
subclass) to the Stage and each of these layers other sprites that represent 
graphical elements.

We need to implement zoom in, zoom out, and pan. What we need to do to make all 
the graphical elements to zoom and pan?

Thanks



RE: [flexcoders] Unloading Modules - Binding is the Enemy?

2009-04-23 Thread Battershall, Jeff
I'm creating new ApplicationDomain just for the modules. 

-Original Message-
From: flexcoders@yahoogroups.com
[mailto:flexcod...@yahoogroups.com] On Behalf Of Marvin Froeder
Sent: Thursday, April 23, 2009 2:19 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Unloading Modules - Binding is the
Enemy?




Hi Jeff, 

Just curiosity, what Application Domain are you using?

http://livedocs.adobe.com/flex/3/html/help.html?content=18_Client_System
_Environment_5.html



http://livedocs.adobe.com/flex/3/html/help.html?content=18_Client_Syste
m_Environment_5.html VELO


On Thu, Apr 23, 2009 at 11:13 AM, Battershall, Jeff
jeff.battersh...@dowjones.com wrote:






Gregor,
 
Very interesting indeed.  If I login, load the module,
interact with the combobox, logout, the instance remains in the
profiler.  However if I do all that and THEN load another module and
logout, the number of instances of the first module goes to zero.  These
modules are being loaded into a ViewStack, BTW.  
 
Is this the FocusManager bug you described?  Is there a
workaround?
 
I'd be thrilled to discover that Binding was not the
culprit here.
 
Jeff

-Original Message-
From: flexcoders@yahoogroups.com
[mailto:flexcod...@yahoogroups.com] On Behalf Of Gregor Kiddie
Sent: Thursday, April 23, 2009 9:40 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Unloading Modules -
Binding is the Enemy?



It does sound like you are describing the bug
where the focus manager holds onto the reference of the combo box and
stops the module unloading...

If you lose the combobox focus, does the module
unload?

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

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

Registered Number: 1788577

Registered in the UK

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

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





From: flexcoders@yahoogroups.com
[mailto:flexcod...@yahoogroups.com] On Behalf Of Battershall, Jeff
Sent: 23 April 2009 14:32
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Unloading Modules -
Binding is the Enemy?

 






Thanks Pedro,

 

I've seen what your describing in the docs - I'm
looking at this via the profiler which is giving me feedback as to
number of live instances, etc. 

 

Here's what I'm basing my statements on:.

 

1) I start up my app, which loads modules at
runtime based upon user choice from a menu.

 

2) Module exectues Cairngorm
Event/Command/Delegate to get array to populate a combo box. I'm passing
a reference to the module's model in my Cairngorm event and the model is
updated upon completion of the Command.

 

3) Combobox is bound (via MXML) to the model.

 

4) If I don't interact with the combobox, I can
then logout and unload the module successfully. The profiler tells me
there was previously 1 instance of the module and now there are zero
instances.

 

5) If I make the combobox active (by interacting
with it in any way), and then logout, the module remains in memory, with
the profiler reporting one instance instead of zero.

 

6) If I then login again, the Profiler reports 2
active instances of the module.  Note that any model 

[flexcoders] Imported SWC files don't display correctly

2009-04-23 Thread fumeng5
Hi,

I am importing 4 swc files; a left arrow, right arrow, up arrow, and down 
arrow. 

The problem is that the right arrow displays as the left, and the down as the 
up arrow. 

When I preview the SWC files in their corresponding SWF files they look right. 

Has anyone else experienced problems displaying SWC files correctly? 

Thanks for any helpful tips!



Re: [flexcoders] Dynamic Flex Stacked Column Chart

2009-04-23 Thread Maciek Sakrejda
What do you mean by aligned with each other?


-Original Message-
From: Richard Rodseth rrods...@gmail.com
Reply-to: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Dynamic Flex Stacked Column Chart
Date: Thu, 23 Apr 2009 13:13:51 -0700



Trying one more time. Surely there's a call (validateNow() ?,
invalidateDisplayList() ? that would force a column chart to display
properly after its series array has been dynamically constructed? 

I haven't been able to find a JIRA bug though this may be related:

http://bugs.adobe.com/jira/browse/FLEXDMV-1957



On Wed, Apr 15, 2009 at 1:23 PM, Richard Rodseth rrods...@gmail.com
wrote:
Did you have any luck with this?

I have a binding function as follows

mx:ColumnChart id=columnChart type=stacked 
height=100% 
width=100% 
dataProvider=model.chartData
series={this.buildSeriesList(model.seriesSpec)} 

and the stacked columns are displayed, but not aligned with each
other. Quite amusing, except when you have a deadline.
This must be the known defect you referred to.
Anyone know a workaround, or defect number?




On Mon, Apr 6, 2009 at 9:20 AM, jeffreyr6915
jrwalk...@gmail.com wrote:
I'd like to create a dynamic Flex Stacked Column Chart
at runtime, based on values out of a database. The
following are the steps that I currently follow (without
success):

1. Query the database and populate chartIemArrayColl
with ChartItem objects
2. Iterate through chartIemArrayColl and only create a a
new columnseries object if there does not already exist
on for that 'selection'. Add this columnseries to the
columnset
3. Apply this to the chart

Note: I used secondSeries instead of series because of a
known defect in Flex that makes the charts off center if
series is used.

Problems:

1. The chartIemArrayColl contains items that contain the
same 'name' but different 'value' and different
'selection'. However, in this case that particular
'name' is printed on the x-axis multiple times (not
correct)
2. The 'selection' should be the legend, but when it is
graphed it does not seem as though it is connected to
the items actually charted

What I'd like to achieve:

1. Column chart with a legend that contains only values
of the 'selection'
2. Stacked Column chart that contains values where I can
chart the following example:

item1 (name=myName, selection=sel1, value=4)
item2 (name=myName, selection=sel2, value=6)
item3 (name=name3, selection=sel1, value=8)

I expect a chart that has myName and name3 across the
x-axis (myName should only appear once). A column should
appear at myName that has one color/selection (value 4)
stacked on top of another (value 6). A column should be
at name3 with the same color/selection as item1 (value
8).

Can you please help me with this? Thanks so much in
advance 

ChartItem.as
---

package com.dashboard.teamtrack.util
{
public class ChartItem
{
public var name:String;
public var selection:String;
public var value:int;

public function ChartItem()
{
}
}
}

Main.mxml
---
for each(var currChartItem:ChartItem in
chartIemArrayColl )
{
if(!selectionArr.contains(currChartItem.selection))
{
selectionArr.addItem(currChartItem.selection);
var columnSeries:ColumnSeries = new ColumnSeries();

columnSeries.setStyle(itemRenderer, new
ClassFactory(com.dashboard.itemrenderers.TriDiRenderer));

columnSeries.displayName = currChartItem.selection;
columnSeries.yField = 'value';

Re: [flexcoders] Dynamic Flex Stacked Column Chart

2009-04-23 Thread Richard Rodseth
It looks like a stack of blocks where each one is shifted over a bit from
the one below.

On Thu, Apr 23, 2009 at 1:16 PM, Maciek Sakrejda msakre...@truviso.comwrote:



 What do you mean by aligned with each other?


 -Original Message-
 From: Richard Rodseth rrods...@gmail.com rrodseth%40gmail.com
 Reply-to: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 Subject: Re: [flexcoders] Dynamic Flex Stacked Column Chart
 Date: Thu, 23 Apr 2009 13:13:51 -0700

 Trying one more time. Surely there's a call (validateNow() ?,
 invalidateDisplayList() ? that would force a column chart to display
 properly after its series array has been dynamically constructed?

 I haven't been able to find a JIRA bug though this may be related:

 http://bugs.adobe.com/jira/browse/FLEXDMV-1957

 On Wed, Apr 15, 2009 at 1:23 PM, Richard Rodseth 
 rrods...@gmail.comrrodseth%40gmail.com
 
 wrote:
 Did you have any luck with this?

 I have a binding function as follows

 mx:ColumnChart id=columnChart type=stacked
 height=100%
 width=100%
 dataProvider=model.chartData
 series={this.buildSeriesList(model.seriesSpec)}

 and the stacked columns are displayed, but not aligned with each
 other. Quite amusing, except when you have a deadline.
 This must be the known defect you referred to.
 Anyone know a workaround, or defect number?




 On Mon, Apr 6, 2009 at 9:20 AM, jeffreyr6915
 jrwalk...@gmail.com jrwalker2%40gmail.com wrote:
 I'd like to create a dynamic Flex Stacked Column Chart
 at runtime, based on values out of a database. The
 following are the steps that I currently follow (without
 success):

 1. Query the database and populate chartIemArrayColl
 with ChartItem objects
 2. Iterate through chartIemArrayColl and only create a a
 new columnseries object if there does not already exist
 on for that 'selection'. Add this columnseries to the
 columnset
 3. Apply this to the chart

 Note: I used secondSeries instead of series because of a
 known defect in Flex that makes the charts off center if
 series is used.

 Problems:
 
 1. The chartIemArrayColl contains items that contain the
 same 'name' but different 'value' and different
 'selection'. However, in this case that particular
 'name' is printed on the x-axis multiple times (not
 correct)
 2. The 'selection' should be the legend, but when it is
 graphed it does not seem as though it is connected to
 the items actually charted

 What I'd like to achieve:
 
 1. Column chart with a legend that contains only values
 of the 'selection'
 2. Stacked Column chart that contains values where I can
 chart the following example:

 item1 (name=myName, selection=sel1, value=4)
 item2 (name=myName, selection=sel2, value=6)
 item3 (name=name3, selection=sel1, value=8)

 I expect a chart that has myName and name3 across the
 x-axis (myName should only appear once). A column should
 appear at myName that has one color/selection (value 4)
 stacked on top of another (value 6). A column should be
 at name3 with the same color/selection as item1 (value
 8).

 Can you please help me with this? Thanks so much in
 advance

 ChartItem.as
 ---

 package com.dashboard.teamtrack.util
 {
 public class ChartItem
 {
 public var name:String;
 public var selection:String;
 public var value:int;

 public function ChartItem()
 {
 }
 }
 }

 Main.mxml
 ---
 for each(var currChartItem:ChartItem in
 chartIemArrayColl )
 {
 if(!selectionArr.contains(currChartItem.selection))
 {
 selectionArr.addItem(currChartItem.selection);
 var columnSeries:ColumnSeries = new ColumnSeries();

 columnSeries.setStyle(itemRenderer, new
 ClassFactory(com.dashboard.itemrenderers.TriDiRenderer));

 columnSeries.displayName = currChartItem.selection;
 columnSeries.yField = 'value';
 columnSeries.xField = 'name';
 columnSeries.dataProvider = chartIemArrayColl ;
 columnSet.series.push(columnSeries);

 }
 }

 columnSet.type = stacked;
 chart.secondSeries.push(columnSet);
 chart.invalidateSeriesStyles();
 chart.secondSeries = chart.secondSeries;

 //More code here


 mx:ColumnChart id=chart height=100% width=100%
 fontSize=9 fontWeight=bold color=#01
 showDataTips=true clipContent=false x=0 y=27

 mx:verticalAxis
 mx:LinearAxis title=Open Count Total /
 /mx:verticalAxis

 mx:horizontalAxisRenderers
 itemrenderers:TriDiAxisRenderer
 axis={myHorizontalAxis} placement=bottom/
 /mx:horizontalAxisRenderers
 mx:horizontalAxis
 mx:CategoryAxis id=myHorizontalAxis
 dataProvider={chartIemArrayColl}
 categoryField=name/
 /mx:horizontalAxis
 /mx:ColumnChart
 mx:Legend id=openDefectChartLegend
 dataProvider={chart} fontSize=9 fontWeight=bold
 color=#01 width=100% height=64/








  



[flexcoders] Re: Flash/FLex gravity

2009-04-23 Thread flexaustin
Not sure if the post went through.

I have the book now. I am trying to make it work and I am almost there, but the 
sprite is only glides correctly when thrown if I drag from top right to lower 
left or lower left to top right.

If I throw it directly to the right it moves up and if I throw it to directly 
to the left it goes down. If I throw it up it goes to the right. And if I throw 
it down it moves to the left.

Here is the code (_object is the sprite being throw):

if(_drag == true){

var diffx:Number = initX - mx;
var diffy:Number = initY - my; 

var speed:Number = 12;
var angle:Number = Math.atan2( diffx, diffy );
//var radians:Number = deg2rad(angle);
var xVel:Number = Math.cos(angle) * speed;
var yVel:Number = Math.sin(angle) * speed;

function deg2rad(deg:Number):Number {
return deg * (Math.PI/180);
}

function onLoop(evt:Event):void {
_object.x += xVel;
_object.y += yVel;
 
xVel *= 0.9;
yVel *= 0.9;

if (xVel  0.05  yVel  0.05) {
_drag = false;
 
_stage.removeEventListener(Event.ENTER_FRAME, onLoop, false);
}
 
}


_stage.addEventListener(Event.ENTER_FRAME, onLoop, 
false, 0, true);
//get the velocity and direction and make it go 
another 100 pixels or more
}




RE: [flexcoders] DataGrid combobox erasing items from it's list

2009-04-23 Thread Alex Harui
Tracy, this was posted on the Adobe forums as well with code and is being 
handled over there.

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 Tracy Spratt
Sent: Thursday, April 23, 2009 10:40 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] DataGrid combobox erasing items from it's list




So the scenario is:

 1.  user clicks cell, CB editor appears
 2.  user clicks away somewhere, without selecting anything
 3.  ComboBox closes
 4.  an empty string is stored in the dataProvider

Yes?  Is the change event and handler firing in this case?

If so, then I think you need to make the renderer set the ComboBox's 
selectedIndex to display the current value.  Thus however the change event was 
caused, the correct value would be put back in the property.

I think you would want this behavior anyway.  Note you can't directly set 
selectedItem, but must loop over the dataProvider comparing property values, 
then using the loop index to set the selectedIndex.

Tracy Spratt,
Lariat Services, development services available

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of netdeep
Sent: Thursday, April 23, 2009 9:57 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] DataGrid combobox erasing items from it's list






I have a DataGrid that is linked to an array of custom data objects which I 
call a seriesList. You are supposed to be able to choose the name of each 
series via a combobox in the datagrid. It works fine except when the user 
selects the combobox and then clicks somewhere else in the interface, which 
closes the combobox and erases whichever item is previously selected!

!-- Definition in application --
!-- axis.seriesList is and ArrayCollection of actionscript objects called 
SeriesObjects which have a var name:String variable --
mx:DataGrid id=seriesTable color=black fontSize=9 rowHeight=30 
editable=true resizeEffect=slow rollOverColor=#CC
selectionColor=#99 dataProvider={axis.seriesList} width=100%
rowCount={axis.seriesList.length  2 ? axis.seriesList.length : 2} 
mx:columns
mx:DataGridColumn dataField=name headerText=Name width=280 
headerStyleName=centered id=nameColumn
rendererIsEditor=true editorDataField=result 
itemRenderer=renderer.SeriesBoxRenderer/
/mx:columns
/mx:DataGrid

!-- SeriesBoxRenderer --
mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=init() 
horizontalAlign=center
mx:Script
![CDATA[
import mx.collections.ArrayCollection;
// Define a property for returning the new value to the cell.
public var result:String=;

[Bindable]
private var dpValue:ArrayCollection;

private function init():void {
// list of possible names to choose from for this series
dpValue = mx.core.Application.application.seriesArray;
}

// Override the set method for the data property.
override public function set data(value:Object):void {
if (dpValue == null) init();
super.data = value;
if (value != null) {
var currentValue:String = value.name;
var len:int = dpValue.length;
for (var i:int = 0; i  len; i++) {
if (dpValue[i].name == currentValue) {
editor.selectedIndex = i;
return;
}
}
}
editor.selectedIndex = 0; }

public function onChange():void {
var index:int = editor.selectedIndex;
result = dpValue[index].name;
data.name = dpValue[index].name;
}

]]
/mx:Script
mx:ComboBox id=editor textAlign=left labelField=name 
dataProvider={dpValue} change=onChange()/
/mx:VBox



[flexcoders] How improve performance

2009-04-23 Thread b.kotireddy
Hi,

In My application we are purly following Cairngorm framework. I am not much 
deep into the flex framework and its performance but my application is like the 
longer the application is in use, the slower it runs. 

Is anyone have any suggestions to improve the performance.

I truly appreciate your valuable suggestions. 



[flexcoders] Re: Flash/FLex gravity

2009-04-23 Thread flexaustin
I have the book now. I am trying to make it work and I am almost there, but the 
sprite is only glides correctly when thrown if I drag from top right to lower 
left or lower left to top right.

If I throw it directly to the right it moves up and if I throw it to directly 
to the left it goes down. If I throw it up it goes to the right. And if I throw 
it down it moves to the left.

Here is the code (_object is the sprite being throw):

if(_drag == true){

var diffx:Number = initX - mx;
var diffy:Number = initY - my; 

var speed:Number = 12;
var angle:Number = Math.atan2( diffx, diffy );
//var radians:Number = deg2rad(angle);
var xVel:Number = Math.cos(angle) * speed;
var yVel:Number = Math.sin(angle) * speed;

function deg2rad(deg:Number):Number {
return deg * (Math.PI/180);
}

function onLoop(evt:Event):void {
_object.x += xVel;
_object.y += yVel;
 
xVel *= 0.9;
yVel *= 0.9;

if (xVel  0.05  yVel  0.05) {
_drag = false;
 
_stage.removeEventListener(Event.ENTER_FRAME, onLoop, false);
}
 
}


_stage.addEventListener(Event.ENTER_FRAME, onLoop, 
false, 0, true);
//get the velocity and direction and make it go 
another 100 pixels or more
}


--- In flexcoders@yahoogroups.com, Nate Beck n...@... wrote:

 Yup Josh is correct, creating a vector is the way to go...
 The slowing down force you're talking about is friction (at least in
 physics). If you're interested in this kind of stuff, I highly recommend
 picking up a copy of Keith Peters book:
 
 http://www.amazon.com/Foundation-Actionscript-3-0-Animation-Making/dp/1590597915/ref=sr_1_1?ie=UTF8s=booksqid=1240464956sr=8-1
 
 Cheers,
 
 On Wed, Apr 22, 2009 at 9:19 PM, Josh McDonald j...@...wrote:
 
 
 
  That sort of thing (a vector) is easy, once you've determined the direction
  in radians, and a speed. Let's call it pixels-per-frame, to make things
  simple. Note that this is typed in gmail, and will need tweaks!
 
  accuratePositionX = x;
  accuratePositionY = y;
 
  velocityX = Math.cos(direction) * initialVelocity;
  velocityY = Math.sin(direction) * initialVelocity;
 
  //Do every frame:
  function updatePosition():void
  {
  accuratePositionX += velocityX;
  accuratePositionY += velocityY;
 
  x = Math.round(accuratePositionX);
  y = Math.round(accuratePositionY);
 
  velocityX *= 0.9;
  velocityY *= 0.9;
 
  if (velocityX  0.05  velocityX  0.05)
  stopTheAnimation();
  }
 
  Cheers,
  -Josh
 
  2009/4/23 flexaustin flexaus...@...
 
 
 
  Does anyone know of a tutorial on actionscript and gravity. Not like
  dropping a ball, but like google maps where you drag an item and it keeps
  going in that direction but slowing down. So gravity in all directions
  something like a hockey puck.
 
  TIA
 
 
 
 
  --
  Therefore, send not to know For whom the bell tolls. It tolls for thee.
 
  Josh 'G-Funk' McDonald
-  j...@...
-  http://twitter.com/sophistifunk
-  http://flex.joshmcdonald.info/
 
   
 
 
 
 
 -- 
 
 Cheers,
 Nate
 
 http://blog.natebeck.net






[flexcoders] Re: Flash/FLex gravity

2009-04-23 Thread flexaustin
I have the book now. I am trying to make it work and I am almost there, but the 
sprite is only glides correctly when thrown if I drag from top right to lower 
left or lower left to top right.

If I throw it directly to the right it moves up and if I throw it to directly 
to the left it goes down. If I throw it up it goes to the right. And if I throw 
it down it moves to the left.

Here is the code (_object is the sprite being throw):

if(_drag == true){

var diffx:Number = initX - mx;
var diffy:Number = initY - my; 

var speed:Number = 12;
var angle:Number = Math.atan2( diffx, diffy );
//var radians:Number = deg2rad(angle);
var xVel:Number = Math.cos(angle) * speed;
var yVel:Number = Math.sin(angle) * speed;

function deg2rad(deg:Number):Number {
return deg * (Math.PI/180);
}

function onLoop(evt:Event):void {
_object.x += xVel;
_object.y += yVel;
 
xVel *= 0.9;
yVel *= 0.9;

if (xVel  0.05  yVel  0.05) {
_drag = false;
 
_stage.removeEventListener(Event.ENTER_FRAME, onLoop, false);
}
 
}


_stage.addEventListener(Event.ENTER_FRAME, onLoop, 
false, 0, true);
//get the velocity and direction and make it go 
another 100 pixels or more
}


--- In flexcoders@yahoogroups.com, Nate Beck n...@... wrote:

 Yup Josh is correct, creating a vector is the way to go...
 The slowing down force you're talking about is friction (at least in
 physics). If you're interested in this kind of stuff, I highly recommend
 picking up a copy of Keith Peters book:
 
 http://www.amazon.com/Foundation-Actionscript-3-0-Animation-Making/dp/1590597915/ref=sr_1_1?ie=UTF8s=booksqid=1240464956sr=8-1
 
 Cheers,
 
 On Wed, Apr 22, 2009 at 9:19 PM, Josh McDonald j...@...wrote:
 
 
 
  That sort of thing (a vector) is easy, once you've determined the direction
  in radians, and a speed. Let's call it pixels-per-frame, to make things
  simple. Note that this is typed in gmail, and will need tweaks!
 
  accuratePositionX = x;
  accuratePositionY = y;
 
  velocityX = Math.cos(direction) * initialVelocity;
  velocityY = Math.sin(direction) * initialVelocity;
 
  //Do every frame:
  function updatePosition():void
  {
  accuratePositionX += velocityX;
  accuratePositionY += velocityY;
 
  x = Math.round(accuratePositionX);
  y = Math.round(accuratePositionY);
 
  velocityX *= 0.9;
  velocityY *= 0.9;
 
  if (velocityX  0.05  velocityX  0.05)
  stopTheAnimation();
  }
 
  Cheers,
  -Josh
 
  2009/4/23 flexaustin flexaus...@...
 
 
 
  Does anyone know of a tutorial on actionscript and gravity. Not like
  dropping a ball, but like google maps where you drag an item and it keeps
  going in that direction but slowing down. So gravity in all directions
  something like a hockey puck.
 
  TIA
 
 
 
 
  --
  Therefore, send not to know For whom the bell tolls. It tolls for thee.
 
  Josh 'G-Funk' McDonald
-  j...@...
-  http://twitter.com/sophistifunk
-  http://flex.joshmcdonald.info/
 
   
 
 
 
 
 -- 
 
 Cheers,
 Nate
 
 http://blog.natebeck.net






[flexcoders] Re: DataGrid combobox erasing items from it's list

2009-04-23 Thread Tim Hoff

Hi,

Your code looks fine.  But, I believe that you need to handle the
itemEditEnd event, for the DataGrid:

mx:DataGrid itemEditEnd=onItemEditEnd(event);/

  Something like this:

private function onItemEditEnd(event:DataGridEvent):void
{
  // Check the reason for the event.
  if (event.reason == DataGridEventReason.CANCELLED)
  {
   // Do not update cell.
   return;
  }

  // Get the new data value from the editor.
  var newData:String =
ComboBox(event.currentTarget.itemEditorInstance).selectedLabel;

  // Determine if the new value is an empty String.
  if(newData == )
  {
   // Prevent the user from removing focus,   and leave the cell
editor open.
   event.preventDefault();
   return;
  }
}

-TH

--- In flexcoders@yahoogroups.com, netdeep deep...@... wrote:


 I have a DataGrid that is linked to an array of custom data objects
which I call a seriesList. You are supposed to be able to choose the
name of each series via a combobox in the datagrid. It works fine except
when the user selects the combobox and then clicks somewhere else in the
interface, which closes the combobox and erases whichever item is
previously selected!


 !-- Definition in application --
 !-- axis.seriesList is and ArrayCollection of actionscript objects
called SeriesObjects which have a var name:String variable --
 mx:DataGrid id=seriesTable color=black fontSize=9
rowHeight=30 editable=true resizeEffect=slow
rollOverColor=#CC
 selectionColor=#99 dataProvider={axis.seriesList} width=100%
 rowCount={axis.seriesList.length  2 ? axis.seriesList.length : 2} 
 mx:columns
 mx:DataGridColumn dataField=name headerText=Name width=280
headerStyleName=centered id=nameColumn
 rendererIsEditor=true editorDataField=result
itemRenderer=renderer.SeriesBoxRenderer/
 /mx:columns
 /mx:DataGrid


 !-- SeriesBoxRenderer --
 mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml;
creationComplete=init() horizontalAlign=center
 mx:Script
 ![CDATA[
 import mx.collections.ArrayCollection;
 // Define a property for returning the new value to the cell.
 public var result:String=;

 [Bindable]
 private var dpValue:ArrayCollection;

 private function init():void {
 // list of possible names to choose from for this series
 dpValue = mx.core.Application.application.seriesArray;
 }

 // Override the set method for the data property.
 override public function set data(value:Object):void {
 if (dpValue == null) init();
 super.data = value;
 if (value != null) {
 var currentValue:String = value.name;
 var len:int = dpValue.length;
 for (var i:int = 0; i  len; i++) {
 if (dpValue[i].name == currentValue) {
 editor.selectedIndex = i;
 return;
 }
 }
 }
 editor.selectedIndex = 0; }

 public function onChange():void {
 var index:int = editor.selectedIndex;
 result = dpValue[index].name;
 data.name = dpValue[index].name;
 }

 ]]
 /mx:Script
 mx:ComboBox id=editor textAlign=left labelField=name
dataProvider={dpValue} change=onChange()/
 /mx:VBox





Re: [flexcoders] Dynamic Flex Stacked Column Chart

2009-04-23 Thread Richard Rodseth
Here's some sample code illustrating the problem, though in this version all
columns in a category seem to be off:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical

mx:Script
![CDATA[
private function onTwoSeries(event:Event):void {
columnChart.series = [ a, b ];
}
private function onThreeSeries(event:Event):void {
columnChart.series = [ a, b, c ];
}

[Bindable]
public var chartData:Array = [ { category:cat1, val1:100,
val2:100, val3:100 },
   { category:cat2, val1:100,
val2:100, val3:100 },
   { category:cat3, val1:100,
val2:100, val3:100 }
   ];
]]
/mx:Script

mx:Button label=2 Series click=onTwoSeries(event)/
mx:Button label=3 Series click=onThreeSeries(event)/

mx:ColumnSeries id=a
xField=category
yField=val1
displayName=Series a
/
mx:ColumnSeries id=b
xField=category
yField=val2
displayName=Series b
/
mx:ColumnSeries id=c
xField=category
yField=val3
displayName=Series c
/


mx:ColumnChart id=columnChart type=stacked
dataProvider={this.chartData} width=100% height=100%

mx:horizontalAxis
mx:CategoryAxis categoryField=category
dataProvider={this.chartData}/
/mx:horizontalAxis
mx:series
mx:ColumnSeries
xField=category
yField=val1
displayName=Series a
/

/mx:series

/mx:ColumnChart
/mx:Application



On Thu, Apr 23, 2009 at 1:26 PM, Richard Rodseth rrods...@gmail.com wrote:

 It looks like a stack of blocks where each one is shifted over a bit from
 the one below.


 On Thu, Apr 23, 2009 at 1:16 PM, Maciek Sakrejda msakre...@truviso.comwrote:



 What do you mean by aligned with each other?


 -Original Message-
 From: Richard Rodseth rrods...@gmail.com rrodseth%40gmail.com
 Reply-to: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 Subject: Re: [flexcoders] Dynamic Flex Stacked Column Chart
 Date: Thu, 23 Apr 2009 13:13:51 -0700

 Trying one more time. Surely there's a call (validateNow() ?,
 invalidateDisplayList() ? that would force a column chart to display
 properly after its series array has been dynamically constructed?

 I haven't been able to find a JIRA bug though this may be related:

 http://bugs.adobe.com/jira/browse/FLEXDMV-1957

 On Wed, Apr 15, 2009 at 1:23 PM, Richard Rodseth 
 rrods...@gmail.comrrodseth%40gmail.com
 
 wrote:
 Did you have any luck with this?

 I have a binding function as follows

 mx:ColumnChart id=columnChart type=stacked
 height=100%
 width=100%
 dataProvider=model.chartData
 series={this.buildSeriesList(model.seriesSpec)}

 and the stacked columns are displayed, but not aligned with each
 other. Quite amusing, except when you have a deadline.
 This must be the known defect you referred to.
 Anyone know a workaround, or defect number?




 On Mon, Apr 6, 2009 at 9:20 AM, jeffreyr6915
 jrwalk...@gmail.com jrwalker2%40gmail.com wrote:
 I'd like to create a dynamic Flex Stacked Column Chart
 at runtime, based on values out of a database. The
 following are the steps that I currently follow (without
 success):

 1. Query the database and populate chartIemArrayColl
 with ChartItem objects
 2. Iterate through chartIemArrayColl and only create a a
 new columnseries object if there does not already exist
 on for that 'selection'. Add this columnseries to the
 columnset
 3. Apply this to the chart

 Note: I used secondSeries instead of series because of a
 known defect in Flex that makes the charts off center if
 series is used.

 Problems:
 
 1. The chartIemArrayColl contains items that contain the
 same 'name' but different 'value' and different
 'selection'. However, in this case that particular
 'name' is printed on the x-axis multiple times (not
 correct)
 2. The 'selection' should be the legend, but when it is
 graphed it does not seem as though it is connected to
 the items actually charted

 What I'd like to achieve:
 
 1. Column chart with a legend that contains only values
 of the 'selection'
 2. Stacked Column chart that contains values where I can
 chart the following example:

 item1 (name=myName, selection=sel1, value=4)
 item2 (name=myName, selection=sel2, value=6)
 item3 (name=name3, selection=sel1, value=8)

 I expect a chart that has myName and name3 across the
 x-axis (myName should only appear once). A column should
 appear at myName that has one color/selection (value 4)
 stacked on top of another (value 6). A column should be
 at name3 with the same color/selection as item1 (value
 8).

 Can you please help me with this? Thanks so much in
 advance

 ChartItem.as
 

[flexcoders] How improve performance

2009-04-23 Thread b.kotireddy
Hi,

In My application we are purly following Cairngorm framework. I am not much 
deep into the flex framework and its performance but my application is like the 
longer the application is in use, the slower it runs. 

Is anyone have any suggestions to improve the performance.

I truly appreciate your valuable suggestions. 



Re: [flexcoders] How improve performance

2009-04-23 Thread Guy Morton
Use the profiler to see if you have a memory leak somewhere. Sounds  
like perhaps you are creating objects but not destroying them once  
you're done with them.


Guy

On 24/04/2009, at 6:03 AM, b.kotireddy wrote:




Hi,

In My application we are purly following Cairngorm framework. I am  
not much deep into the flex framework and its performance but my  
application is like the longer the application is in use, the slower  
it runs.


Is anyone have any suggestions to improve the performance.

I truly appreciate your valuable suggestions.







[flexcoders] module loading and progress load slow?

2009-04-23 Thread Jason B
loading modules 

I've been rearranging my application to use modules to reduce load time and 
prepare it to handle later larger development etc...
All is well I've got it loading modules and such and learned a lot over the 
past few days. 

I have several modules that have large images it uses with source= and some 
other swf's it loadsI prefer not to allow caching since these items change 
a lot.

On a localhost connection (dev) It can take 10 seconds to load the module etc.
At first I thought it was needing a preloading technique that adobe offers so i 
tried that to load while the app loaded etc.. no go

then i tried to see if i could add a progress bar on top of the module loading 
so the user is at least informed but to my dismay it loads too fast for the 
progress bar to show up

heres the size of the swif being loaded
364K 2009-04-23 13:54 nutrition.swf

the images and other swfs that load into this module are about 1-2 megs total. 

If i avoid using modules it loads on localhost almost instantly :(

I have a feeling the source = for images and swf loading is whats dragging it 
to load fast.


What options do i have for either preloading quicker for this module?
Is it possible that my custom component is causing this performance issue?
http://dougmccune.com/blog/2007/11/19/flex-coverflow-performance-improvement-flex-carousel-component-and-vertical-coverflow/


anyone had this kind of issue with rendering slow?

sources used already are:
http://livedocs.adobe.com/flex/3/html/help.html?content=modular_5.html

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



RE: [flexcoders] How improve performance

2009-04-23 Thread Tracy Spratt
I trust you are not using creationPolicy='all anywhere?

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of b.kotireddy
Sent: Thursday, April 23, 2009 4:04 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How improve performance

 






Hi,

In My application we are purly following Cairngorm framework. I am not much
deep into the flex framework and its performance but my application is like
the longer the application is in use, the slower it runs. 

Is anyone have any suggestions to improve the performance.

I truly appreciate your valuable suggestions. 





[flexcoders] module loading and progress load slow?

2009-04-23 Thread Jason B
loading modules 

I've been rearranging my application to use modules to reduce load time and 
prepare it to handle later larger development etc...
All is well I've got it loading modules and such and learned a lot over the 
past few days. 

I have several modules that have large images it uses with source= and some 
other swf's it loadsI prefer not to allow caching since these items change 
a lot.

On a localhost connection (dev) It can take 10 seconds to load the module etc.
At first I thought it was needing a preloading technique that adobe offers so i 
tried that to load while the app loaded etc.. no go

then i tried to see if i could add a progress bar on top of the module loading 
so the user is at least informed but to my dismay it loads too fast for the 
progress bar to show up

heres the size of the swif being loaded
364K 2009-04-23 13:54 nutrition.swf

the images and other swfs that load into this module are about 1-2 megs total. 

If i avoid using modules it loads on localhost almost instantly :(

I have a feeling the source = for images and swf loading is whats dragging it 
to load fast.


What options do i have for either preloading quicker for this module?
Is it possible that my custom component is causing this performance issue?
http://dougmccune.com/blog/2007/11/19/flex-coverflow-performance-improvement-flex-carousel-component-and-vertical-coverflow/


anyone had this kind of issue with rendering slow?

sources used already are:
http://livedocs.adobe.com/flex/3/html/help.html?content=modular_5.html

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



[flexcoders] Re: HTTPService mistery

2009-04-23 Thread markgoldin_2000
It is e4x.
What have been identified, is that it runs fine for users who are local admin 
on the Web box ??

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

 What is the result format of the HTTPService call?  The default object
 causes the flex client to process the incoming data into a tree of dynamic
 objects.  The speed of this process would be subject to the local cpu.  You
 could set resultFormat to e4x, and re-run the benchmarks.
 
  
 
 Tracy Spratt,
 
 Lariat Services, development services available
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of markgoldin_2000
 Sent: Wednesday, April 22, 2009 11:15 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: HTTPService mistery
 
  
 
 
 
 
 
 
 While it seems to me I am missing something obvious I am pretty sertant it
 is somewhere in the send command. I have traced an execution to the point
 that for a low end box it takes about 5 sec. between a send command and an
 HTTPService callback function call. I have timed my server and it does not
 take time at all. I timed the server for both my development computer and a
 low level box. Server time is exactly the same. (what else whould one
 expect?) But time it tales for an execution to get into a callback function
 is very different. So, I am assuming that it takes some time for a low end
 box to send a data request to the server.
 
 --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com,
 Tracy Spratt tracy@ wrote:
 
  I would not expect the quality of the client to significantly affect the
  speed of the data service call.
  
  
  
  However, a slow computer *will* have issues with rendering the content.
  Have you determined definitively that the speed issue is with the data
  service call and not the rendering?
  
  
  
  Tracy Spratt,
  
  Lariat Services, development services available
  
  _ 
  
  From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
 [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com]
 On
  Behalf Of markgoldin_2000
  Sent: Wednesday, April 22, 2009 7:06 PM
  To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
  Subject: [flexcoders] HTTPService mistery
  
  
  
  
  
  
  
  
  Is it possible that on low end computers HTTPService.send command would
 take
  up to 10 or more times longer than on a more or less decent computer? Is
  there a way of tracking HTTPService.send command?
  
  Thanks
 





[flexcoders] Download Flash Player

2009-04-23 Thread christophe_jacquelin
Hello, 

I have a problem when my Flex application is running on a computer without 
Flash Player.

How to propose to the user the downloading of Flash Player ? Do you have any 
examples ? 

Thank you,
Christophe, 




[flexcoders] Gumbo: Styling Panels or Titlewindows when used as a popup not being styled.

2009-04-23 Thread flexaustin
Does anyone know why styling a popup in css has not bearing on the style that 
is shown when the popup is created? No matter what I set nothing shows up.





[flexcoders] Re: HTTPService mistery

2009-04-23 Thread markgoldin_2000
Posting again...
It is e4x.
It has been identified, that it works fine for users who are local admins on 
the Web box. How that can be???


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

 What is the result format of the HTTPService call?  The default object
 causes the flex client to process the incoming data into a tree of dynamic
 objects.  The speed of this process would be subject to the local cpu.  You
 could set resultFormat to e4x, and re-run the benchmarks.
 
  
 
 Tracy Spratt,
 
 Lariat Services, development services available
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of markgoldin_2000
 Sent: Wednesday, April 22, 2009 11:15 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: HTTPService mistery
 
  
 
 
 
 
 
 
 While it seems to me I am missing something obvious I am pretty sertant it
 is somewhere in the send command. I have traced an execution to the point
 that for a low end box it takes about 5 sec. between a send command and an
 HTTPService callback function call. I have timed my server and it does not
 take time at all. I timed the server for both my development computer and a
 low level box. Server time is exactly the same. (what else whould one
 expect?) But time it tales for an execution to get into a callback function
 is very different. So, I am assuming that it takes some time for a low end
 box to send a data request to the server.
 
 --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com,
 Tracy Spratt tracy@ wrote:
 
  I would not expect the quality of the client to significantly affect the
  speed of the data service call.
  
  
  
  However, a slow computer *will* have issues with rendering the content.
  Have you determined definitively that the speed issue is with the data
  service call and not the rendering?
  
  
  
  Tracy Spratt,
  
  Lariat Services, development services available
  
  _ 
  
  From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
 [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com]
 On
  Behalf Of markgoldin_2000
  Sent: Wednesday, April 22, 2009 7:06 PM
  To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
  Subject: [flexcoders] HTTPService mistery
  
  
  
  
  
  
  
  
  Is it possible that on low end computers HTTPService.send command would
 take
  up to 10 or more times longer than on a more or less decent computer? Is
  there a way of tracking HTTPService.send command?
  
  Thanks
 





[flexcoders] Popups and accessibility (JAWS)

2009-04-23 Thread KOVÁCS István
Dear All,

I've been assigned the task of testing and fixing accessibility tasks in a Flex 
3 application. One of the problems we're having is JAWS not reading popup 
windows. The Alert control works (when the alert pops up, title, message are 
read, focus is on the default button, and the default button's label is also 
read, all without any user intervention, e.g. moving focus with TAB). However, 
popup windows created in other ways (e.g. the sample at 
http://livedocs.adobe.com/flex/3/langref/mx/containers/TitleWindow.html) do 
not: the popup is shown, but JAWS does not read anything.

Are we doing something wrong, is there some special setting that we need (or 
perhaps JAWS treats Alert in a special way)? We have a popup window component 
that handles user confirmations, having a configurable number of buttons, a 
title and a text message. I've tried setting focus (setFocus() and 
drawFocus(true)) on the window or the Label component used to display the 
message, and it's OK on the screen but JAWS does not read anything.

Thanks in advance,
István



[flexcoders] Re: difference between stage and application?

2009-04-23 Thread michaeljonknight
With the Flash/Flex Component Kit work for cs4?  We are making a Flash 10 
compliant swf...


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

 You should use the Flash/Flex Component Kit to wrap your Flash content.  
 Flash content won't work well in Flex without being wrapped in some fashion.  
 The minimum thing you could do is stick in an mx:UIComponent of the 
 appropriate size in the application and addChild the sprite to it.
 
 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of michaeljonknight
 Sent: Wednesday, April 22, 2009 2:33 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] difference between stage and application?
 
 
 
 
 
 Hello,
 
 I am somewhat new to flex. We are working on a project that uses an exported 
 swc from Flash and running into some problems getting everything we want to 
 show up layered correctly.
 
 I want to add a menu bar (mx.controls.MenuBar) on top of some content from 
 the flash swc (flash.display.Sprite). I can only get the menu bar to show up 
 if I call application.addChild and the sprite to show up if I call 
 application.stage.addChild. But the menu bar popups are behind the sprite.
 
 I don't really understand the difference between the application and the 
 stage either. Can anyone help? And is there an established way to work with 
 mx.controls and flash.display.sprite data?
 
 thanks in advance,
 madmik3





[flexcoders] (unknown)

2009-04-23 Thread Eric Maslowski
Thanks for the response. That's exactly what I needed to hear and it sent me on 
the right path to get something working. Basically, I created a couple events 
for the various stages of the initialization and fired off the appropriate 
events once a particular operation completed. Thanks again.


  

Re: [flexcoders] Re: Flash/FLex gravity

2009-04-23 Thread Josh McDonald
Here's a working example I whipped up in 15 minutes:

http://pastie.textmate.org/private/mmmbwwnwl0ly2ciurwvda

-Josh

2009/4/24 flexaustin flexaus...@yahoo.com



 I have the book now. I am trying to make it work and I am almost there, but
 the sprite is only glides correctly when thrown if I drag from top right to
 lower left or lower left to top right.

 If I throw it directly to the right it moves up and if I throw it to
 directly to the left it goes down. If I throw it up it goes to the right.
 And if I throw it down it moves to the left.

 Here is the code (_object is the sprite being throw):

 if(_drag == true){

 var diffx:Number = initX - mx;
 var diffy:Number = initY - my;

 var speed:Number = 12;
 var angle:Number = Math.atan2( diffx, diffy );
 //var radians:Number = deg2rad(angle);
 var xVel:Number = Math.cos(angle) * speed;
 var yVel:Number = Math.sin(angle) * speed;

 function deg2rad(deg:Number):Number {
 return deg * (Math.PI/180);
 }

 function onLoop(evt:Event):void {
 _object.x += xVel;
 _object.y += yVel;

 xVel *= 0.9;
 yVel *= 0.9;

 if (xVel  0.05  yVel  0.05) {
 _drag = false;
 _stage.removeEventListener(Event.ENTER_FRAME, onLoop, false);
 }

 }


 _stage.addEventListener(Event.ENTER_FRAME, onLoop, false, 0, true);
 //get the velocity and direction and make it go another 100 pixels or more
 }

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Nate
 Beck n...@... wrote:
 
  Yup Josh is correct, creating a vector is the way to go...
  The slowing down force you're talking about is friction (at least in
  physics). If you're interested in this kind of stuff, I highly recommend
  picking up a copy of Keith Peters book:
 
 
 http://www.amazon.com/Foundation-Actionscript-3-0-Animation-Making/dp/1590597915/ref=sr_1_1?ie=UTF8s=booksqid=1240464956sr=8-1
 
  Cheers,
 
  On Wed, Apr 22, 2009 at 9:19 PM, Josh McDonald j...@...wrote:
 
  
  
   That sort of thing (a vector) is easy, once you've determined the
 direction
   in radians, and a speed. Let's call it pixels-per-frame, to make things
   simple. Note that this is typed in gmail, and will need tweaks!
  
   accuratePositionX = x;
   accuratePositionY = y;
  
   velocityX = Math.cos(direction) * initialVelocity;
   velocityY = Math.sin(direction) * initialVelocity;
  
   //Do every frame:
   function updatePosition():void
   {
   accuratePositionX += velocityX;
   accuratePositionY += velocityY;
  
   x = Math.round(accuratePositionX);
   y = Math.round(accuratePositionY);
  
   velocityX *= 0.9;
   velocityY *= 0.9;
  
   if (velocityX  0.05  velocityX  0.05)
   stopTheAnimation();
   }
  
   Cheers,
   -Josh
  
   2009/4/23 flexaustin flexaus...@...
  
  
  
   Does anyone know of a tutorial on actionscript and gravity. Not like
   dropping a ball, but like google maps where you drag an item and it
 keeps
   going in that direction but slowing down. So gravity in all directions
   something like a hockey puck.
  
   TIA
  
  
  
  
   --
   Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
  
   Josh 'G-Funk' McDonald
   - j...@...
   - http://twitter.com/sophistifunk
   - http://flex.joshmcdonald.info/
  
  
  
 
 
 
  --
 
  Cheers,
  Nate
  
  http://blog.natebeck.net
 

  




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

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


RE: [flexcoders] Download Flash Player

2009-04-23 Thread Tracy Spratt
The html wrapper generated by flex Builder has both the Flash Player version
detection and express install functionality included.  Generate or get a
copy of that and copy the code into your own wrapper.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of christophe_jacquelin
Sent: Thursday, April 23, 2009 4:29 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Download Flash Player

 






Hello, 

I have a problem when my Flex application is running on a computer without
Flash Player.

How to propose to the user the downloading of Flash Player ? Do you have any
examples ? 

Thank you,
Christophe, 





RE: [flexcoders] Working With Dynamic Datagrid

2009-04-23 Thread Tracy Spratt
Generate your columns as you are, you said that was working.  But you still
have to give the datagrid the data.  How/are you doing that?  Note, do not
use XMLList if you are binding. 

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Jonathan Ackerman
Sent: Thursday, April 23, 2009 1:19 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Working With Dynamic Datagrid

 






Hi Tracy, 

Thanks for writing back. I did assign the XMLList to a variable and I could
assign that variable to the datagrid. 

However, since I have to create datadrigcolumns dynamically, wouldn't that
not work right? In assigning the variable to the datagrid without any other
work I would have to specify the number of columns that it fills no?







[flexcoders] Re: Dynamic Flex Stacked Column Chart

2009-04-23 Thread Tim Hoff

Hey Richard,

I've found that charts don't like mxml as well as AS, when trying to
update them dynmically.  This works in AS:

private function onTwoSeries(event:Event):void
{
  var seriesA:ColumnSeries = new ColumnSeries();
  var seriesB:ColumnSeries = new ColumnSeries();
  seriesA.xField = category;
  seriesA.yField = val1;
  seriesA.displayName = Series a;
  seriesB.xField = category;
  seriesB.yField = val2;
  seriesB.displayName = Series b;
  columnChart.series = [seriesA,seriesB];
}

-TH

--- In flexcoders@yahoogroups.com, Richard Rodseth rrods...@... wrote:

 Here's some sample code illustrating the problem, though in this
version all
 columns in a category seem to be off:

 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical

 mx:Script
 ![CDATA[
 private function onTwoSeries(event:Event):void {
 columnChart.series = [ a, b ];
 }
 private function onThreeSeries(event:Event):void {
 columnChart.series = [ a, b, c ];
 }

 [Bindable]
 public var chartData:Array = [ { category:cat1, val1:100,
 val2:100, val3:100 },
 { category:cat2, val1:100,
 val2:100, val3:100 },
 { category:cat3, val1:100,
 val2:100, val3:100 }
 ];
 ]]
 /mx:Script

 mx:Button label=2 Series click=onTwoSeries(event)/
 mx:Button label=3 Series click=onThreeSeries(event)/

 mx:ColumnSeries id=a
 xField=category
 yField=val1
 displayName=Series a
 /
 mx:ColumnSeries id=b
 xField=category
 yField=val2
 displayName=Series b
 /
 mx:ColumnSeries id=c
 xField=category
 yField=val3
 displayName=Series c
 /


 mx:ColumnChart id=columnChart type=stacked
 dataProvider={this.chartData} width=100% height=100%

 mx:horizontalAxis
 mx:CategoryAxis categoryField=category
 dataProvider={this.chartData}/
 /mx:horizontalAxis
 mx:series
 mx:ColumnSeries
 xField=category
 yField=val1
 displayName=Series a
 /

 /mx:series

 /mx:ColumnChart
 /mx:Application



 On Thu, Apr 23, 2009 at 1:26 PM, Richard Rodseth rrods...@... wrote:

  It looks like a stack of blocks where each one is shifted over a bit
from
  the one below.
 
 
  On Thu, Apr 23, 2009 at 1:16 PM, Maciek Sakrejda msakre...@...wrote:
 
 
 
  What do you mean by aligned with each other?
 
 
  -Original Message-
  From: Richard Rodseth rrods...@... rrodseth%40gmail.com
  Reply-to: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
  To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
  Subject: Re: [flexcoders] Dynamic Flex Stacked Column Chart
  Date: Thu, 23 Apr 2009 13:13:51 -0700
 
  Trying one more time. Surely there's a call (validateNow() ?,
  invalidateDisplayList() ? that would force a column chart to
display
  properly after its series array has been dynamically constructed?
 
  I haven't been able to find a JIRA bug though this may be related:
 
  http://bugs.adobe.com/jira/browse/FLEXDMV-1957
 
  On Wed, Apr 15, 2009 at 1:23 PM, Richard Rodseth
rrods...@...rrodseth%40gmail.com
  
  wrote:
  Did you have any luck with this?
 
  I have a binding function as follows
 
  mx:ColumnChart id=columnChart type=stacked
  height=100%
  width=100%
  dataProvider=model.chartData
  series={this.buildSeriesList(model.seriesSpec)}
 
  and the stacked columns are displayed, but not aligned with each
  other. Quite amusing, except when you have a deadline.
  This must be the known defect you referred to.
  Anyone know a workaround, or defect number?
 
 
 
 
  On Mon, Apr 6, 2009 at 9:20 AM, jeffreyr6915
  jrwalk...@... jrwalker2%40gmail.com wrote:
  I'd like to create a dynamic Flex Stacked Column Chart
  at runtime, based on values out of a database. The
  following are the steps that I currently follow (without
  success):
 
  1. Query the database and populate chartIemArrayColl
  with ChartItem objects
  2. Iterate through chartIemArrayColl and only create a a
  new columnseries object if there does not already exist
  on for that 'selection'. Add this columnseries to the
  columnset
  3. Apply this to the chart
 
  Note: I used secondSeries instead of series because of a
  known defect in Flex that makes the charts off center if
  series is used.
 
  Problems:
  
  1. The chartIemArrayColl contains items that contain the
  same 'name' but different 'value' and different
  'selection'. However, in this case that particular
  'name' is printed on the x-axis multiple times (not
  correct)
  2. The 'selection' should be the legend, but when it is
  graphed it does not seem as though it is connected to
  the items actually charted
 
  What I'd like to achieve:
  
  1. Column chart with a legend that contains only values
  of the 'selection'
  2. Stacked Column chart that contains values where I can
  chart the following example:
 
  item1 (name=myName, selection=sel1, value=4)
  item2 (name=myName, selection=sel2, value=6)
  item3 (name=name3, selection=sel1, value=8)
 
  I expect a chart that has myName and name3 across the
  x-axis (myName should only 

Re: [flexcoders] Working With Dynamic Datagrid

2009-04-23 Thread Josh McDonald
Also change this:

col.dataField=gradebookBySection[i].children()@grade.toxmlstring();

to this:

col.dataField = @grade;

-Josh

2009/4/24 Tracy Spratt tr...@nts3rd.com



  Generate your columns as you are, you said that was working.  But you
 still have to give the datagrid the data.  How/are you doing that?  Note, do
 not use XMLList if you are binding.



 Tracy Spratt,

 Lariat Services, development services available
   --

 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Jonathan Ackerman
 *Sent:* Thursday, April 23, 2009 1:19 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Working With Dynamic Datagrid






  Hi Tracy,

 Thanks for writing back. I did assign the XMLList to a variable and I could
 assign that variable to the datagrid.

 However, since I have to create datadrigcolumns dynamically, wouldn't that
 not work right? In assigning the variable to the datagrid without any other
 work I would have to specify the number of columns that it fills no?

   




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

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


[flexcoders] testing posting

2009-04-23 Thread markgoldin_2000
I can't post anymore



[flexcoders] testing posting

2009-04-23 Thread markgoldin_2000
Is it working??



[flexcoders] VIEWSTACK question.

2009-04-23 Thread sailorsea21
Hi everyone, I have a question on viewstacks.

I have my viewstack created on MXML with the main canvas also created in MXML.

something like:
mx:Viewstack id='myViewstack' creationPolicy='all' 
initialize='getOtherCanvases()'
mx:Canvas id='mainCanvas'/
/mx:Viewstack

At initialize I call 'getOtherCanvases' function, which adds additional 
canvases to 'myViewstack' depending on the result I receive from my DB.

My question: When I switch viewstack Index, the content of the canvas wasn't 
previously created and all the children jitter in place the first time I load 
each index. Shouldn't the creationPolicy='all' create all the children of the 
viewstack? 

How can I achieve this?

If I create the viewstack and main canvas in actionscript, will it solve my 
problem?

Thanks everyone. :)

-David




[flexcoders] Setting dateField.SelectedDate when component is disabled?

2009-04-23 Thread Mic
In a modal View state the dateFields are disabled but I need to populate them 
for the current record. I can stick my proc values in when they are enabled, 
but not when disabled. I tried

dtCmplxStartDate.enabled = true;
dtCmplxStartDate.selectedDate = tempStrtDt; 
dtCmplxStartDate.enabled = false;
dtCmplxEndDate.enabled = true;
dtCmplxEndDate.selectedDate = tempEndDt;
dtCmplxEndDate.enabled = false;

but no go. TIA,

Mic.





[flexcoders] Re: List sizing - height=100%

2009-04-23 Thread greg_lafrance
Maybe its your itemRenderer. This code works:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
  mx:Script
![CDATA[
  import mx.collections.ArrayCollection;
  [Bindable] private var ac:ArrayCollection = new ArrayCollection([
one, two, three
  ]);
]]
  /mx:Script
  mx:List height=100% width=100% dataProvider={ac}
mx:itemRenderer
  mx:Component
mx:Text/
  /mx:Component
/mx:itemRenderer
  /mx:List
/mx:Application

--- In flexcoders@yahoogroups.com, arieljake arielj...@... wrote:

 I am trying, in MXML, to size a list to 100% of its container, but when I do, 
 it only shows 2 rows. It is using a custom item renderer. I tried setting a 
 rowHeight as well but still doesn't size right. I also set an explicitHeight 
 in the item renderer itself. Nothing.
 
 In a fixed size layout, i can set the rowcount but I want it to be fluid in 
 case the user resizes the window.
 
 Anyone know why a list wouldn't size by percent to fill a parent container?





[flexcoders] Re: Dynamic Flex Stacked Column Chart

2009-04-23 Thread Tim Hoff

And if you wanted to make it truly dynamic:

private function createChartSeries(event:Event):void
{
   var chartSeries:Array = new Array();
   var i:int;

   for (i = 0; i  chartData.length; i++)
   {
 var series:ColumnSeries = new ColumnSeries();
 series.xField = category;
 series.yField = val + (i+1).toString();
 series.displayName = Series + (i+1).toString();

 chartSeries.push( series );
   }

columnChart.series = chartSeries;
}

-TH

--- In flexcoders@yahoogroups.com, Richard Rodseth rrods...@... wrote:

 Here's some sample code illustrating the problem, though in this
version all
 columns in a category seem to be off:

 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical

 mx:Script
 ![CDATA[
 private function onTwoSeries(event:Event):void {
 columnChart.series = [ a, b ];
 }
 private function onThreeSeries(event:Event):void {
 columnChart.series = [ a, b, c ];
 }

 [Bindable]
 public var chartData:Array = [ { category:cat1, val1:100,
 val2:100, val3:100 },
 { category:cat2, val1:100,
 val2:100, val3:100 },
 { category:cat3, val1:100,
 val2:100, val3:100 }
 ];
 ]]
 /mx:Script

 mx:Button label=2 Series click=onTwoSeries(event)/
 mx:Button label=3 Series click=onThreeSeries(event)/

 mx:ColumnSeries id=a
 xField=category
 yField=val1
 displayName=Series a
 /
 mx:ColumnSeries id=b
 xField=category
 yField=val2
 displayName=Series b
 /
 mx:ColumnSeries id=c
 xField=category
 yField=val3
 displayName=Series c
 /


 mx:ColumnChart id=columnChart type=stacked
 dataProvider={this.chartData} width=100% height=100%

 mx:horizontalAxis
 mx:CategoryAxis categoryField=category
 dataProvider={this.chartData}/
 /mx:horizontalAxis
 mx:series
 mx:ColumnSeries
 xField=category
 yField=val1
 displayName=Series a
 /

 /mx:series

 /mx:ColumnChart
 /mx:Application



 On Thu, Apr 23, 2009 at 1:26 PM, Richard Rodseth rrods...@... wrote:

  It looks like a stack of blocks where each one is shifted over a bit
from
  the one below.
 
 
  On Thu, Apr 23, 2009 at 1:16 PM, Maciek Sakrejda msakre...@...wrote:
 
 
 
  What do you mean by aligned with each other?
 
 
  -Original Message-
  From: Richard Rodseth rrods...@... rrodseth%40gmail.com
  Reply-to: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
  To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
  Subject: Re: [flexcoders] Dynamic Flex Stacked Column Chart
  Date: Thu, 23 Apr 2009 13:13:51 -0700
 
  Trying one more time. Surely there's a call (validateNow() ?,
  invalidateDisplayList() ? that would force a column chart to
display
  properly after its series array has been dynamically constructed?
 
  I haven't been able to find a JIRA bug though this may be related:
 
  http://bugs.adobe.com/jira/browse/FLEXDMV-1957
 
  On Wed, Apr 15, 2009 at 1:23 PM, Richard Rodseth
rrods...@...rrodseth%40gmail.com
  
  wrote:
  Did you have any luck with this?
 
  I have a binding function as follows
 
  mx:ColumnChart id=columnChart type=stacked
  height=100%
  width=100%
  dataProvider=model.chartData
  series={this.buildSeriesList(model.seriesSpec)}
 
  and the stacked columns are displayed, but not aligned with each
  other. Quite amusing, except when you have a deadline.
  This must be the known defect you referred to.
  Anyone know a workaround, or defect number?
 
 
 
 
  On Mon, Apr 6, 2009 at 9:20 AM, jeffreyr6915
  jrwalk...@... jrwalker2%40gmail.com wrote:
  I'd like to create a dynamic Flex Stacked Column Chart
  at runtime, based on values out of a database. The
  following are the steps that I currently follow (without
  success):
 
  1. Query the database and populate chartIemArrayColl
  with ChartItem objects
  2. Iterate through chartIemArrayColl and only create a a
  new columnseries object if there does not already exist
  on for that 'selection'. Add this columnseries to the
  columnset
  3. Apply this to the chart
 
  Note: I used secondSeries instead of series because of a
  known defect in Flex that makes the charts off center if
  series is used.
 
  Problems:
  
  1. The chartIemArrayColl contains items that contain the
  same 'name' but different 'value' and different
  'selection'. However, in this case that particular
  'name' is printed on the x-axis multiple times (not
  correct)
  2. The 'selection' should be the legend, but when it is
  graphed it does not seem as though it is connected to
  the items actually charted
 
  What I'd like to achieve:
  
  1. Column chart with a legend that contains only values
  of the 'selection'
  2. Stacked Column chart that contains values where I can
  chart the following example:
 
  item1 (name=myName, selection=sel1, value=4)
  item2 (name=myName, selection=sel2, value=6)
  item3 (name=name3, selection=sel1, value=8)
 
  I expect a chart that has myName and name3 across the
  x-axis (myName should only appear once). 

Re: [flexcoders] Re: Dynamic Flex Stacked Column Chart

2009-04-23 Thread Richard Rodseth
Tim,

You're right! It does seem to make a difference how the series object is
instantiated. Odd.

I was headed down the path of creating the whole chart chart in AS. Thanks
for saving me from that/

On Thu, Apr 23, 2009 at 3:50 PM, Tim Hoff timh...@aol.com wrote:



 And if you wanted to make it truly dynamic:

 *private* *function* createChartSeries(event:Event):*void*
 {
 *  var* chartSeries:Array = *new* Array();
 *  var* i:int;

 *  for* (i = 0; i  chartData.length; i++)
   {
 *var* series:ColumnSeries = *new* ColumnSeries();
 series.xField = *category*;
 series.yField = *val* + (i+1).toString();
 series.displayName = *Series *+ (i+1).toString();

 chartSeries.push( series );
   }

 columnChart.series = chartSeries;
 }

 -TH

 --- In flexcoders@yahoogroups.com, Richard Rodseth rrods...@... wrote:
 
  Here's some sample code illustrating the problem, though in this version
 all
  columns in a category seem to be off:
 
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=vertical
 
  mx:Script
  ![CDATA[
  private function onTwoSeries(event:Event):void {
  columnChart.series = [ a, b ];
  }
  private function onThreeSeries(event:Event):void {
  columnChart.series = [ a, b, c ];
  }
 
  [Bindable]
  public var chartData:Array = [ { category:cat1, val1:100,
  val2:100, val3:100 },
  { category:cat2, val1:100,
  val2:100, val3:100 },
  { category:cat3, val1:100,
  val2:100, val3:100 }
  ];
  ]]
  /mx:Script
 
  mx:Button label=2 Series click=onTwoSeries(event)/
  mx:Button label=3 Series click=onThreeSeries(event)/
 
  mx:ColumnSeries id=a
  xField=category
  yField=val1
  displayName=Series a
  /
  mx:ColumnSeries id=b
  xField=category
  yField=val2
  displayName=Series b
  /
  mx:ColumnSeries id=c
  xField=category
  yField=val3
  displayName=Series c
  /
 
 
  mx:ColumnChart id=columnChart type=stacked
  dataProvider={this.chartData} width=100% height=100%
 
  mx:horizontalAxis
  mx:CategoryAxis categoryField=category
  dataProvider={this.chartData}/
  /mx:horizontalAxis
  mx:series
  mx:ColumnSeries
  xField=category
  yField=val1
  displayName=Series a
  /
 
  /mx:series
 
  /mx:ColumnChart
  /mx:Application
 
 
 
  On Thu, Apr 23, 2009 at 1:26 PM, Richard Rodseth rrods...@... wrote:
 
   It looks like a stack of blocks where each one is shifted over a bit
 from
   the one below.
  
  
   On Thu, Apr 23, 2009 at 1:16 PM, Maciek Sakrejda msakre...@...wrote:
  
  
  
   What do you mean by aligned with each other?
  
  
   -Original Message-
   From: Richard Rodseth rrods...@... rrodseth%40gmail.com
   Reply-to: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
   To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
   Subject: Re: [flexcoders] Dynamic Flex Stacked Column Chart
   Date: Thu, 23 Apr 2009 13:13:51 -0700
  
   Trying one more time. Surely there's a call (validateNow() ?,
   invalidateDisplayList() ? that would force a column chart to display
   properly after its series array has been dynamically constructed?
  
   I haven't been able to find a JIRA bug though this may be related:
  
   http://bugs.adobe.com/jira/browse/FLEXDMV-1957
  
   On Wed, Apr 15, 2009 at 1:23 PM, Richard Rodseth rrodseth@
 ...rrodseth%40gmail.com
   
   wrote:
   Did you have any luck with this?
  
   I have a binding function as follows
  
   mx:ColumnChart id=columnChart type=stacked
   height=100%
   width=100%
   dataProvider=model.chartData
   series={this.buildSeriesList(model.seriesSpec)}
  
   and the stacked columns are displayed, but not aligned with each
   other. Quite amusing, except when you have a deadline.
   This must be the known defect you referred to.
   Anyone know a workaround, or defect number?
  
  
  
  
   On Mon, Apr 6, 2009 at 9:20 AM, jeffreyr6915
   jrwalk...@... jrwalker2%40gmail.com wrote:
   I'd like to create a dynamic Flex Stacked Column Chart
   at runtime, based on values out of a database. The
   following are the steps that I currently follow (without
   success):
  
   1. Query the database and populate chartIemArrayColl
   with ChartItem objects
   2. Iterate through chartIemArrayColl and only create a a
   new columnseries object if there does not already exist
   on for that 'selection'. Add this columnseries to the
   columnset
   3. Apply this to the chart
  
   Note: I used secondSeries instead of series because of a
   known defect in Flex that makes the charts off center if
   series is used.
  
   Problems:
   
   1. The chartIemArrayColl contains items that contain the
   same 'name' but different 'value' and different
   'selection'. However, in this case that particular
   'name' is printed on the x-axis multiple times (not
   correct)
   2. The 'selection' should be the legend, but when it is
   graphed it does not seem as though it is connected to
   the items actually charted
  
   What I'd like to 

[flexcoders] Synchronize time

2009-04-23 Thread lehaianh1986
Hi all, can AIR have ability to check date-time from internet? Depend on my 
knowledge, I think I need to send request to some websites, then receive the 
response is the date. Any one know about it can help me? I search but don't see 
anything guide me to do that.



RE: [flexcoders] Setting dateField.SelectedDate when component is disabled?

2009-04-23 Thread Tracy Spratt
What happens?  How are you sure the dates are not being set?  What happens
if you do this after setting a date:

Trace(dtCmplxStartDate.toDateString(0);

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Mic
Sent: Thursday, April 23, 2009 10:47 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Setting dateField.SelectedDate when component is
disabled?

 






In a modal View state the dateFields are disabled but I need to populate
them for the current record. I can stick my proc values in when they are
enabled, but not when disabled. I tried

dtCmplxStartDate.enabled = true;
dtCmplxStartDate.selectedDate = tempStrtDt; 
dtCmplxStartDate.enabled = false;
dtCmplxEndDate.enabled = true;
dtCmplxEndDate.selectedDate = tempEndDt; 
dtCmplxEndDate.enabled = false;

but no go. TIA,

Mic.





RE: [flexcoders] Re: difference between stage and application?

2009-04-23 Thread Alex Harui
I haven't heard that it doesn't, but I don't keep tabs on it either.

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 michaeljonknight
Sent: Thursday, April 23, 2009 1:48 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: difference between stage and application?





With the Flash/Flex Component Kit work for cs4? We are making a Flash 10 
compliant swf...

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

 You should use the Flash/Flex Component Kit to wrap your Flash content. Flash 
 content won't work well in Flex without being wrapped in some fashion. The 
 minimum thing you could do is stick in an mx:UIComponent of the appropriate 
 size in the application and addChild the sprite to it.

 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui

 From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On 
 Behalf Of michaeljonknight
 Sent: Wednesday, April 22, 2009 2:33 PM
 To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
 Subject: [flexcoders] difference between stage and application?





 Hello,

 I am somewhat new to flex. We are working on a project that uses an exported 
 swc from Flash and running into some problems getting everything we want to 
 show up layered correctly.

 I want to add a menu bar (mx.controls.MenuBar) on top of some content from 
 the flash swc (flash.display.Sprite). I can only get the menu bar to show up 
 if I call application.addChild and the sprite to show up if I call 
 application.stage.addChild. But the menu bar popups are behind the sprite.

 I don't really understand the difference between the application and the 
 stage either. Can anyone help? And is there an established way to work with 
 mx.controls and flash.display.sprite data?

 thanks in advance,
 madmik3




[flexcoders] Re: Drive Letters and Ant

2009-04-23 Thread cuttenv
The one that came with 3.2.0

--- In flexcoders@yahoogroups.com, Gregor Kiddie gkid...@... wrote:

 Which version of flexTasks.jar are you using?
 
  
 
 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...@...
 
 
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of cuttenv
 Sent: 22 April 2009 21:16
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Drive Letters and Ant
 
  
 
 
 
 
 
 
 So I have my Eclipse and Flex builder installed on my C: drive but all
 of my projects in my workspace on D: 
 
 Everything works fine but when I set the fork=true in my mxmlc to
 increase the memory my Ant build fails with: 
 [mxmlc] java.lang.NoClassDefFoundError: flex2/tools/Compiler 
 [mxmlc] Exception in thread main 
 
 Anyone have any thoughts??
 
 http://bugs.adobe.com/jira/browse/SDK-20666
 http://bugs.adobe.com/jira/browse/SDK-20666