RE: [flexcoders] Re: Flex woes, wo-iz-o, i hate it (sometimes)

2008-07-31 Thread Alex Harui
You can tell the compiler to include classes that follow the [Mixin]
pattern, but that's too much overhead for a general class loader thing.

 

The pattern is very simple.  It is:

 

import mx.containers.VBox; VBox;

import mx.controls.TextArea; TextArea;

etc.

 

You could probably write a script that generates it, but really that
just bloats your SWF.  The framework RSL is 600K, charts and ADG are a
whole bunch more, RPC is more and LCDS is even more.  Using the shared
RSL will cause more classes to be around just-in-case, but if you need
your custom classes loaded on-demand, you'll just have to build out that
modules-as-class-loader idea

 

Start with what you need and get everything else later when you need it,

-Alex

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh McDonald
Sent: Wednesday, July 30, 2008 4:45 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Flex woes, wo-iz-o, i hate it (sometimes)

 

You can tell the compiler to include any class you want, as well as
whatever it thinks you want, right? Or is that only valid for SWCs?

-Josh

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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 

 



RE: [flexcoders] Can we subclass Application yet?

2008-07-31 Thread Alex Harui
There is one pattern where you declare a new default property for the
MXMLComponent, new children get stuffed in there, and when you get
instantiated you add those children.  It works, but feels rough around
the edges.

 

Changing the compiler to add any children won't really work if you are
trying to insert the children between a menubar and status bar.

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh McDonald
Sent: Wednesday, July 30, 2008 4:36 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Can we subclass Application yet?

 

Alex,

I definitely understand the need for this, but I'd use components is
all. I can see how it'd be useful though. I'd have to poke around inside
the generated actionscript, but I'm sure this could be hacked up without
*too* much shenanigans to work with the current compiler. I might take a
look at that over the weekend along with some component lifecycle stuff
I want to put together to blog about.

-Josh

On Thu, Jul 31, 2008 at 9:25 AM, Alex Harui [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

Template apps, just like html templates.  I want every app to have a
control bar and a accordion, etc.  Sounds like Tracy has a way, so maybe
that'll work for this customer.

 

 




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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 

 



[flexcoders] Flex printing form problem : formItem label is trim and become ...

2008-07-31 Thread sinacapho
Dear hi,
   
I am facing the problem about the printing problem . i have
now printing a form in A4 format. I know that the page have enough
space but i the printing output always filled with '...' for example ,
i find the formitem label always truncate even i have set it to false.
There is a article talk about that
http://www.nabble.com/Can-Flex-really-handle-complex-printing--td15744019.html.

maybe it is related to the scale problem , it that any other
ways i can solve it without using the FlexReporting module?


 thx
capho 



[flexcoders] Any future plans to support ODBC Connections for AIR applications?

2008-07-31 Thread pbrendanc
I know this has come up before but there is a significant need to
access data in desktop  databases (Read Only would be OK). (e.g. I am
working with the Google App Engine and there is no easy way to
populate their datastore). 

A GUI upload app written in AIR could be great for this. I've thought
about doing a small GUI in Python since the libraries are available -
however I'd prefer to use AIR for GUI development.

While support for this may not be available out of the box I wondered
if some 3rd party libraries might be available for this - e.g. Python
has extensive libraries than can be used to access Excel, Access etc.

Any chance that similar Flex/AIR/Actionscript libs might be developed?
Anyone else out there thought about doing this?

TIA,
Patrick



RE: [flexcoders] AS3 or Flex MXML to UML, OO architecture, use cases, object classes, sequence diagrams, and state diagrams

2008-07-31 Thread Gregor Kiddie
Hi Pascal,

 

Try not to use another thread as the basis of a new one, it confuses
yahoo!

 

But to try answer your question, take a look at Enterprise Architect at
least for the class diagrams part. Drag a folder in, and it creates the
class diagram for the code in it. Works for actionscript too!

 

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 [EMAIL PROTECTED]



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Pascal Schrafl
Sent: 30 July 2008 13:12
To: flexcoders@yahoogroups.com
Subject: [flexcoders] AS3 or Flex MXML to UML, OO architecture, use
cases, object classes, sequence diagrams, and state diagrams

 

Hi all,

Does anyone of you know a tool, to reverse engineer a already existing 
Flex 3 application in order to create the OO architecture, use cases, 
object classes, sequence diagrams and state diagrams in UML?

Thanks a lot for your answers and best regards,

Pascal

 



RE: [flexcoders] Re: Best event to listen for when ViewStack child becomes active?

2008-07-31 Thread Gregor Kiddie
If my memory serves me correctly, you have to be careful when using
those events with the ViewStack. It's something like they get fired when
the app is minimised / maximised, or when the user switches.

 

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 [EMAIL PROTECTED]



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Cameron Childress
Sent: 30 July 2008 16:08
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Best event to listen for when ViewStack child
becomes active?

 

On Wed, Jul 30, 2008 at 7:56 AM, Cameron Childress [EMAIL PROTECTED]
mailto:cameronc%40gmail.com  wrote:
 What's the best event to listen for when a *specific* child of a
 ViewStack becomes active?

Apparently my question was too easy or (too common) for FlexCoders to
answer, but I got it:

show() and hide() were what I was looking for

-Cameron

-- 
Cameron Childress
Sumo Consulting Inc
http://www.sumoc.com http://www.sumoc.com 
---
cell: 678.637.5072
aim: cameroncf
email: [EMAIL PROTECTED] mailto:cameronc%40gmail.com 

 



Re: [flexcoders] Can we subclass Application yet?

2008-07-31 Thread Josh McDonald
This is just a quick and rough example, and it's for instances rather than
subclasses (which may have a compile-time check, I'll have to experiment on
the weekend when I've more time). Also, please note that I think this is
probably a bad-thing (TM) but it's always fun to poke around where Adobe
don't want us :)

http://www.gfunk007.com/flex/evil/

There are probably nicer ways to do this, but we very quickly run into
overriding things that upset the byte code verifier :'(

-Josh

On Thu, Jul 31, 2008 at 4:07 PM, Alex Harui [EMAIL PROTECTED] wrote:

  There is one pattern where you declare a new default property for the
 MXMLComponent, new children get stuffed in there, and when you get
 instantiated you add those children.  It works, but feels rough around the
 edges.



 Changing the compiler to add any children won't really work if you are
 trying to insert the children between a menubar and status bar.




  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Josh McDonald
 *Sent:* Wednesday, July 30, 2008 4:36 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Can we subclass Application yet?



 Alex,


 I definitely understand the need for this, but I'd use components is all. I
 can see how it'd be useful though. I'd have to poke around inside the
 generated actionscript, but I'm sure this could be hacked up without *too*
 much shenanigans to work with the current compiler. I might take a look at
 that over the weekend along with some component lifecycle stuff I want to
 put together to blog about.

 -Josh

 On Thu, Jul 31, 2008 at 9:25 AM, Alex Harui [EMAIL PROTECTED] wrote:

 Template apps, just like html templates.  I want every app to have a
 control bar and a accordion, etc.  Sounds like Tracy has a way, so maybe
 that'll work for this customer.








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

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]

 




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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


Re: [flexcoders] Any future plans to support ODBC Connections for AIR applications?

2008-07-31 Thread Josh McDonald
It's pretty evil. I'd just ship a 30-lines-of-c# utility to pull the data
out and put it in something standard that your air app can understand.

-Josh

On Thu, Jul 31, 2008 at 5:19 PM, pbrendanc [EMAIL PROTECTED] wrote:

 I know this has come up before but there is a significant need to
 access data in desktop  databases (Read Only would be OK). (e.g. I am
 working with the Google App Engine and there is no easy way to
 populate their datastore).

 A GUI upload app written in AIR could be great for this. I've thought
 about doing a small GUI in Python since the libraries are available -
 however I'd prefer to use AIR for GUI development.

 While support for this may not be available out of the box I wondered
 if some 3rd party libraries might be available for this - e.g. Python
 has extensive libraries than can be used to access Excel, Access etc.

 Any chance that similar Flex/AIR/Actionscript libs might be developed?
 Anyone else out there thought about doing this?

 TIA,
 Patrick


 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
 Links






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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


Re: [flexcoders] Any future plans to support ODBC Connections for AIR applications?

2008-07-31 Thread Josh McDonald
That being said, I know you can do ODBC over tcp, so if you've got some sort
of server available that can route from odbc over tcp to a local file DSN,
you could probably write a socket ODBC client for AIR, and then charge
people in your position a fortune to use it. People stuck in Windows-world
seem to be used to that sort of thing. Sounds like pain though :D

-Josh

On Thu, Jul 31, 2008 at 5:45 PM, Josh McDonald [EMAIL PROTECTED] wrote:

 It's pretty evil. I'd just ship a 30-lines-of-c# utility to pull the data
 out and put it in something standard that your air app can understand.

 -Josh





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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


[flexcoders] Integrate flex and Java

2008-07-31 Thread venkat eswar
how to integrate flex and java. when i click a button in flex the whole java 
application is to be loaded.
please help me



  

Re: [flexcoders] Refreshing data in dataGrid

2008-07-31 Thread Tom Chiverton
On Wednesday 30 Jul 2008, Joshua Jackson wrote:
 How do we do this with BlazeDS? I'm currently using BlazeDS. Is there
 any configuration for notifying the apps that something has changed on
 the database?

Server-side, you need to nudge BlazeDS that the table has changed, and it will 
notify all the subscribed clients.
What's you server language ?

-- 
Tom Chiverton



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. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

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

* Your email settings:
Individual Email | Traditional

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

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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



Re: [flexcoders] Integrate flex and Java

2008-07-31 Thread Tom Chiverton
On Thursday 31 Jul 2008, venkat eswar wrote:
 how to integrate flex and java. when i click a button in flex the whole
 java application is to be loaded. 

You can't invoke other executables or shared libraries from plain Flex 
applications.
There are frameworks that work as launchers or wrappers around a Flex 
application to allow this though, if that would work.

-- 
Tom Chiverton



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. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

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

* Your email settings:
Individual Email | Traditional

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

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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



[flexcoders] Remote Desktop feature

2008-07-31 Thread venkat eswar
have any one tried remote desktop feature using flex
.please help me.




  

[flexcoders] dataTipRenderer and showAllDataTips=true

2008-07-31 Thread linko27
Hi!

I'm using a bubble chart with showAllDataTips=true and the
dataTipRenderer below. The datatip shows up correctly for a single
bubble, but if showAllDataTips is set to true, nothing is showing.
Here ist the code for the dataTipRenderer. Maybe someone can help on this.

Thanks in advance!

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

mx:Label text={_name} width=100% textAlign=center
fontWeight=bold fontSize=11 /

mx:Script
![CDATA[
import mx.charts.HitData;

[Bindable] private var _name:String;

override public function set data(value:Object):void{
var hitData:HitData = value as HitData;
   
_name = hitData.item.name;
}//end set data
]]
/mx:Script
/mx:VBox 



[flexcoders] My Music / Registry

2008-07-31 Thread itdanny2002
I know that Windows keep the default 
path of My Music in Registry Key.
How can I get it in FLEX or AIR ?




Re: [flexcoders] Re: Migrating Flex 2 to 3 Issues

2008-07-31 Thread Tom Chiverton
On Thursday 31 Jul 2008, Indra Prastha wrote:
 Yes i checked the file permission and everything, Windows just didn't
 allow editing a file without a name ( it was .actionscriptproperties)

Even if you load notepad, and type the filename by hand into it's File, Open 
dialogue ?!?

-- 
Tom Chiverton



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. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

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

* Your email settings:
Individual Email | Traditional

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

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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



Re: [flexcoders] AdvancedDataGrid: Disable Dragging Columns

2008-07-31 Thread Tom Chiverton
On Wednesday 30 Jul 2008, Paul Whitelock wrote:
 However, I don't seem to see any trace of the dragEnabled property
 for AdvancedDataGridColumn. I'm probably just missing something
 obvious, so can someone point me in the right direction? Thanks!

Please comment the documentation, and this will be flagged up and fixed.

-- 
Tom Chiverton



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. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

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

* Your email settings:
Individual Email | Traditional

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

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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



[flexcoders] Re: Parsing MultiLevel Array

2008-07-31 Thread sudha_bsb
Hi,
Thanks for the help..I cannot convert it into any other format, 
not even ArrayCollection.

I had to parse it manually as
 for each( var childObj:Object in obj.children) 
for each of the individual object and then create the buttons 
accordingly.

Thanks  Regards,
Sudha. 
--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 Use a setter function to pass the data into the component, and in 
tht
 function, perform whatever logic you need.
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of sudha_bsb
 Sent: Wednesday, July 30, 2008 2:51 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Parsing MultiLevel Array
 
  
 
 Hi,
 
 I have a requirement wherin I have to parse a multilevel array. 
 Suppose we have an array like
 mx:Array
 mx:Object label=Control Panel
 mx:children
 mx:Array
 mx:Object label=Five /
 mx:Object label=Six /
 /mx:Array
 /mx:children
 /mx:Object 
 mx:Object label=Selling/
 mx:Object label=Service/
 mx:Object label=Billing/ 
 /mx:Array
 
 Now, this array is a dataprovider for a component that basically 
 creates a list of buttons. When an array object has children the 
 component creates the children as well. 
 My question is how do I let the component know that a particular 
 object of its dataprovider has children? And how do I let it know 
 what those children are? 
 
 I do not have the option to convert the array into XML or XMLList 
and 
 then parse it..I have to let the array remain as it is
 
 Thanks  Regards,
 Sudha.





Re: [flexcoders] popup window

2008-07-31 Thread Dan Vega
Perfect! Thank you so much...

Thank You
Dan Vega


On Thu, Jul 31, 2008 at 1:50 AM, Alex Harui [EMAIL PROTECTED] wrote:

text.percentWidth=100


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Dan Vega
 *Sent:* Wednesday, July 30, 2008 9:04 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] popup window



 I understand the width as a percentage but in as3 you can't do that because
 its looking for a number.


 If i do

 var text:Text = new Text();
 text.width = 100%;

 I get an error.

 Is there a way to figure out available space?

  On Wed, Jul 30, 2008 at 11:55 PM, Sid Maskit [EMAIL PROTECTED] wrote:

 Two things. First, a label can only display a single line. If you want
 multiline text, you should use a Text component. Second, Text components
 automatically wrap if, and only if, they have their width set. I believe you
 can set it to a percentage, and it will still wrap, but you have to set it
 to something.

 On a side note, this may seem like a hack, but how else can the system know
 what it should do?



 - Original Message 
 From: Dan Vega [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Wednesday, July 30, 2008 8:24:50 PM
 Subject: [flexcoders] popup window

 I have a popup window (a quick about win) and I am having an issue. How can
 I add a bunch of text to the title windows content area. If I just add the
 text it runs off the screen. I can set the width but that seems like a bit
 of a hack to me. I know im probably just missing something dumb here.

 private function showAbout(event: MouseEvent) :void {
 // the popup window
 _popup = new TitleWindow( );
 _popup.title = About this component;
 _popup.width = 400;
 _popup.height = 200;
 _popup.showCloseBut ton = true;
 _popup.addEventList ener(CloseEvent. CLOSE,closeAbout
 Window);

 var label:Label= new Label();
 label.text =  * * *
 * *  +
  * * * * *  +
  * * * * *  +
  * * * * *  +


 _popup.addChild( label);
 _popup.autoLayout = true;

 PopUpManager. addPopUp( _popup,container );
 PopUpManager. centerPopUp( _popup);
 }


 Thank You
 Dan Vega

 [EMAIL PROTECTED] com [EMAIL PROTECTED]
 http://www.danvega. org http://www.danvega.org





  



RE: [flexcoders] permission based ui

2008-07-31 Thread Randy Martin
Actually, I do this all the time with a viewstack. The way I do it is I have
the main application check the security and setup a security level
parameter. Then, I pass this secLevel to the component that contains the
viewstack. In the viewstack component, each view in the viewstack is its own
component, so you can use the includeInLayout and visible properties of the
component to show it or not show it based on the value of secLevel. Works
like a charm.
 
Main.mxml
 
mx:states
  mx:State name=checkSecurity
mx:AddChild
  ...show only a progress bar to the user while checking the security in
ActionScript
  ...you setup the secLevel
/mx:AddChild
  /mx:State
  mx:State name=mainApplication
mx:AddChild
  comps:MainApp id=mainApp secLevel={this.secLevel}/
/mx:AddChild
  /mx:State
/mx:states
 
MainApp.mxml
 
mx:ToggleButtonBar id=mainButtonBar dataProvider={vs}/
 
mx:ViewStack id=vs
  comps:FirstButton id=first/
  comps:SecondButton id=second/
  comps:ThirdButton id=third/
  comps:Setup id=setup includeInLayout={(secLevel == 0)?true:false}
visible={(secLevel == 0)?true:false}/
/mx:ViewStack
 
And, voila, you only see the Setup button if you're secLevel is 0.
 
HTH,
~randy


   _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Wednesday, July 30, 2008 11:18 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] permission based ui






Do not use the ViewStack as the dataProvider.  Build the navigation system’s
dataProvider as needed for the curent user, include the view index in each
item. On click, assign the item.viewIndex property value to the
viewStack.selectedI-tem.



Tracy




   _  


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Derrick Anderson
Sent: Wednesday, July 30, 2008 11:55 AM
To: [EMAIL PROTECTED]
Subject: [flexcoders] permission based ui



hi, i have my main UI setup with a ToggleButtonBar whos dataprovider is a
viewstack.  I need to incorporate permissions into my application, some
users won't have access to the 'Setup' section for example- is there an easy
way to do this or do i need to subclass ToggleButtonBar?  how do you all
handle permissions in mxml layout?  i have many examples of this, form
sections that are permission based and such, I don't know the best way to
handle it.

thanks,
derrick anderson





 


No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.523 / Virus Database: 270.5.8/1582 - Release Date: 7/30/2008
6:37 PM
 


[flexcoders] Cairngorm, LC DS 2.6, web tier compiler

2008-07-31 Thread r.woess
Hi,

I tried to create a small testproject with cairngorm, livecycle data
services 2.6 beta including flex web tier compiler. When I compile
this project in the browser, I don't get any compilier warnings, but I
get the following runtime exception and an empty application without
any content.

Runtime exception:
VerifyError: Error #1014: Klasse ModelLocator wurde nicht gefunden.

at flash.display::MovieClip/nextFrame()
at
mx.managers::SystemManager/deferredNextFrame()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\SystemManager.as:299]
at
mx.managers::SystemManager/preloader_initProgressHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\SystemManager.as:2211]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.preloaders::Preloader/timerHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\preloaders\Preloader.as:398]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
 
Does anybody know, what could be wrong? (I copied cairgorm.swc to
WEB-INF/flex/user_classes)


regards
Reini



[flexcoders] Re: Passing flash variables to an embedded SWF

2008-07-31 Thread Laurent
Yes it has to be embedded. Well, I ended up embedding 5 different swf
files with the FlashVars hardcoded into the swf.

Good enough for what I needed, but that would be nice to have some
proper way to pass variable to an embedded swf.

Laurent


--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 Yeah, are you committed to embedding the swf?  This is easy with
 SWFLoader and run-time loading.
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Alex Harui
 Sent: Wednesday, July 30, 2008 4:18 PM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Passing flash variables to an embedded SWF
 
  
 
 Not sure you can do that.  You'll have to implement some communication
 between the two swfs.
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Laurent
 Sent: Wednesday, July 30, 2008 6:10 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Passing flash variables to an embedded SWF
 
  
 
 I'm embedding a swf file in an AS class and I would need to pass to
 this file some FlashVars, however I'm not sure how to do it or if it's
 possible at all. So far I tried this approach, but I get a compiler
 error:
 
 [Embed(source=MyFile.swf?myFlashVar=abcd)]
 protected var MyClass:Class; 
 
 This gives me this error:
 
 MyFile.swf?myFlashVar=abcd does not have a recognized extension
 
 Is there any way to do what I'm trying to do?
 
 Thanks,
 
 Laurent





Re: [flexcoders] Refreshing data in dataGrid

2008-07-31 Thread Joshua Jackson
Hi tom, thanks for the fast response. I'm using Java on the server
side. I use spring hibernate for the backend

On 7/31/08, Tom Chiverton [EMAIL PROTECTED] wrote:
 On Wednesday 30 Jul 2008, Joshua Jackson wrote:
 How do we do this with BlazeDS? I'm currently using BlazeDS. Is there
 any configuration for notifying the apps that something has changed on
 the database?

 Server-side, you need to nudge BlazeDS that the table has changed, and it
 will
 notify all the subscribed clients.
 What's you server language ?

 --
 Tom Chiverton

 

 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. Any
 reference to a partner in relation to Halliwells LLP means a member of
 Halliwells LLP.  Regulated by The Solicitors Regulation Authority.

 CONFIDENTIALITY

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

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

 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links






-- 
Setting a  new landmark.

Blog: http://joshuajava.wordpress.com/


[flexcoders] assign image path stored in sql server 2005 to mx:Image source property

2008-07-31 Thread siyaram_5

Hi all .

I m .NET developer and doing R  D in Flex 3 .

I m using SQL SERVER and in one of its column i have given Image Path.

In Flex i have retrieved the dataset but dont know how to assign that
Image Path  stored in Sql server to Flex Image control.



[flexcoders] Re: My Music / Registry

2008-07-31 Thread Laurent
I don't think there's a way to directly get a reference to the My
Music path in AIR. You can get it using documentsDirectory though,
but the code will be different on XP and Vista:


var directory:File = File.documentsDirectory;

if (Capabilities.os == Windows XP) {
   directory = directory.resolvePath(My Music); // On XP
} else {
   directory = directory.resolvePath(Music); // On Vista (and Mac?)
}

Laurent



--- In flexcoders@yahoogroups.com, itdanny2002 [EMAIL PROTECTED] wrote:

 I know that Windows keep the default 
 path of My Music in Registry Key.
 How can I get it in FLEX or AIR ?





[flexcoders] Re: Integrate flex and Java

2008-07-31 Thread kalsi374
Venkat,
You need to be looking at the middleware which sits between backend 
like Java and Flex Front End.
Here are the few popular ones:
http://opensource.adobe.com/wiki/display/blazeds/BlazeDS
http://www.themidnightcoders.com/weborb/java/

Once you get an understanding of these, you will know better.
Java understands Java Objects, and Flex understand ActionScript 
Objects (and other things). This middleware does the magic of 
converting Java POJOs - AS Objects and vice versa.

You can integrate these middleware solutions with an existing Java 
webapplication. I wrote this small how-to some time back, 
http://meriyatra-blog.blogspot.com/2008/07/flex-how-do-i-integrate-
blazeflash-with.html
but you will also find loads of material on the web, if you look.

Hope this helps.

Good luck  have fun.
-ramnish

--- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED] 
wrote:

 On Thursday 31 Jul 2008, venkat eswar wrote:
  how to integrate flex and java. when i click a button in flex the 
whole
  java application is to be loaded. 
 
 You can't invoke other executables or shared libraries from plain 
Flex 
 applications.
 There are frameworks that work as launchers or wrappers around a 
Flex 
 application to allow this though, if that would work.
 
 -- 
 Tom Chiverton
 
 
 
 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. Any reference to a partner 
in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.
 
 CONFIDENTIALITY
 
 This email is intended only for the use of the addressee named 
above and may be confidential or legally privileged.  If you are not 
the addressee you must not read it and must not use any information 
contained in nor copy it nor inform any person other than Halliwells 
LLP or the addressee of its existence or contents.  If you have 
received this email in error please delete it and notify Halliwells 
LLP IT Department on 0870 365 2500.
 
 For more information about Halliwells LLP visit www.halliwells.com.





[flexcoders] Load Complete on tilelist

2008-07-31 Thread David Gironella
I have a tilelist with a dataprovider from an httpservice. I each item
render I load an image.

 

Exists some method to know when all images are complete loaded? I can use
some events on tilelist to know this.

 

Thanks.

 

Giro.



Re: [flexcoders] Refreshing data in dataGrid

2008-07-31 Thread Tom Chiverton
On Thursday 31 Jul 2008, Joshua Jackson wrote:
 Hi tom, thanks for the fast response. I'm using Java on the server

Oh, I was hoping you'd say ColdFusion :-)
Sorry, can't be any help.

-- 
Tom Chiverton



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. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

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

* Your email settings:
Individual Email | Traditional

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

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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



[flexcoders] Re: assign image path stored in sql server 2005 to mx:Image source property

2008-07-31 Thread guillaumeracine
--- In flexcoders@yahoogroups.com, siyaram_5 [EMAIL PROTECTED] wrote:

 
 Hi all .
 
 I m .NET developer and doing R  D in Flex 3 .
 
 I m using SQL SERVER and in one of its column i have given Image Path.
 
 In Flex i have retrieved the dataset but dont know how to assign that
 Image Path  stored in Sql server to Flex Image control.

Supposing that you got an handle on you data object from the sql 
server, eg : myData

mx:Image source={myData.imagePath} /

I hope this help



[flexcoders] Re: Detecting a click on an empty part of AdvancedDataGrid

2008-07-31 Thread actionscript_czar

Try using the mouseFocusChange event.  I've used it a few times for
deselecting items in a list when anywhere else is clicked.  For your
needs, you may have to adapt it but give it a try.

I have a blog post about it at:

http://my.opera.com/darylducharme/blog/2007/12/14/hidden-gems-mousefocus\
change

--- In flexcoders@yahoogroups.com, whatabrain [EMAIL PROTECTED] wrote:

 I have an AdvancedDataGrid which has a few rows, and lots of empty
 space. When I click on the empty space, I want all the rows to be
 deselected. How do I detect that I've clicked in an empty space?

 I tried using grid.getObjectsUnderPoint() in the click event, but
the
 results aren't very useful. I guess I could depend on the fact that
 there are always more than three objects when I click on a real row,
 and exactly three when I click on empty space, but that seems like a
 bad thing to depend on. Who knows what future versions of Flex will
add
 to the list?

 There must be a better way!

 Thanks.





[flexcoders] Re: popup window

2008-07-31 Thread actionscript_czar
In actionscript use the percentWidth variable.  The MXML compiler is 
just smart enough to know that a width with a percent sign should 
actually be percentWidth.

So try this:
 var text:Text = new Text();
 text.percentWidth = 100;

--- In flexcoders@yahoogroups.com, Dan Vega [EMAIL PROTECTED] wrote:

 I understand the width as a percentage but in as3 you can't do that 
because
 its looking for a number.
 
 
 If i do
 
 var text:Text = new Text();
 text.width = 100%;
 



[flexcoders] Creating advanced components

2008-07-31 Thread flexawesome

Hey there,

I was reading the articles regarding the components

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

I knew that by extending the UIComponent, I need to overriding the 
protected UIComponent methods ( createChildren(), commitProperties(), 
etc. )

My question was if I extend the Panel class, shall I still need to 
override these mehods? Personally, I think I need to overide them, 
but I wanna conform this first @v@

public class AlertBox extends Panel
{
.
}

thank you



[flexcoders] Re: Datagrid filterfunction results

2008-07-31 Thread Don Kerr
Thanks! Glad it is that simple! I'll give it a try.

--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 dataProvider.filterFunction = someFilteringFunction
 
 dataProvider.refresh()
 
 var filteredResults:Array =dataProvider.toArray()
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Don Kerr
 Sent: Wednesday, July 30, 2008 6:20 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Datagrid filterfunction results
 
  
 
 convert what toArray()?
 
 I don't know where the filterFunction results live in order to
 reference the object/arraycollection that stores the results.
 
 Don
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  toArray()
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of Don Kerr
  Sent: Wednesday, July 30, 2008 11:57 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Datagrid filterfunction results
  
  
  
  I have a dataProvider feeding a dataGrid. I have a filterFunction that
  filters the DP down to a subset of the dataProvider. I reference the
  dataProvider , myDG.dataProvider. But, how do I reference just the
  filtered down data? myDG.dataProvider gives me all data, not filtered
  data.
  
  Having trouble finding the property where the filterFunction result
  set is stored. I'm hoping it lives in an ArrayCollection somewhere
  already. If not, how would I build an ArrayCollection of the results
  as it filter all items?
  
  I want to pass just the filtered down data to another component.
  
  Thanks,
  Don
  
  Below is an example of one of my filters:
  
  public function processFilter(item:Object):Boolean
  {
  var result:Boolean=false;
  
  //make sure there is a search term
  if(term.text != null  term.text.length  0)
  { 
  //get the search term as upper case
  var searchTerm:String = term.text.toUpperCase();
  //check against the title
  if(item.crNumber != null  item.title.length  0)
  {
  result = (item.crNumber.toUpperCase().indexOf(searchTerm) != -1);
  }
  //no need to check doc number if title already matched or if there is
  no docNumber
  if(result == false  item.docNumber != null  item.docNumber.length
 
  0)
  {
  result = (item.docNumber.toUpperCase().indexOf(searchTerm) != -1);
  }
  if(result == false  item.title != null  item.title.length  0)
  {
  result = (item.title.toUpperCase().indexOf(searchTerm) != -1);
  }
  }
  return result;
  }
 





[flexcoders] Re: Creating advanced components

2008-07-31 Thread Laurent
Well you don't *have* to override these methods as Panel already
implement them (and so does UIComponent).  

It depends on what you are trying to do. If you need to create new
objects within the extended panel, then you'll want to override
createChildren(), if you want to update these children, then override
updateDisplayList(), etc. 

In all cases, always make sure you call the method of the parent class
using super.methodName() in order not to break the default behavior of
the component.

Laurent



--- In flexcoders@yahoogroups.com, flexawesome [EMAIL PROTECTED] wrote:

 
 Hey there,
 
 I was reading the articles regarding the components
 
 http://livedocs.adobe.com/flex/3/html/help.html?
 content=ascomponents_advanced_2.html
 
 I knew that by extending the UIComponent, I need to overriding the 
 protected UIComponent methods ( createChildren(), commitProperties(), 
 etc. )
 
 My question was if I extend the Panel class, shall I still need to 
 override these mehods? Personally, I think I need to overide them, 
 but I wanna conform this first @v@
 
 public class AlertBox extends Panel
 {
 .
 }
 
 thank you





[flexcoders] CFMultiUploader

2008-07-31 Thread Dan Vega
Anyone on here who uses ColdFusion  I could really use your help. I built a
multi file uploader using Flex that you can configure via xml. I need a
couple people to test a very early alpha version before I relase it. You
should be able to just unzip it to root and follow easy installation
instructions.


Thank You
Dan Vega
[EMAIL PROTECTED]
http://www.danvega.org


[flexcoders] NaN and Infinity showing in output - How to modify?

2008-07-31 Thread cox.blair
I seem to have trouble explaining myself here, hard when you are just
learning. Perhaps this will be better.

Is it possible to remove, change or hide any label or text output that
displays NaN or Infinity?

I'm performing a very simply calculation where the user enters a
number in a form and it is calculated and displayed. Simple and does
what I need. In some instances, there are more variables required and
until they are provided, the output display NaN or Infinity. 

How could I easily adjust these? It could be a default display of
zero, it could be to display nothing, whatever is the easiest and most
straight forward method.

Below is only an example of how I'm taking the user input from the
form and passing the variable on to the Label text output.

mx:Number id=myNumber{Number(userInput.text) * (1 +
Number(otherUserInput.text)) * 1 /
Number(otherOtherUserInput.text)}/mx:Number

The answer is output to:

mx:Label text={PrepForDisplay.format(myNumber)}/

Thank you, any assistance you can provide would be welcomed.



[flexcoders] Re: Type Cast Error

2008-07-31 Thread donald_d_hook
Alex - 

So I should define the class in one spot - i.e. the shared code mxml,
then use some getters defined in the main app to use that instance or
definition in the module.

Thanks again for your assistance!!

--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 Essentially, the actuall classname isn't StockVO, it is
 [EMAIL PROTECTED]  If the portion
 after the @ matches it is effectively stripped off so you can just see
 and use StockVO in most places
 
  
 
 So it doesn't really match.  This will be extremely useful in Flex 3.2
 when you can mix sub-application built with different versions of Flex,
 but is a pain for module users like yourself.
 
  
 
 Of course, the easiest way to use StockVO in both modules is to get it
 linked into the main app.  Most VOs are small so it won't matter.  The
 SharedCode Module pattern is for heavy things.
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of donald_d_hook
 Sent: Wednesday, July 30, 2008 5:52 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Type Cast Error
 
  
 
 Alex - 
 
 I looked at your presentation. I am using the StockVO in both pages
 (both modules). I need to use it in both. If I define the class in
 both places, what does it matter, its the same class? 
 
 I saw where you mentioned having common code by loading a Shared
 Code swf that would apply to ALL modules. I guess I can give that a
 shot.
 
 Thanks again for your time! 
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  It is picking up the class from a different application domain. See
 the
  modules presentation on my blog.
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of donald_d_hook
  Sent: Wednesday, July 30, 2008 10:22 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Type Cast Error
  
  
  
  I receive a type cast error when I try to cast an object I received
  from the server (an arraycollection of value objects). I get the
  following: 
  
  TypeError: Error #1034: Type Coercion failed: cannot convert
  com.spinnaker.model::[EMAIL PROTECTED] to com.spinnaker.model.StockVO
  
  The actionscript object has the correct remoteClass. On top of that,
  this only happens the 2nd time into the page. Not sure what is
  happening behind the scenes, nor do I know what the @3b392b81 is.
  
  Thanks in advance
 





[flexcoders] Re: Flex woes, wo-iz-o, i hate it (sometimes)

2008-07-31 Thread Amy
--- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote:

 *shudder*
 
 That's a bad idea unless the clean up imports builder 
functionalituy is
 rewritten to a) function, and b) be something you can control when 
and if it
 runs ;-)

That's why I suggested a switch.  But I routinely go in and clean out 
the import statements of stuff I decided not to use ;-), so maybe it's 
just me.



[flexcoders] Re: CFMultiUploader

2008-07-31 Thread Dan Vega
I just posted a quick intro to the component

http://www.danvega.org



On Thu, Jul 31, 2008 at 9:38 AM, Dan Vega [EMAIL PROTECTED] wrote:

 Anyone on here who uses ColdFusion  I could really use your help. I built a
 multi file uploader using Flex that you can configure via xml. I need a
 couple people to test a very early alpha version before I relase it. You
 should be able to just unzip it to root and follow easy installation
 instructions.


 Thank You
 Dan Vega
 [EMAIL PROTECTED]
 http://www.danvega.org



[flexcoders] Keyboard navigating through List's item renderers

2008-07-31 Thread mydarkspoon
Hi,
I have a list that renders meta data about images (title  tags).
This list uses a Form with 2 TextInput controls as an item renderer.

The user should be able to navigate through the input fields using
either the mouse or the tab key.

The List default behavior when editable=true is to set the focus to
the renderers themselves, but not to their sub components, so the Form
itself will have a focus rectangle but not the TextInput controls.

What I tried to do is to override the setFocus() on the Form
subcomponent and move the focus to the first TextInput and on that
TextInput focusOut set its focus to the 2nd TextInput.
That didn't work as expected, and even if it did, I'm sure the is a
better way to achieve this behavior.

Thank you,
Almog Kurtser
http://www.mostlyflex.com



Re: [flexcoders] NaN and Infinity showing in output - How to modify?

2008-07-31 Thread Sid Maskit
If the format function is a custom function you have written, you could just 
have it check whether you like the result it is about to return, and if not, 
return something else. If that is not the case, I believe that you should be 
able to put tests into your binding statement. 

You could test for NaN with something like this:

mx:Label text={(myNumber is NaN) ? 0 : PrepForDispl ay.format( myNumber) }/

I'm not sure about infinity, but I assume that you can test for this by looking 
for the greatest possible value of the number. Assuming that you have set up 
the variable maxValue to contain that value, you should be able to do something 
like this:

mx:Label text={(myNumber  maxValue) ? 0 : PrepForDispl ay.format( myNumber) 
}/

If you put the two together, it would look something like this:

mx:Label text={(myNumber is NaN) ? 0 : (myNumber  maxValue) ? 0 : 
PrepForDispl ay.format( myNumber) }/

 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: cox.blair [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, July 31, 2008 6:41:18 AM
Subject: [flexcoders] NaN and Infinity showing in output - How to modify?


I seem to have trouble explaining myself here, hard when you are just
learning. Perhaps this will be better.

Is it possible to remove, change or hide any label or text output that
displays NaN or Infinity?

I'm performing a very simply calculation where the user enters a
number in a form and it is calculated and displayed. Simple and does
what I need. In some instances, there are more variables required and
until they are provided, the output display NaN or Infinity. 

How could I easily adjust these? It could be a default display of
zero, it could be to display nothing, whatever is the easiest and most
straight forward method.

Below is only an example of how I'm taking the user input from the
form and passing the variable on to the Label text output.

mx:Number id=myNumber {Number( userInput. text) * (1 +
Number(otherUserInp ut.text)) * 1 /
Number(otherOtherUs erInput.text) }/mx:Number

The answer is output to:

mx:Label text={PrepForDispl ay.format( myNumber) }/

Thank you, any assistance you can provide would be welcomed.

 


  

[flexcoders] applet on top of flash?

2008-07-31 Thread ibo
Anyone tried displaying applet on top of flex/flash? Can someone pls point me a 
link to an example demo?
I did a search on this topic and Ive read that its possible to do so but 
couldnt find an working example.
I want it to be displayed as seamless as possible and dont want to open a new 
browser window (using navigateToURL).
I modified the index.template.html so that It can load the applet and float it 
on top of the flex app
but it wont render the html panel. Im using Yahoo UI Panel btw.

-Stephen


[flexcoders] Re: Type Cast Error

2008-07-31 Thread donald_d_hook
Alex - after tracing this through, the first time into the page, I do
a request to get the stock objects.  They are retrieved properly and
displayed.  I go into a chart module, get some other items and display
that page.  When I go back into the 1st page (or module) it looks as
though the object is not getting serialized properly.  I have a
BackTestStock object with a BackTest Object and Stock object in it. 
The BackTest is ok, but the stock object is null - so it looks like it
is not getting serialized properly for whatever reason.  The first
time it does, but not the second time. 

Thanks ...

--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 Essentially, the actuall classname isn't StockVO, it is
 [EMAIL PROTECTED]  If the portion
 after the @ matches it is effectively stripped off so you can just see
 and use StockVO in most places
 
  
 
 So it doesn't really match.  This will be extremely useful in Flex 3.2
 when you can mix sub-application built with different versions of Flex,
 but is a pain for module users like yourself.
 
  
 
 Of course, the easiest way to use StockVO in both modules is to get it
 linked into the main app.  Most VOs are small so it won't matter.  The
 SharedCode Module pattern is for heavy things.
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of donald_d_hook
 Sent: Wednesday, July 30, 2008 5:52 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Type Cast Error
 
  
 
 Alex - 
 
 I looked at your presentation. I am using the StockVO in both pages
 (both modules). I need to use it in both. If I define the class in
 both places, what does it matter, its the same class? 
 
 I saw where you mentioned having common code by loading a Shared
 Code swf that would apply to ALL modules. I guess I can give that a
 shot.
 
 Thanks again for your time! 
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  It is picking up the class from a different application domain. See
 the
  modules presentation on my blog.
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of donald_d_hook
  Sent: Wednesday, July 30, 2008 10:22 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Type Cast Error
  
  
  
  I receive a type cast error when I try to cast an object I received
  from the server (an arraycollection of value objects). I get the
  following: 
  
  TypeError: Error #1034: Type Coercion failed: cannot convert
  com.spinnaker.model::[EMAIL PROTECTED] to com.spinnaker.model.StockVO
  
  The actionscript object has the correct remoteClass. On top of that,
  this only happens the 2nd time into the page. Not sure what is
  happening behind the scenes, nor do I know what the @3b392b81 is.
  
  Thanks in advance
 





[flexcoders] Re: Sandbox violation running from Builder. How did I get this and how do I fix it?

2008-07-31 Thread jamalwally
I also get a security sandbox violation error on a flex project
after checking out from SVN.  

I have a flex project that compiles and runs fine on the original
development computer.  I then check in my source code to an SVN
repository.  When a fellow developer checks the project out from SVN
and tries to compile on their system, they encounter the security
sandbox violation error.

My flex application never tries to access a remote file.  The security
sandbox violation occurs while trying to access a local XML file in
the project directory (source code in src/, swf in bin-debug/ and xml
file in assets/ --- all three are sister directories).

If anyone has figured out the solution to this puzzle, please post!

Best wishes,
 -- j


--- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote:

 It was *something* funky caused by svn checkout.
 
 First I check out via builder to my workspace (file location as well as
 create project) and I got the problem.
 
 I checked out to a directory completely separate from my workspace via
 another SVN client, and then copied the tree to the builder workspace
 directory and created a new project in Builder, still didn't work.
 
 Finally I created yet another project, quit flex, copied the /src
directory
 from my checkout, deleted all dotfiles (svn and whatever else) with
a find |
 grep | xargs rm and re-started flex, and now it works (but it's not
checked
 out, just effectively exported).
 
 The workspace isn't listed in Flash Player's trusted locations
through the
 advanced settings UI, so it'd be really nice to know how the player
 determines what is and isn't a builder swf, so I can take whatever's
causing
 the damned problem out of SVN (or put it back in if it's missing
something)
 - and also let other devs on the list and in my office know what to
look out
 for :)
 
 -Josh
 
 On Fri, Jun 6, 2008 at 12:51 PM, Bjorn Schultheiss 
 [EMAIL PROTECTED] wrote:
 
Are you sure its not a security settings related issue..
 
 
www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Rick
  Winscot rick.winscot@
  wrote:
 
  
   Also. where is the project 'physically' located? I would strongly
  recommend
   making sure that the project is inside your workspace. Are there any
   compiler options like -use-network=false present?
  
  
  
   Rick Winscot
  
  
  
  
  
   From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
[mailto:
  flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On
   Behalf Of Tracy Spratt
   Sent: Thursday, June 05, 2008 9:03 PM
   To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
   Subject: RE: [flexcoders] Sandbox violation running from Builder.
  How did I
   get this and how do I fix it?
  
  
  
   Very strange. There was a similar thread a couple days ago and we
  did not
   find a solution, as far as I know.
  
  
  
   Did you create the new project by don't New Project and then copying
  in the
   files, or did you import the other project? (the first, I know, but
  maybe
   try the second?)
  
  
  
   Maybe try removing the application from the project's application
  list and
   then re-adding it?
  
  
  
   Tracy
  
  
  
   _
  
   From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
[mailto:
  flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On
   Behalf Of Josh McDonald
   Sent: Thursday, June 05, 2008 8:42 PM
   To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
   Subject: [flexcoders] Sandbox violation running from Builder. How
  did I get
   this and how do I fix it?
  
  
  
   I've checked out a project into the same directory as all my other
  projects,
   and now I'm getting a security sandbox violation trying to load a
  local file
   even when running from Flex. What could cause this? And how do I get
  it back
   to behaving the way it should for all builder projects?
  
   -J
  
   --
   Therefore, send not to know For whom the bell tolls. It tolls for
  thee.
  
   :: Josh 'G-Funk' McDonald
   :: 0437 221 380 :: josh@
  
 
   
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





[flexcoders] Re: Can we subclass Application yet?

2008-07-31 Thread chigwell23
Hi Alex, yes in MXML - since we have a debug toolbar that appears on
every view based on a flag, I wanted to put this visual component on
the base Application class along with common public vars etc. Public
vars etc work fine, but it seems as though you cannot put any visual
mxml components on the base class.

Shameless plug - if anyone knows you will :-) please please please
could you look at my params to callback renderer question? Am about to
resend rephrased in specific chart context. TIA, Mic.


--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 You can certainly subclass Application via AS.  Are you trying to do it
 in MXML?
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of chigwell23
 Sent: Wednesday, July 30, 2008 11:51 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Can we subclass Application yet?
 
  
 
 As far as I can tell the Flex2 problems with subclassing Application
 still exist in Flex3 i.e. bye-bye mxml components on parent class? Is
 this correct and has anybody worked around this? TIA,
 
 Mic.





Re: [flexcoders] NaN and Infinity showing in output - How to modify?

2008-07-31 Thread Blair Cox
Hi Sid, thanks for the reply. I tried your first solution since I did not
create a custom function and it returns;

1067: Implicit coercion of value of type Number to an unrelated type Class

I have a vague understanding of what is occurring here. Any way around it?
How difficult would it be to modify or create a custom function?

What I have now is simply:

mx:NumberFormatter id=PrepForDisplayprecision=2
rounding=updecimalSeparatorTo=.thousandsSeparatorTo=,
useThousandsSeparator=trueuseNegativeSign=true/

-- 
Blair Cox

http://www.luminultra.com
 

From: Sid Maskit [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Thu, 31 Jul 2008 07:51:38 -0700 (PDT)
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to
modify?

 
 

If the format function is a custom function you have written, you could just
have it check whether you like the result it is about to return, and if not,
return something else. If that is not the case, I believe that you should be
able to put tests into your binding statement. 

You could test for NaN with something like this:

mx:Label text={(myNumber is NaN) ? 0 : PrepForDispl ay.format( myNumber)
}/

I'm not sure about infinity, but I assume that you can test for this by
looking for the greatest possible value of the number. Assuming that you
have set up the variable maxValue to contain that value, you should be able
to do something like this:

mx:Label text={(myNumber  maxValue) ? 0 : PrepForDispl ay.format(
myNumber) }/

If you put the two together, it would look something like this:

mx:Label text={(myNumber is NaN) ? 0 : (myNumber  maxValue) ? 0 :
PrepForDispl ay.format( myNumber) }/

 
Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/




Re: [flexcoders] Re: Sandbox violation running from Builder. How did I get this and how do I fix it?

2008-07-31 Thread Laurent Cozic
Did you try putting your assets directory inside src? I think that should 
work fine.

 -- Laurent Cozic


Flash, Flex and Web Application development 
http://pogopixels.com





- Original Message 
From: jamalwally [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, July 31, 2008 4:09:47 PM
Subject: [flexcoders] Re: Sandbox violation running from Builder. How did I get 
this and how do I fix it?


I also get a security sandbox violation error on a flex project
after checking out from SVN. 

I have a flex project that compiles and runs fine on the original
development computer.  I then check in my source code to an SVN
repository.  When a fellow developer checks the project out from SVN
and tries to compile on their system, they encounter the security
sandbox violation error.

My flex application never tries to access a remote file.  The security
sandbox violation occurs while trying to access a local XML file in
the project directory (source code in src/, swf in bin-debug/ and xml
file in assets/ --- all three are sister directories) .

If anyone has figured out the solution to this puzzle, please post!

Best wishes,
-- j

--- In [EMAIL PROTECTED] ups.com, Josh McDonald [EMAIL PROTECTED] wrote:

 It was *something* funky caused by svn checkout.
 
 First I check out via builder to my workspace (file location as well as
 create project) and I got the problem.
 
 I checked out to a directory completely separate from my workspace via
 another SVN client, and then copied the tree to the builder workspace
 directory and created a new project in Builder, still didn't work.
 
 Finally I created yet another project, quit flex, copied the /src
directory
 from my checkout, deleted all dotfiles (svn and whatever else) with
a find |
 grep | xargs rm and re-started flex, and now it works (but it's not
checked
 out, just effectively exported).
 
 The workspace isn't listed in Flash Player's trusted locations
through the
 advanced settings UI, so it'd be really nice to know how the player
 determines what is and isn't a builder swf, so I can take whatever's
causing
 the damned problem out of SVN (or put it back in if it's missing
something)
 - and also let other devs on the list and in my office know what to
look out
 for :)
 
 -Josh
 
 On Fri, Jun 6, 2008 at 12:51 PM, Bjorn Schultheiss 
 bjorn.mailinglists@ ... wrote:
 
Are you sure its not a security settings related issue..
 
 
www.macromedia. com/support/ documentation/ en/flashplayer/ help/settings_ 
manager04. html
 
  --- In [EMAIL PROTECTED] ups.com flexcoders% 40yahoogroups. com,
Rick
  Winscot rick.winscot@ 
  wrote:
 
  
   Also. where is the project 'physically' located? I would strongly
  recommend
   making sure that the project is inside your workspace. Are there any
   compiler options like -use-network= false present?
  
  
  
   Rick Winscot
  
  
  
  
  
   From: [EMAIL PROTECTED] ups.com flexcoders% 40yahoogroups. com
[mailto:
  [EMAIL PROTECTED] ups.com flexcoders% 40yahoogroups. com] On
   Behalf Of Tracy Spratt
   Sent: Thursday, June 05, 2008 9:03 PM
   To: [EMAIL PROTECTED] ups.com flexcoders% 40yahoogroups. com
   Subject: RE: [flexcoders] Sandbox violation running from Builder.
  How did I
   get this and how do I fix it?
  
  
  
   Very strange. There was a similar thread a couple days ago and we
  did not
   find a solution, as far as I know.
  
  
  
   Did you create the new project by don't New Project and then copying
  in the
   files, or did you import the other project? (the first, I know, but
  maybe
   try the second?)
  
  
  
   Maybe try removing the application from the project's application
  list and
   then re-adding it?
  
  
  
   Tracy
  
  
  
   _
  
   From: [EMAIL PROTECTED] ups.com flexcoders% 40yahoogroups. com
[mailto:
  [EMAIL PROTECTED] ups.com flexcoders% 40yahoogroups. com] On
   Behalf Of Josh McDonald
   Sent: Thursday, June 05, 2008 8:42 PM
   To: [EMAIL PROTECTED] ups.com flexcoders% 40yahoogroups. com
   Subject: [flexcoders] Sandbox violation running from Builder. How
  did I get
   this and how do I fix it?
  
  
  
   I've checked out a project into the same directory as all my other
  projects,
   and now I'm getting a security sandbox violation trying to load a
  local file
   even when running from Flex. What could cause this? And how do I get
  it back
   to behaving the way it should for all builder projects?
  
   -J
  
   --
   Therefore, send not to know For whom the bell tolls. It tolls for
  thee.
  
   :: Josh 'G-Funk' McDonald
   :: 0437 221 380 :: josh@
  
 
  
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





  

[flexcoders] BlazeDS/LCDS on Jboss 4.2.3

2008-07-31 Thread Dimitrios Gianninas
Just wondering if anyone has deployed BlazeDS/LCDS on JBoss 4.2.3 and got the 
authentication stuff to work?
 
Got everything configured as it should be but when I do
 
myRemoteObject.setCredentials( falcon, falconfalcon );
 
in my flex app, I get no response and when I try a remote call it fails and I 
see the following in the debug log:
 
'837C1F01-1993-5303-FCA0-79AC9C93A63C' producer sending message 
'C36DF068-C3FB-BA3B-F07E-79AD2A0CC9D5'
'my-amf' channel endpoint set to http://localhost:8080/xlogin/messagebroker/amf
'my-amf' channel settings are:
channel id=my-amf type=mx.messaging.channels.AMFChannel
  endpoint uri=http://{server.name}:{server.port}/xlogin/messagebroker/amf/
  properties/
/channel
'my-amf' pinging endpoint.
'my-amf' channel got status. (Object)#0
  code = NetConnection.Call.BadVersion
  description = 
  details = 
  level = error
'my-amf' channel polling stopped.
'my-amf' channel connect failed.
'837C1F01-1993-5303-FCA0-79AC9C93A63C' producer channel faulted with 
Channel.Connect.Failed NetConnection.Call.BadVersion: : url: 
'http://localhost:8080/xlogin/messagebroker/amf'
'837C1F01-1993-5303-FCA0-79AC9C93A63C' producer fault for 
'C36DF068-C3FB-BA3B-F07E-79AD2A0CC9D5'.
 
However... if I go to my login.jsp and login successfull and then access my 
Flex app and try a remote call, it all works like a champ!
 
So what am I missing?
 
Dimitrios Gianninas
RIA Developer and Team Lead
Optimal Payments Inc.
 

-- 
WARNING
---
This electronic message and its attachments may contain confidential, 
proprietary or legally privileged information, which is solely for the use of 
the intended recipient.  No privilege or other rights are waived by any 
unintended transmission or unauthorized retransmission of this message.  If you 
are not the intended recipient of this message, or if you have received it in 
error, you should immediately stop reading this message and delete it and all 
attachments from your system.  The reading, distribution, copying or other use 
of this message or its attachments by unintended recipients is unauthorized and 
may be unlawful.  If you have received this e-mail in error, please notify the 
sender.

AVIS IMPORTANT
--
Ce message électronique et ses pièces jointes peuvent contenir des 
renseignements confidentiels, exclusifs ou légalement privilégiés destinés au 
seul usage du destinataire visé.  L’expéditeur original ne renonce à aucun 
privilège ou à aucun autre droit si le présent message a été transmis 
involontairement ou s’il est retransmis sans son autorisation.  Si vous n’êtes 
pas le destinataire visé du présent message ou si vous l’avez reçu par erreur, 
veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses 
pièces jointes, de votre système.  La lecture, la distribution, la copie ou 
tout autre usage du présent message ou de ses pièces jointes par des personnes 
autres que le destinataire visé ne sont pas autorisés et pourraient être 
illégaux.  Si vous avez reçu ce courrier électronique par erreur, veuillez en 
aviser l’expéditeur.



[flexcoders] Chart: pass info about series1 to series2 lineSegmentRenderer callback?

2008-07-31 Thread chigwell23
First question is whether I can pass actual parameters to a callback
in the first place? This is what I need to do:

mx:ColumnSeries id=salesSeries
  yField=sales
/mx:ColumnSeries


mx:LineSeries id=percSeries
  yField=percent 
  lineSegmentRenderer=PercentLineRenderer(orig callback params,
new  callback params)
/mx:LineSeries

Conventionally of course the lineSegmentRenderer gets no params as a
callback. But in this instance I need to manipulate the position of
the  percent line series lines through the renderer based on sales
series data so that the lines are positioned exactly over the columns
of the sales series. I have code in the renderer that positions the
lines, but different underlying data for the column series (2 side by
side cols for each data point), changes the width and horizontal
position of the columns and then the percent line fragments above no
longer line up.

If I could get the sales series info to the percent series
renderer I think I stand a chance of coding interacting series

A big thank you in advance,

Mic.




Re: [flexcoders] Chart: pass info about series1 to series2 lineSegmentRenderer callback?

2008-07-31 Thread Laurent Cozic
Normally, the way to pass parameters to the item renderer is through its data 
property. So just make sure that your data provider contains whatever 
information you need to set the item renderer position.

 -- Laurent Cozic


Flash, Flex and Web Application development 
http://pogopixels.com



- Original Message 
From: chigwell23 [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, July 31, 2008 4:33:54 PM
Subject: [flexcoders] Chart: pass info about series1 to series2 
lineSegmentRenderer callback?


First question is whether I can pass actual parameters to a callback
in the first place? This is what I need to do:

mx:ColumnSeries id=salesSeries
yField=sales 
/mx:ColumnSeries

mx:LineSeries id=percSeries
yField=percent 
lineSegmentRenderer =PercentLineRen derer(orig callback params,
new  callback params)
/mx:LineSeries

Conventionally of course the lineSegmentRenderer gets no params as a
callback. But in this instance I need to manipulate the position of
the  percent line series lines through the renderer based on sales
series data so that the lines are positioned exactly over the columns
of the sales series. I have code in the renderer that positions the
lines, but different underlying data for the column series (2 side by
side cols for each data point), changes the width and horizontal
position of the columns and then the percent line fragments above no
longer line up.

If I could get the sales series info to the percent series
renderer I think I stand a chance of coding interacting series

A big thank you in advance,

Mic.




  

RE: [flexcoders] BlazeDS/LCDS on Jboss 4.2.3

2008-07-31 Thread Dimitrios Gianninas
nevermind, figure out my problem
 
Dimitrios Gianninas
RIA Developer and Team Lead
Optimal Payments Inc.
 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
Dimitrios Gianninas
Sent: Thursday, July 31, 2008 11:16 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] BlazeDS/LCDS on Jboss 4.2.3



Just wondering if anyone has deployed BlazeDS/LCDS on JBoss 4.2.3 and got the 
authentication stuff to work?
 
Got everything configured as it should be but when I do
 
myRemoteObject.setCredentials( falcon, falconfalcon );
 
in my flex app, I get no response and when I try a remote call it fails and I 
see the following in the debug log:
 
'837C1F01-1993-5303-FCA0-79AC9C93A63C' producer sending message 
'C36DF068-C3FB-BA3B-F07E-79AD2A0CC9D5'
'my-amf' channel endpoint set to http://localhost:8080/xlogin/messagebroker/amf 
http://localhost:8080/xlogin/messagebroker/amf 
'my-amf' channel settings are:
channel id=my-amf type=mx.messaging.channels.AMFChannel
  endpoint uri=http://{server.name}:{server.port}/xlogin/messagebroker/amf/ 
http://{server.name}:{server.port}/xlogin/messagebroker/amf/ 
  properties/
/channel
'my-amf' pinging endpoint.
'my-amf' channel got status. (Object)#0
  code = NetConnection.Call.BadVersion
  description = 
  details = 
  level = error
'my-amf' channel polling stopped.
'my-amf' channel connect failed.
'837C1F01-1993-5303-FCA0-79AC9C93A63C' producer channel faulted with 
Channel.Connect.Failed NetConnection.Call.BadVersion: : url: 
'http://localhost:8080/xlogin/messagebroker/amf'
'837C1F01-1993-5303-FCA0-79AC9C93A63C' producer fault for 
'C36DF068-C3FB-BA3B-F07E-79AD2A0CC9D5'.
 
However... if I go to my login.jsp and login successfull and then access my 
Flex app and try a remote call, it all works like a champ!
 
So what am I missing?
 
Dimitrios Gianninas
RIA Developer and Team Lead
Optimal Payments Inc.
 
AVIS IMPORTANT

WARNING

Ce message électronique et ses pièces jointes peuvent contenir des 
renseignements confidentiels, exclusifs ou légalement privilégiés destinés au 
seul usage du destinataire visé. L’expéditeur original ne renonce à aucun 
privilège ou à aucun autre droit si le présent message a été transmis 
involontairement ou s’il est retransmis sans son autorisation. Si vous n’êtes 
pas le destinataire visé du présent message ou si vous l’avez reçu par erreur, 
veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses 
pièces jointes, de votre système. La lecture, la distribution, la copie ou tout 
autre usage du présent message ou de ses pièces jointes par des personnes 
autres que le destinataire visé ne sont pas autorisés et pourraient être 
illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en 
aviser l’expéditeur.

This electronic message and its attachments may contain confidential, 
proprietary or legally privileged information, which is solely for the use of 
the intended recipient. No privilege or other rights are waived by any 
unintended transmission or unauthorized retransmission of this message. If you 
are not the intended recipient of this message, or if you have received it in 
error, you should immediately stop reading this message and delete it and all 
attachments from your system. The reading, distribution, copying or other use 
of this message or its attachments by unintended recipients is unauthorized and 
may be unlawful. If you have received this e-mail in error, please notify the 
sender.

 

-- 
WARNING
---
This electronic message and its attachments may contain confidential, 
proprietary or legally privileged information, which is solely for the use of 
the intended recipient.  No privilege or other rights are waived by any 
unintended transmission or unauthorized retransmission of this message.  If you 
are not the intended recipient of this message, or if you have received it in 
error, you should immediately stop reading this message and delete it and all 
attachments from your system.  The reading, distribution, copying or other use 
of this message or its attachments by unintended recipients is unauthorized and 
may be unlawful.  If you have received this e-mail in error, please notify the 
sender.

AVIS IMPORTANT
--
Ce message électronique et ses pièces jointes peuvent contenir des 
renseignements confidentiels, exclusifs ou légalement privilégiés destinés au 
seul usage du destinataire visé.  L’expéditeur original ne renonce à aucun 
privilège ou à aucun autre droit si le présent message a été transmis 
involontairement ou s’il est retransmis sans son autorisation.  Si vous n’êtes 
pas le destinataire visé du présent message ou si vous l’avez reçu par erreur, 
veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses 
pièces jointes, de votre système.  La lecture, la distribution, la copie ou 
tout autre usage du présent message ou de ses pièces jointes par des personnes 
autres que le destinataire 

[flexcoders] Re: Chart: pass info about series1 to series2 lineSegmentRenderer callback?

2008-07-31 Thread EddieBerman
I don't believe you can pass params. An alternative would be to have
your lineRenderer query upwards for the data. I do something similar
and added the following code in my updateDisplayList();

(I don't know how important the initial LineSeries check is)
override protected function updateDisplayList(wd:Number,ht:Number) {
var lc:LineChart;
if (parent is UIComponent) {
var myParent:String = String(UIComponent(parent).className);
if (myParent !=LineSeries)
return;

var ls:LineSeries = parent as LineSeries;
lc = ls.owner as LineChart;
var salesInfo:Number = lc.getSalesInfo();  // talk to lineChart here


-Eddie



--- In flexcoders@yahoogroups.com, chigwell23 [EMAIL PROTECTED] wrote:

 First question is whether I can pass actual parameters to a callback
 in the first place? This is what I need to do:
 
 mx:ColumnSeries id=salesSeries
   yField=sales
 /mx:ColumnSeries
 
 
 mx:LineSeries id=percSeries
   yField=percent 
   lineSegmentRenderer=PercentLineRenderer(orig callback params,
 new  callback params)
 /mx:LineSeries
 
 Conventionally of course the lineSegmentRenderer gets no params as a
 callback. But in this instance I need to manipulate the position of
 the  percent line series lines through the renderer based on sales
 series data so that the lines are positioned exactly over the columns
 of the sales series. I have code in the renderer that positions the
 lines, but different underlying data for the column series (2 side by
 side cols for each data point), changes the width and horizontal
 position of the columns and then the percent line fragments above no
 longer line up.
 
 If I could get the sales series info to the percent series
 renderer I think I stand a chance of coding interacting series
 
 A big thank you in advance,
 
 Mic.





Re: [flexcoders] NaN and Infinity showing in output - How to modify?

2008-07-31 Thread Blair Cox
Hi Sid, thanks a lot for your help. I figured it out! Really just need a
starting point for where to look. Cheers!

isNaN(mynumber) ? 0 :


-- 
Blair Cox

http://www.luminultra.com
 





From: Sid Maskit [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Thu, 31 Jul 2008 07:51:38 -0700 (PDT)
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to
modify?

 
 

If the format function is a custom function you have written, you could just
have it check whether you like the result it is about to return, and if not,
return something else. If that is not the case, I believe that you should be
able to put tests into your binding statement. 

You could test for NaN with something like this:

mx:Label text={(myNumber is NaN) ? 0 : PrepForDispl ay.format( myNumber)
}/

I'm not sure about infinity, but I assume that you can test for this by
looking for the greatest possible value of the number. Assuming that you
have set up the variable maxValue to contain that value, you should be able
to do something like this:

mx:Label text={(myNumber  maxValue) ? 0 : PrepForDispl ay.format(
myNumber) }/

If you put the two together, it would look something like this:

mx:Label text={(myNumber is NaN) ? 0 : (myNumber  maxValue) ? 0 :
PrepForDispl ay.format( myNumber) }/

 
Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/


- Original Message 
From: cox.blair [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, July 31, 2008 6:41:18 AM
Subject: [flexcoders] NaN and Infinity showing in output - How to modify?

 
 

I seem to have trouble explaining myself here, hard when you are just
learning. Perhaps this will be better.

Is it possible to remove, change or hide any label or text output that
displays NaN or Infinity?

I'm performing a very simply calculation where the user enters a
number in a form and it is calculated and displayed. Simple and does
what I need. In some instances, there are more variables required and
until they are provided, the output display NaN or Infinity.

How could I easily adjust these? It could be a default display of
zero, it could be to display nothing, whatever is the easiest and most
straight forward method.

Below is only an example of how I'm taking the user input from the
form and passing the variable on to the Label text output.

mx:Number id=myNumber {Number( userInput. text) * (1 +
Number(otherUserInp ut.text)) * 1 /
Number(otherOtherUs erInput.text) }/mx:Number

The answer is output to:

mx:Label text={PrepForDispl ay.format( myNumber) }/

Thank you, any assistance you can provide would be welcomed.

 
  

 
 




[flexcoders] How do we implement pop-up input in Flex?

2008-07-31 Thread Joshua Jackson
Dear all,

I want to have a popup input in my flex apps where the values in the
popup window will be set to the parent window that calls this popup
window. How do we set the variable chosen to the parent window in
Flex? Could anyone give me a hint on these please.

Many thanks

-- 
Setting a new landmark.

Blog: http://joshuajava.wordpress.com/


[flexcoders] Re: Detecting a click on an empty part of AdvancedDataGrid

2008-07-31 Thread whatabrain
Thanks. That's very close to what I want. However, this method 
disables multiple-select. It deselects items when you click 
_anywhere_. I only want to deselect when you click on empty space.


--- In flexcoders@yahoogroups.com, actionscript_czar [EMAIL PROTECTED] 
wrote:

 
 Try using the mouseFocusChange event.  I've used it a few times for
 deselecting items in a list when anywhere else is clicked.  For your
 needs, you may have to adapt it but give it a try.
 
 I have a blog post about it at:
 
 http://my.opera.com/darylducharme/blog/2007/12/14/hidden-gems-
mousefocus\
 change
 
 --- In flexcoders@yahoogroups.com, whatabrain junk1@ wrote:
 
  I have an AdvancedDataGrid which has a few rows, and lots of empty
  space. When I click on the empty space, I want all the rows to be
  deselected. How do I detect that I've clicked in an empty space?
 
  I tried using grid.getObjectsUnderPoint() in the click event, 
but
 the
  results aren't very useful. I guess I could depend on the fact 
that
  there are always more than three objects when I click on a real 
row,
  and exactly three when I click on empty space, but that seems 
like a
  bad thing to depend on. Who knows what future versions of Flex 
will
 add
  to the list?
 
  There must be a better way!
 
  Thanks.
 





Re: [flexcoders] NaN and Infinity showing in output - How to modify?

2008-07-31 Thread Blair Cox
Just one more question. The zero works for me, but I¹m sure I¹ll be asked to
make it blank. Any hints as to how this could be accomplished? Coming from
the Flash side of things, all I would be looking to do is change the alpha
value of the label to zero if the value was 0.


isNaN(mynumber) ? 0 :


-- 
Blair Cox

http://www.luminultra.com
 





From: Sid Maskit [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Thu, 31 Jul 2008 07:51:38 -0700 (PDT)
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to
modify?

 
 

If the format function is a custom function you have written, you could just
have it check whether you like the result it is about to return, and if not,
return something else. If that is not the case, I believe that you should be
able to put tests into your binding statement. 

You could test for NaN with something like this:

mx:Label text={(myNumber is NaN) ? 0 : PrepForDispl ay.format( myNumber)
}/

I'm not sure about infinity, but I assume that you can test for this by
looking for the greatest possible value of the number. Assuming that you
have set up the variable maxValue to contain that value, you should be able
to do something like this:

mx:Label text={(myNumber  maxValue) ? 0 : PrepForDispl ay.format(
myNumber) }/

If you put the two together, it would look something like this:

mx:Label text={(myNumber is NaN) ? 0 : (myNumber  maxValue) ? 0 :
PrepForDispl ay.format( myNumber) }/

 
Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



[flexcoders] Re: Chart: pass info about series1 to series2 lineSegmentRenderer callback?

2008-07-31 Thread Tim Hoff

Unfortunately, the data property in a chart itemRenderer, only contains
the xField and the yField; because it is a ChartItem.  However, assuming
that both series relate to each other by a common xValue, you could use
that to iterate over the first series dataProvider to get the related
item; assuming that the dataProvider is public and hopefully in a model.

private var _chartItem:ChartItem;



public function get data():Object {
 return _chartItem;
}



public function set data(value:Object):void {
 if (_chartItem == value) return;

 _chartItem = ChartItem(value);



 if(_chartItem != null)
 if (ColumnSeriesItem(_chartItem).xValue != null)
var myCommonXValue : String =
ColumnSeriesItem(_chartItem).xValue.toString();
 // then loop through the first series
dataProvider, comparing the xValue, to get the associated sales value
}

-TH

--- In flexcoders@yahoogroups.com, Laurent Cozic [EMAIL PROTECTED] wrote:

 Normally, the way to pass parameters to the item renderer is through
its data property. So just make sure that your data provider contains
whatever information you need to set the item renderer position.

 -- Laurent Cozic


 Flash, Flex and Web Application development
 http://pogopixels.com



 - Original Message 
 From: chigwell23 [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Thursday, July 31, 2008 4:33:54 PM
 Subject: [flexcoders] Chart: pass info about series1 to series2
lineSegmentRenderer callback?


 First question is whether I can pass actual parameters to a callback
 in the first place? This is what I need to do:

 mx:ColumnSeries id=salesSeries
 yField=sales 
 /mx:ColumnSeries

 mx:LineSeries id=percSeries
 yField=percent
 lineSegmentRenderer =PercentLineRen derer(orig callback params,
 new callback params)
 /mx:LineSeries

 Conventionally of course the lineSegmentRenderer gets no params as a
 callback. But in this instance I need to manipulate the position of
 the percent line series lines through the renderer based on sales
 series data so that the lines are positioned exactly over the columns
 of the sales series. I have code in the renderer that positions the
 lines, but different underlying data for the column series (2 side by
 side cols for each data point), changes the width and horizontal
 position of the columns and then the percent line fragments above no
 longer line up.

 If I could get the sales series info to the percent series
 renderer I think I stand a chance of coding interacting series

 A big thank you in advance,

 Mic.





Re: [flexcoders] NaN to return a string?

2008-07-31 Thread Blair Cox
Turns out showing a zero could be implied that the calculation was a zero.
This is bad, especially if the result is actually zero. Is there any way to
return a string rather than a number?


isNaN(mynumber) ? 0 :


-- 
Blair Cox

http://www.luminultra.com
 





From: Sid Maskit [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Thu, 31 Jul 2008 07:51:38 -0700 (PDT)
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to
modify?

 
 

If the format function is a custom function you have written, you could just
have it check whether you like the result it is about to return, and if not,
return something else. If that is not the case, I believe that you should be
able to put tests into your binding statement. 

You could test for NaN with something like this:

mx:Label text={(myNumber is NaN) ? 0 : PrepForDispl ay.format( myNumber)
}/

I'm not sure about infinity, but I assume that you can test for this by
looking for the greatest possible value of the number. Assuming that you
have set up the variable maxValue to contain that value, you should be able
to do something like this:

mx:Label text={(myNumber  maxValue) ? 0 : PrepForDispl ay.format(
myNumber) }/

If you put the two together, it would look something like this:

mx:Label text={(myNumber is NaN) ? 0 : (myNumber  maxValue) ? 0 :
PrepForDispl ay.format( myNumber) }/

 
Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



Re: [flexcoders] NaN and Infinity showing in output - How to modify?

2008-07-31 Thread Laurent Cozic
How about:

sNaN(mynumber) ? 0 : 

 --
Laurent Cozic

Flash, Flex and Web Application development
http://pogopixels.com



- Original Message 
From: Blair Cox [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, July 31, 2008 5:19:46 PM
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify?


Just one more question. The zero works for me, but I’m sure I’ll be asked to 
make it blank. Any hints as to how this could be accomplished? Coming from the 
Flash side of things, all I would be looking to do is change the alpha value of 
the label to zero if the value was 0.


isNaN(mynumber) ? 0 :


-- 
Blair Cox

http://www.luminult ra.com






From: Sid Maskit [EMAIL PROTECTED] com
Reply-To: [EMAIL PROTECTED] ups.com
Date: Thu, 31 Jul 2008 07:51:38 -0700 (PDT)
To: [EMAIL PROTECTED] ups.com
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify?

 
 

If the format function is a custom function you have written, you could just 
have it check whether you like the result it is about to return, and if not, 
return something else. If that is not the case, I believe that you should be 
able to put tests into your binding statement. 

You could test for NaN with something like this:

mx:Label text={(myNumber is NaN) ? 0 : PrepForDispl ay.format( myNumber) }/

I'm not sure about infinity, but I assume that you can test for this by looking 
for the greatest possible value of the number. Assuming that you have set up 
the variable maxValue to contain that value, you should be able to do something 
like this:

mx:Label text={(myNumber  maxValue) ? 0 : PrepForDispl ay.format( myNumber) 
}/

If you put the two together, it would look something like this:

mx:Label text={(myNumber is NaN) ? 0 : (myNumber  maxValue) ? 0 : 
PrepForDispl ay.format( myNumber) }/

 
Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySp ace.com
blog: http://smaskit. blogspot. com/
 


  

[flexcoders] Re: Detecting a click on an empty part of AdvancedDataGrid

2008-07-31 Thread whatabrain
Also, when I change focus to another window and then back to the flex 
app, mouseFocusChange stops firing. It never fires again after that.


--- In flexcoders@yahoogroups.com, whatabrain [EMAIL PROTECTED] wrote:

 Thanks. That's very close to what I want. However, this method 
 disables multiple-select. It deselects items when you click 
 _anywhere_. I only want to deselect when you click on empty space.
 
 
 --- In flexcoders@yahoogroups.com, actionscript_czar daryl@ 
 wrote:
 
  
  Try using the mouseFocusChange event.  I've used it a few times 
for
  deselecting items in a list when anywhere else is clicked.  For 
your
  needs, you may have to adapt it but give it a try.
  
  I have a blog post about it at:
  
  http://my.opera.com/darylducharme/blog/2007/12/14/hidden-gems-
 mousefocus\
  change
  
  --- In flexcoders@yahoogroups.com, whatabrain junk1@ wrote:
  
   I have an AdvancedDataGrid which has a few rows, and lots of 
empty
   space. When I click on the empty space, I want all the rows to 
be
   deselected. How do I detect that I've clicked in an empty space?
  
   I tried using grid.getObjectsUnderPoint() in the click event, 
 but
  the
   results aren't very useful. I guess I could depend on the fact 
 that
   there are always more than three objects when I click on a real 
 row,
   and exactly three when I click on empty space, but that seems 
 like a
   bad thing to depend on. Who knows what future versions of Flex 
 will
  add
   to the list?
  
   There must be a better way!
  
   Thanks.
  
 





Re: [flexcoders] NaN and Infinity showing in output - How to modify?

2008-07-31 Thread Sid Maskit
Try something like this:

mx:Label id=display text={(isNaN(myNumber as Number)) ? 0 : 
PrepForDisplay.format(myNumber)} visible={display.text != '0' amp;amp; 
display.text != 'In,fin,ity.00'}/

Note that you need to give the Label component and id, and use that id to refer 
to it in your statements within braces.

By the way, as you are no doubt noticing, the larger point here is that braces 
are not just for binding, but can contain all sorts of ActionScript.

Finally, the reason that there is amp;amp; instead of   is that we are 
inside of MXML, which is to say inside of XML, and we cannot use the  
character there, but must escape it.

 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: Blair Cox [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, July 31, 2008 9:19:46 AM
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify?


Just one more question. The zero works for me, but I’m sure I’ll be asked to 
make it blank. Any hints as to how this could be accomplished? Coming from the 
Flash side of things, all I would be looking to do is change the alpha value of 
the label to zero if the value was 0.


isNaN(mynumber) ? 0 :


-- 
Blair Cox

http://www.luminult ra.com






From: Sid Maskit [EMAIL PROTECTED] com
Reply-To: [EMAIL PROTECTED] ups.com
Date: Thu, 31 Jul 2008 07:51:38 -0700 (PDT)
To: [EMAIL PROTECTED] ups.com
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify?

 
 

If the format function is a custom function you have written, you could just 
have it check whether you like the result it is about to return, and if not, 
return something else. If that is not the case, I believe that you should be 
able to put tests into your binding statement. 

You could test for NaN with something like this:

mx:Label text={(myNumber is NaN) ? 0 : PrepForDispl ay.format( myNumber) }/

I'm not sure about infinity, but I assume that you can test for this by looking 
for the greatest possible value of the number. Assuming that you have set up 
the variable maxValue to contain that value, you should be able to do something 
like this:

mx:Label text={(myNumber  maxValue) ? 0 : PrepForDispl ay.format( myNumber) 
}/

If you put the two together, it would look something like this:

mx:Label text={(myNumber is NaN) ? 0 : (myNumber  maxValue) ? 0 : 
PrepForDispl ay.format( myNumber) }/

 
Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySp ace.com
blog: http://smaskit. blogspot. com/
  


  

Re: [flexcoders] NaN and Infinity showing in output - How to modify?

2008-07-31 Thread Sid Maskit
Actually, if you are just going to hide the label field, you can just have it 
display the result of the formatting, and put the checking for NaN and infinity 
into the setting for visibility. Since you are going to hide the label and it 
has a value you don't like, you don't really care what it is displaying when it 
is invisible.

 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: Sid Maskit [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, July 31, 2008 9:37:19 AM
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify?


Try something like this:

mx:Label id=display text={(isNaN( myNumber as Number)) ? 0 : 
PrepForDisplay. format(myNumber) } visible={display. text != '0' amp;amp; 
display.text != 'In,fin,ity. 00'}/

Note that you need to give the Label component and id, and use that id to refer 
to it in your statements within braces.

By the way, as you are no doubt noticing, the larger point here is that braces 
are not just for binding, but can contain all sorts of ActionScript.

Finally, the reason that there is amp;amp; instead of   is that we are 
inside of MXML, which is to say inside of XML, and we cannot use the  
character there, but must escape it.

 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySp ace.com
blog: http://smaskit. blogspot. com/



- Original Message 
From: Blair Cox [EMAIL PROTECTED] a.com
To: [EMAIL PROTECTED] ups.com
Sent: Thursday, July 31, 2008 9:19:46 AM
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify?


Just one more question. The zero works for me, but I’m sure I’ll be asked to 
make it blank. Any hints as to how this could be accomplished? Coming from the 
Flash side of things, all I would be looking to do is change the alpha value of 
the label to zero if the value was 0.


isNaN(mynumber) ? 0 :


-- 
Blair Cox

http://www.luminult ra.com






From: Sid Maskit [EMAIL PROTECTED] com
Reply-To: [EMAIL PROTECTED] ups.com
Date: Thu, 31 Jul 2008 07:51:38 -0700 (PDT)
To: [EMAIL PROTECTED] ups.com
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify?

 
 

If the format function is a custom function you have written, you could just 
have it check whether you like the result it is about to return, and if not, 
return something else. If that is not the case, I believe that you should be 
able to put tests into your binding statement. 

You could test for NaN with something like this:

mx:Label text={(myNumber is NaN) ? 0 : PrepForDispl ay.format( myNumber) }/

I'm not sure about infinity, but I assume that you can test for this by looking 
for the greatest possible value of the number. Assuming that you have set up 
the variable maxValue to contain that value, you should be able to do something 
like this:

mx:Label text={(myNumber  maxValue) ? 0 : PrepForDispl ay.format( myNumber) 
}/

If you put the two together, it would look something like this:

mx:Label text={(myNumber is NaN) ? 0 : (myNumber  maxValue) ? 0 : 
PrepForDispl ay.format( myNumber) }/

 
Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySp ace.com
blog: http://smaskit. blogspot. com/
 
 


  

Re: [flexcoders] NaN to return a string?

2008-07-31 Thread Sid Maskit
Sure, just replace the 0 with whatever text you want, putting it inside single 
quotes since the entire statement is inside of double quotes. Since you are 
setting the value of a label, what ever you put in is going to be cast to a 
string anyway.

 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: Blair Cox [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, July 31, 2008 9:27:02 AM
Subject: Re: [flexcoders] NaN to return a string?


Turns out showing a zero could be implied that the calculation was a zero. This 
is bad, especially if the result is actually zero. Is there any way to return a 
string rather than a number?


isNaN(mynumber) ? 0 :


-- 
Blair Cox

http://www.luminult ra.com






From: Sid Maskit [EMAIL PROTECTED] com
Reply-To: [EMAIL PROTECTED] ups.com
Date: Thu, 31 Jul 2008 07:51:38 -0700 (PDT)
To: [EMAIL PROTECTED] ups.com
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify?

 
 

If the format function is a custom function you have written, you could just 
have it check whether you like the result it is about to return, and if not, 
return something else. If that is not the case, I believe that you should be 
able to put tests into your binding statement. 

You could test for NaN with something like this:

mx:Label text={(myNumber is NaN) ? 0 : PrepForDispl ay.format( myNumber) }/

I'm not sure about infinity, but I assume that you can test for this by looking 
for the greatest possible value of the number. Assuming that you have set up 
the variable maxValue to contain that value, you should be able to do something 
like this:

mx:Label text={(myNumber  maxValue) ? 0 : PrepForDispl ay.format( myNumber) 
}/

If you put the two together, it would look something like this:

mx:Label text={(myNumber is NaN) ? 0 : (myNumber  maxValue) ? 0 : 
PrepForDispl ay.format( myNumber) }/

 
Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySp ace.com
blog: http://smaskit. blogspot. com/
  


  

Re: [flexcoders] NaN and Infinity showing in output - How to modify?

2008-07-31 Thread Blair Cox
Hmm, sorry the last post left a part out, it was shown lower down:

mx:Label ... text={isNaN(mynumber) ? 0 : PrepForDisplay.format(mynumber)}
... /

Adding the ³² as you stated, returns an error for mx:Label, ³² or ³/².
The zero is what is display in the application, if I could provide a short
string instead, it would be ideal. Even if the initial default text of the
label was ³whatever² until a calculated value was entered. But there are
many, many of these calculations to perform and I would like to find the
simplest answer. Close though, thanks for the help.

-- 
Blair 




From: Laurent Cozic [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Thu, 31 Jul 2008 09:28:51 -0700 (PDT)
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to
modify?

 
 

How about:

sNaN(mynumber) ? 0 : 
 
--
Laurent Cozic

Flash, Flex and Web Application development
http://pogopixels.com


- Original Message 
From: Blair Cox [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, July 31, 2008 5:19:46 PM
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to
modify?

 
 

Just one more question. The zero works for me, but I¹m sure I¹ll be asked to
make it blank. Any hints as to how this could be accomplished? Coming from
the Flash side of things, all I would be looking to do is change the alpha
value of the label to zero if the value was 0.


isNaN(mynumber) ? 0 :


-- 
Blair Cox

http://www.luminult ra.com http://www.luminultra.com
 





From: Sid Maskit [EMAIL PROTECTED] com
Reply-To: [EMAIL PROTECTED] ups.com http://ups.com 
Date: Thu, 31 Jul 2008 07:51:38 -0700 (PDT)
To: [EMAIL PROTECTED] ups.com
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to
modify?

 
 

If the format function is a custom function you have written, you could just
have it check whether you like the result it is about to return, and if not,
return something else. If that is not the case, I believe that you should be
able to put tests into your binding statement.

You could test for NaN with something like this:

mx:Label text={(myNumber is NaN) ? 0 : PrepForDispl ay.format( myNumber)
}/

I'm not sure about infinity, but I assume that you can test for this by
looking for the greatest possible value of the number. Assuming that you
have set up the variable maxValue to contain that value, you should be able
to do something like this:

mx:Label text={(myNumber  maxValue) ? 0 : PrepForDispl ay.format(
myNumber) }/

If you put the two together, it would look something like this:

mx:Label text={(myNumber is NaN) ? 0 : (myNumber  maxValue) ? 0 :
PrepForDispl ay.format( myNumber) }/

 
Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySp ace.com http://www.CraftySpace.com
blog: http://smaskit. blogspot. com/ http://smaskit.blogspot.com/
 
 


[flexcoders] Re: Detecting a click on an empty part of AdvancedDataGrid - SOLUTION

2008-07-31 Thread whatabrain
I found the solution to my problem. It depends on the fact 
that click is fired after itemClick.


var m_processingItemClick:Boolean = false;

private function onItemClick(event:ListEvent):void
{
processingItemClick = true;
}

private function onClick(event:MouseEvent):void
{
if (m_processingItemClick)
m_processingItemClick = false;
else
grid.selectedIndex = -1;
}


--- In flexcoders@yahoogroups.com, whatabrain [EMAIL PROTECTED] wrote:

 Also, when I change focus to another window and then back to the 
flex 
 app, mouseFocusChange stops firing. It never fires again after that.
 
 
 --- In flexcoders@yahoogroups.com, whatabrain junk1@ wrote:
 
  Thanks. That's very close to what I want. However, this method 
  disables multiple-select. It deselects items when you click 
  _anywhere_. I only want to deselect when you click on empty space.
  
  
  --- In flexcoders@yahoogroups.com, actionscript_czar daryl@ 
  wrote:
  
   
   Try using the mouseFocusChange event.  I've used it a few times 
 for
   deselecting items in a list when anywhere else is clicked.  For 
 your
   needs, you may have to adapt it but give it a try.
   
   I have a blog post about it at:
   
   http://my.opera.com/darylducharme/blog/2007/12/14/hidden-gems-
  mousefocus\
   change
   
   --- In flexcoders@yahoogroups.com, whatabrain junk1@ wrote:
   
I have an AdvancedDataGrid which has a few rows, and lots of 
 empty
space. When I click on the empty space, I want all the rows 
to 
 be
deselected. How do I detect that I've clicked in an empty 
space?
   
I tried using grid.getObjectsUnderPoint() in the click 
event, 
  but
   the
results aren't very useful. I guess I could depend on the 
fact 
  that
there are always more than three objects when I click on a 
real 
  row,
and exactly three when I click on empty space, but that seems 
  like a
bad thing to depend on. Who knows what future versions of 
Flex 
  will
   add
to the list?
   
There must be a better way!
   
Thanks.
   
  
 





Re: [flexcoders] NaN to return a string?

2008-07-31 Thread Blair Cox
Doh! Only way to get better at this is to keep working at it. Thanks for all
three of your great suggestions. The powers that be want a note, so we¹ll go
with that that. I¹ll find uses for the other options for sure.

Cheers!

-- 
Blair Cox




From: Sid Maskit [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Thu, 31 Jul 2008 09:43:06 -0700 (PDT)
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] NaN to return a string?

 
 

Sure, just replace the 0 with whatever text you want, putting it inside
single quotes since the entire statement is inside of double quotes. Since
you are setting the value of a label, what ever you put in is going to be
cast to a string anyway.
 


Try something like this:

mx:Label id=display text={(isNaN(myNumber as Number)) ? 0 :
PrepForDisplay.format(myNumber)} visible={display.text != '0' amp;amp;
display.text != 'In,fin,ity.00'}/

Note that you need to give the Label component and id, and use that id to
refer to it in your statements within braces.

By the way, as you are no doubt noticing, the larger point here is that
braces are not just for binding, but can contain all sorts of ActionScript.

Finally, the reason that there is amp;amp; instead of   is that we are
inside of MXML, which is to say inside of XML, and we cannot use the 
character there, but must escape it.

 
Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/




[flexcoders] Types in Web Services

2008-07-31 Thread Carlos Obregón
I have a method in java that returns an object of type T which has a
SetString

When I import the Web Service in Flex Builder 3, it creates a class T
with an atribute of type Array

When I call the method the Array always has size 0.

Is there anyway to fix this without having to change the type in the
Java code.

Thanks.



[flexcoders] Re: NaN and Infinity showing in output - How to modify?

2008-07-31 Thread zyzzx00_99
to possibly help in the vague understanding, the ()?: stuff is an
inline if statement.  (mynum  maxval) ?  is like saying If mynum is
greater than maxval.  : is the else.

re your errors: from eyeballing everything, numberformatter.format
returns a string (control click into .format in flexbuilder to see
the framework code).  I could be making this up, but NaN might be a
class too, so it is probably the cause of your coercion error.  I
would break out everything into a function that returns a string (for
the text property of your label), so the last part would be return
PrepForDisplay.format(mynum).toString() (or as String).

Good Luck
Jeremy



--- In flexcoders@yahoogroups.com, Blair Cox [EMAIL PROTECTED] wrote:

 Hi Sid, thanks for the reply. I tried your first solution since I
did not
 create a custom function and it returns;
 
 1067: Implicit coercion of value of type Number to an unrelated type
Class
 
 I have a vague understanding of what is occurring here. Any way
around it?
 How difficult would it be to modify or create a custom function?
 
 What I have now is simply:
 
 mx:NumberFormatter id=PrepForDisplayprecision=2
 rounding=updecimalSeparatorTo=.   
thousandsSeparatorTo=,
 useThousandsSeparator=trueuseNegativeSign=true/
 
 -- 
 Blair Cox
 
 http://www.luminultra.com
  
 
 From: Sid Maskit [EMAIL PROTECTED]
 Reply-To: flexcoders@yahoogroups.com
 Date: Thu, 31 Jul 2008 07:51:38 -0700 (PDT)
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] NaN and Infinity showing in output - How to
 modify?
 
  
  
 
 If the format function is a custom function you have written, you
could just
 have it check whether you like the result it is about to return, and
if not,
 return something else. If that is not the case, I believe that you
should be
 able to put tests into your binding statement. 
 
 You could test for NaN with something like this:
 
 mx:Label text={(myNumber is NaN) ? 0 : PrepForDispl ay.format(
myNumber)
 }/
 
 I'm not sure about infinity, but I assume that you can test for this by
 looking for the greatest possible value of the number. Assuming that you
 have set up the variable maxValue to contain that value, you should
be able
 to do something like this:
 
 mx:Label text={(myNumber  maxValue) ? 0 : PrepForDispl ay.format(
 myNumber) }/
 
 If you put the two together, it would look something like this:
 
 mx:Label text={(myNumber is NaN) ? 0 : (myNumber  maxValue) ? 0 :
 PrepForDispl ay.format( myNumber) }/
 
  
 Sid Maskit
 Partner 
 CraftySpace
 Better Websites for a Better World
 http://www.CraftySpace.com
 blog: http://smaskit.blogspot.com/





[flexcoders] SQL crashing program

2008-07-31 Thread Josh Millstein
I have this weird deal going on right now.  I'm running through a for loop
creating a bunch of sql statements (within an exclusive transaction) with
eventlisteners for the results and errors.  The result eventlistener is
relaying the status of the progress through the sql statements (record x of
y inserted).  The program crashes when I run the program, but when I put
code in the result eventlistener to write sql.text to a file (trying to see
if there is a bad sql statement crashing the program) it stopped the program
from crashing and everything works well.  I don't understand why that would
be.  The only thing I can think of is that there is some timing issue that
I'm skirting around with writing to a file in between each sql statement.
Does anybody have any idea why putting the code to write to a dblog file
would make the program work?  I'm sure it's is just that piece of code as
well.  Comment it and it crashes, put it back and it works.

Weird.

 
-- 
[EMAIL PROTECTED]




RE: [flexcoders] How do we implement pop-up input in Flex?

2008-07-31 Thread Alex Harui
My code usually listens to the popup for its closeevent and pulls data
from the popup.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Joshua Jackson
Sent: Thursday, July 31, 2008 9:15 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How do we implement pop-up input in Flex?

 

Dear all,

I want to have a popup input in my flex apps where the values in the
popup window will be set to the parent window that calls this popup
window. How do we set the variable chosen to the parent window in
Flex? Could anyone give me a hint on these please.

Many thanks

-- 
Setting a new landmark.

Blog: http://joshuajava.wordpress.com/
http://joshuajava.wordpress.com/ 

 



Re: [flexcoders] SQL crashing program

2008-07-31 Thread Sid Maskit
How about posting the relevant code. Also, am I right in assuming that this is 
in AIR, and that you are using its local database?

 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: Josh Millstein [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com
Sent: Thursday, July 31, 2008 9:59:09 AM
Subject: [flexcoders] SQL crashing program


I have this weird deal going on right now.  I'm running through a for loop
creating a bunch of sql statements (within an exclusive transaction) with
eventlisteners for the results and errors.  The result eventlistener is
relaying the status of the progress through the sql statements (record x of
y inserted).  The program crashes when I run the program, but when I put
code in the result eventlistener to write sql.text to a file (trying to see
if there is a bad sql statement crashing the program) it stopped the program
from crashing and everything works well.  I don't understand why that would
be.  The only thing I can think of is that there is some timing issue that
I'm skirting around with writing to a file in between each sql statement.
Does anybody have any idea why putting the code to write to a dblog file
would make the program work?  I'm sure it's is just that piece of code as
well.  Comment it and it crashes, put it back and it works.

Weird.

-- 
[EMAIL PROTECTED] .com

 


  

RE: [flexcoders] How do we implement pop-up input in Flex?

2008-07-31 Thread Tracy Spratt
An event is probably the easiest way.  Implement public propertie(s) on
the popup component that contain your data, dispatch a named event (does
not need to be a custom event), then in the handler, access the data
using event.target.myPublicProperty.

 

There are also ways to set values directly.

http://www.cflex.net/showFileDetails.cfm?ObjectID=558

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Joshua Jackson
Sent: Thursday, July 31, 2008 12:15 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How do we implement pop-up input in Flex?

 

Dear all,

I want to have a popup input in my flex apps where the values in the
popup window will be set to the parent window that calls this popup
window. How do we set the variable chosen to the parent window in
Flex? Could anyone give me a hint on these please.

Many thanks

-- 
Setting a new landmark.

Blog: http://joshuajava.wordpress.com/
http://joshuajava.wordpress.com/ 

 



RE: [flexcoders] Re: Can we subclass Application yet?

2008-07-31 Thread Alex Harui
So you can use the defaultProperty trick, but I'd just subclass in AS
and add the toolbar there.  Should be less painful.

 

I don't answer chart questions.  Gotta have limits ;-)

 

Hopefully one of the chart engineers will respond.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of chigwell23
Sent: Thursday, July 31, 2008 8:12 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Can we subclass Application yet?

 

Hi Alex, yes in MXML - since we have a debug toolbar that appears on
every view based on a flag, I wanted to put this visual component on
the base Application class along with common public vars etc. Public
vars etc work fine, but it seems as though you cannot put any visual
mxml components on the base class.

Shameless plug - if anyone knows you will :-) please please please
could you look at my params to callback renderer question? Am about to
resend rephrased in specific chart context. TIA, Mic.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Alex Harui [EMAIL PROTECTED] wrote:

 You can certainly subclass Application via AS. Are you trying to do it
 in MXML?
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of chigwell23
 Sent: Wednesday, July 30, 2008 11:51 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Can we subclass Application yet?
 
 
 
 As far as I can tell the Flex2 problems with subclassing Application
 still exist in Flex3 i.e. bye-bye mxml components on parent class? Is
 this correct and has anybody worked around this? TIA,
 
 Mic.


 



RE: [flexcoders] Re: Type Cast Error

2008-07-31 Thread Alex Harui
These are the kinds of problems that result from the shared code problem
The Flash Player can't handle multiple mappings of different classes
for deserialization.  Don't try to fight it, either put the VO's in the
main app or create a shared code module.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of donald_d_hook
Sent: Thursday, July 31, 2008 8:01 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Type Cast Error

 

Alex - after tracing this through, the first time into the page, I do
a request to get the stock objects. They are retrieved properly and
displayed. I go into a chart module, get some other items and display
that page. When I go back into the 1st page (or module) it looks as
though the object is not getting serialized properly. I have a
BackTestStock object with a BackTest Object and Stock object in it. 
The BackTest is ok, but the stock object is null - so it looks like it
is not getting serialized properly for whatever reason. The first
time it does, but not the second time. 

Thanks ...

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Alex Harui [EMAIL PROTECTED] wrote:

 Essentially, the actuall classname isn't StockVO, it is
 [EMAIL PROTECTED] If the portion
 after the @ matches it is effectively stripped off so you can just see
 and use StockVO in most places
 
 
 
 So it doesn't really match. This will be extremely useful in Flex 3.2
 when you can mix sub-application built with different versions of
Flex,
 but is a pain for module users like yourself.
 
 
 
 Of course, the easiest way to use StockVO in both modules is to get it
 linked into the main app. Most VOs are small so it won't matter. The
 SharedCode Module pattern is for heavy things.
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of donald_d_hook
 Sent: Wednesday, July 30, 2008 5:52 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: Type Cast Error
 
 
 
 Alex - 
 
 I looked at your presentation. I am using the StockVO in both pages
 (both modules). I need to use it in both. If I define the class in
 both places, what does it matter, its the same class? 
 
 I saw where you mentioned having common code by loading a Shared
 Code swf that would apply to ALL modules. I guess I can give that a
 shot.
 
 Thanks again for your time! 
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  It is picking up the class from a different application domain. See
 the
  modules presentation on my blog.
  
  
  
  
  
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of donald_d_hook
  Sent: Wednesday, July 30, 2008 10:22 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Type Cast Error
  
  
  
  I receive a type cast error when I try to cast an object I received
  from the server (an arraycollection of value objects). I get the
  following: 
  
  TypeError: Error #1034: Type Coercion failed: cannot convert
  com.spinnaker.model::[EMAIL PROTECTED] to com.spinnaker.model.StockVO
  
  The actionscript object has the correct remoteClass. On top of that,
  this only happens the 2nd time into the page. Not sure what is
  happening behind the scenes, nor do I know what the @3b392b81 is.
  
  Thanks in advance
 


 



RE: [flexcoders] Keyboard navigating through List's item renderers

2008-07-31 Thread Alex Harui
You're headed in the right direction.  I think you have to implement
IFocusManagerComponent on the renderer, and handle KEY_FOCUS_CHANGE.
FWIW, I wouldn't use a Form since it is pretty heavy.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of mydarkspoon
Sent: Thursday, July 31, 2008 7:31 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Keyboard navigating through List's item renderers

 

Hi,
I have a list that renders meta data about images (title  tags).
This list uses a Form with 2 TextInput controls as an item renderer.

The user should be able to navigate through the input fields using
either the mouse or the tab key.

The List default behavior when editable=true is to set the focus to
the renderers themselves, but not to their sub components, so the Form
itself will have a focus rectangle but not the TextInput controls.

What I tried to do is to override the setFocus() on the Form
subcomponent and move the focus to the first TextInput and on that
TextInput focusOut set its focus to the 2nd TextInput.
That didn't work as expected, and even if it did, I'm sure the is a
better way to achieve this behavior.

Thank you,
Almog Kurtser
http://www.mostlyflex.com http://www.mostlyflex.com 

 



RE: [flexcoders] Re: Type Cast Error

2008-07-31 Thread Alex Harui
The shared code module won't require any getters.  It is effective an
RSL that goes in the main app so all modules can use it w/o any changes.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of donald_d_hook
Sent: Thursday, July 31, 2008 6:37 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Type Cast Error

 

Alex - 

So I should define the class in one spot - i.e. the shared code mxml,
then use some getters defined in the main app to use that instance or
definition in the module.

Thanks again for your assistance!!

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Alex Harui [EMAIL PROTECTED] wrote:

 Essentially, the actuall classname isn't StockVO, it is
 [EMAIL PROTECTED] If the portion
 after the @ matches it is effectively stripped off so you can just see
 and use StockVO in most places
 
 
 
 So it doesn't really match. This will be extremely useful in Flex 3.2
 when you can mix sub-application built with different versions of
Flex,
 but is a pain for module users like yourself.
 
 
 
 Of course, the easiest way to use StockVO in both modules is to get it
 linked into the main app. Most VOs are small so it won't matter. The
 SharedCode Module pattern is for heavy things.
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of donald_d_hook
 Sent: Wednesday, July 30, 2008 5:52 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: Type Cast Error
 
 
 
 Alex - 
 
 I looked at your presentation. I am using the StockVO in both pages
 (both modules). I need to use it in both. If I define the class in
 both places, what does it matter, its the same class? 
 
 I saw where you mentioned having common code by loading a Shared
 Code swf that would apply to ALL modules. I guess I can give that a
 shot.
 
 Thanks again for your time! 
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  It is picking up the class from a different application domain. See
 the
  modules presentation on my blog.
  
  
  
  
  
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of donald_d_hook
  Sent: Wednesday, July 30, 2008 10:22 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Type Cast Error
  
  
  
  I receive a type cast error when I try to cast an object I received
  from the server (an arraycollection of value objects). I get the
  following: 
  
  TypeError: Error #1034: Type Coercion failed: cannot convert
  com.spinnaker.model::[EMAIL PROTECTED] to com.spinnaker.model.StockVO
  
  The actionscript object has the correct remoteClass. On top of that,
  this only happens the 2nd time into the page. Not sure what is
  happening behind the scenes, nor do I know what the @3b392b81 is.
  
  Thanks in advance
 


 



RE: [flexcoders] Re: Sorting an XMLList on an attribute

2008-07-31 Thread Tracy Spratt
Yes, you really should not use XMLList as a dataProvider.  *It is not
bindable* and does not dispatch the necessary events to update the UI.
By the way, this is clearly stated in the docs, and I repeat it on this
list very often.  (Do not use Array, for the same reason)

 

You need to make the change now, it will not get any better.  Also, I
suggest you use XML for the tree dataProvider.  It is inherently
hierarchical, instead of the nested lists you get with
XMLListCollection.  You can still break out a node into an XMLList or
XMLListCollection as needed in the code. Just a matter of taste, though.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of gaurav1146
Sent: Thursday, July 31, 2008 1:39 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Sorting an XMLList on an attribute

 

Hi Tracy,
 Thanks a lot for replying. That cleared a lot of my confusion between
XMLList and XMLListCollection. Based on your example I am able to sort
the XMLList. But there is one issue I observed. I have to reset my tree
dataProvider after sorting the XMLList (tree.dataProvider = booksList).
If I do not do that certain duplicate values start appearing in the tree
on multiple invocations of sort. I am not sure whats causing this as the
actual tree dataProvider (bookList) always remains in a consistent state
even after multiple invocations of the sort. My dataProvider is Bindable
so should not tree always represent the current state of the
dataProvider (bookList) without my resetting the dataProvider. Please
let me know if I am missing something.

 Following is my complete code:


?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
mx:Script
![CDATA[
import mx.collections.XMLListCollection;
import mx.collections.SortField;
import mx.collections.Sort;
private var books:XML = books
book publisher=Addison-Wesley name=Design
Patterns /
book publisher=Addison-Wesley name=The
Pragmatic Programmer /
book publisher=Addison-Wesley name=Test
Driven Development /
book publisher=Addison-Wesley
name=Refactoring to Patterns /
book publisher=O'Reilly Media name=The
Cathedral  the Bazaar /
book publisher=O'Reilly Media name=Unit Test
Frameworks /
/books;
   [Bindable]
   private var booksList:XMLList = books.children();
   private function sortBooks():void
{
var sort:Sort = new Sort();
sort.fields = [new  SortField(@name)];
trace(**Before
Sort);
  trace(booksList);
var booksCollection:XMLListCollection = new
XMLListCollection(booksList);
booksCollection.sort = sort;
booksCollection.refresh();
var sortedCollection:XMLListCollection = new
XMLListCollection();
  for(var i:Number=0; i  booksCollection.length; i++)
  {
 
sortedCollection.addItemAt(booksCollection.getItemAt(i),i);
  }
  booksList = sortedCollection.source;
 //Commenting out the following line causes duplicate values
to appear in the tree
 tree.dataProvider = booksList;
  trace(**After
Sort);
  trace(booksList);
   }

]]
/mx:Script
mx:VBox
mx:Tree id=tree dataProvider={booksList}
labelField=@name/
mx:Button click=sortBooks() label=Sort books/
/mx:VBox
/mx:Application




Regards,
Gaurav




--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 Ok. Here is a function I use to sort the children of an xml node.
 
 
 
 /** Sorts an xml node's children on a single attribute
 
 * Returns a copy of the xml node with the children in the sorted
 order */
 
 public static function sortChildren(xml:XML, 
 
 sAttrName:String, 
 
 bCaseInsensitive:Boolean=true, 
 
 bDescending:Boolean=true):XML
 
 {
 
 var xmlReturn:XML;
 
 if (xml != null) {
 
 xmlReturn = xml.copy(); //copy to get the root node. We will
 replace the children
 
 xml = xml.copy(); //copy so we can append the
 children to the return xml directly
 
 var xlcChildren:XMLListCollection = new
 XMLListCollection(xml.children());
 
 var xlChildren:XMLList;
 
 var xlcSorted:XMLListCollection = new XMLListCollection();
 
 var sort:Sort = new Sort(); // Create the Sort instance.
 
 sort.fields = [new
 SortField(sAttrName,bCaseInsensitive,bDescending)]; // Both fields are
 case-insensitive.
 
 xlcChildren.sort = sort; // Assign the Sort object to
 the collection.
 
 xlcChildren.refresh(); // Apply the sort to the
 collection.
 
 for (var i:int=0;ixlcChildren.length;i++) 

[flexcoders] Re: Chart: pass info about series1 to series2 lineSegmentRenderer callback?

2008-07-31 Thread chigwell23
Hi Laurent,

Yes true, but the data passed to the renderer is only the data for the
 associated series, and I also need the data for the first series in
order to do my calcs within the renderer :-(

--- In flexcoders@yahoogroups.com, Laurent Cozic [EMAIL PROTECTED] wrote:

 Normally, the way to pass parameters to the item renderer is through
its data property. So just make sure that your data provider
contains whatever information you need to set the item renderer position.
 
  -- Laurent Cozic
 
 
 Flash, Flex and Web Application development 
 http://pogopixels.com
 
 
 
 - Original Message 
 From: chigwell23 [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Thursday, July 31, 2008 4:33:54 PM
 Subject: [flexcoders] Chart: pass info about series1 to series2
lineSegmentRenderer callback?
 
 
 First question is whether I can pass actual parameters to a callback
 in the first place? This is what I need to do:
 
 mx:ColumnSeries id=salesSeries
 yField=sales 
 /mx:ColumnSeries
 
 mx:LineSeries id=percSeries
 yField=percent 
 lineSegmentRenderer =PercentLineRen derer(orig callback params,
 new  callback params)
 /mx:LineSeries
 
 Conventionally of course the lineSegmentRenderer gets no params as a
 callback. But in this instance I need to manipulate the position of
 the  percent line series lines through the renderer based on sales
 series data so that the lines are positioned exactly over the columns
 of the sales series. I have code in the renderer that positions the
 lines, but different underlying data for the column series (2 side by
 side cols for each data point), changes the width and horizontal
 position of the columns and then the percent line fragments above no
 longer line up.
 
 If I could get the sales series info to the percent series
 renderer I think I stand a chance of coding interacting series
 
 A big thank you in advance,
 
 Mic.





RE: [flexcoders] Load Complete on tilelist

2008-07-31 Thread Alex Harui
You'l lhave to write that method yourself.  Listen for complete events
from the image controls

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of David Gironella
Sent: Thursday, July 31, 2008 5:36 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Load Complete on tilelist

 

I have a tilelist with a dataprovider from an httpservice. I each item
render I load an image.

 

Exists some method to know when all images are complete loaded? I can
use some events on tilelist to know this.

 

Thanks.

 

Giro.

 



[flexcoders] dataGrid null with state change

2008-07-31 Thread netdeep
I have a custom component with various fields and buttons. At times during my 
application, 
these components are added to the main window. The data for the fields is 
generated from 
another custom component with information like strings, arrays, etc. The 
problem I'm having 
is with databinding an array from my data component to a DataGrid in the custom 
fields 
component. 

Why does my DataGrid show up as null during debugging after I have set the 
state so it is 
will be visible?  More importantly how to I get the DataGrid object to show the 
array data? 





Re: [flexcoders] Re: Chart: pass info about series1 to series2 lineSegmentRenderer callback?

2008-07-31 Thread Johannes Nel
i think you are making your own life difficult. calculate the values before
hand and render it then instead of trying to do it while you render,

On Thu, Jul 31, 2008 at 7:26 PM, chigwell23 [EMAIL PROTECTED] wrote:

   Hi Laurent,

 Yes true, but the data passed to the renderer is only the data for the
 associated series, and I also need the data for the first series in
 order to do my calcs within the renderer :-(


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Laurent
 Cozic [EMAIL PROTECTED] wrote:
 
  Normally, the way to pass parameters to the item renderer is through
 its data property. So just make sure that your data provider
 contains whatever information you need to set the item renderer position.
 
  -- Laurent Cozic
 
 
  Flash, Flex and Web Application development
  http://pogopixels.com
 
 
 
  - Original Message 
  From: chigwell23 [EMAIL PROTECTED]
  To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
  Sent: Thursday, July 31, 2008 4:33:54 PM
  Subject: [flexcoders] Chart: pass info about series1 to series2
 lineSegmentRenderer callback?
 
 
  First question is whether I can pass actual parameters to a callback
  in the first place? This is what I need to do:
 
  mx:ColumnSeries id=salesSeries
  yField=sales 
  /mx:ColumnSeries
 
  mx:LineSeries id=percSeries
  yField=percent
  lineSegmentRenderer =PercentLineRen derer(orig callback params,
  new callback params)
  /mx:LineSeries
 
  Conventionally of course the lineSegmentRenderer gets no params as a
  callback. But in this instance I need to manipulate the position of
  the percent line series lines through the renderer based on sales
  series data so that the lines are positioned exactly over the columns
  of the sales series. I have code in the renderer that positions the
  lines, but different underlying data for the column series (2 side by
  side cols for each data point), changes the width and horizontal
  position of the columns and then the percent line fragments above no
  longer line up.
 
  If I could get the sales series info to the percent series
  renderer I think I stand a chance of coding interacting series
 
  A big thank you in advance,
 
  Mic.
 

  




-- 
j:pn
\\no comment


[flexcoders] Re: NaN and Infinity showing in output - How to modify?

2008-07-31 Thread Amy
--- In flexcoders@yahoogroups.com, Sid Maskit [EMAIL PROTECTED] wrote:

 Try something like this:
 
 mx:Label id=display text={(isNaN(myNumber as Number)) ? 0 : 
PrepForDisplay.format(myNumber)} visible={display.text != '0' 
amp;amp; display.text != 'In,fin,ity.00'}/
 
 Note that you need to give the Label component and id, and use that 
id to refer to it in your statements within braces.
 
 By the way, as you are no doubt noticing, the larger point here is 
that braces are not just for binding, but can contain all sorts of 
ActionScript.

The braces actually _are_ executing a binding here, as they will do 
something different when the value of the variable changes.  If the 
value was not expected to change, you could do the same without the 
braces.

HTH;

Amy



[flexcoders] Adding parameters to a control's definition

2008-07-31 Thread whatabrain
If I extend a control, how do I allow new parameters in the instance's 
mxml definition? For example, how would I make this possible:

my::MyCustomDataGrid myCustomEvent=doStuff(event) 
myCustomParam=true/



[flexcoders] Re: Load Complete on tilelist

2008-07-31 Thread zyzzx00_99
Really?  Why can't you just use the result event and set
result=functionName on HTTPService?


--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 You'l lhave to write that method yourself.  Listen for complete events
 from the image controls
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of David Gironella
 Sent: Thursday, July 31, 2008 5:36 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Load Complete on tilelist
 
  
 
 I have a tilelist with a dataprovider from an httpservice. I each item
 render I load an image.
 
  
 
 Exists some method to know when all images are complete loaded? I can
 use some events on tilelist to know this.
 
  
 
 Thanks.
 
  
 
 Giro.





[flexcoders] Re: Text components of Gumbo

2008-07-31 Thread haykelbj
Hi Gordon,

thank you for these explanations! Now I have a better overview on
what's going on.

So I started my tests and I will use this thread to share my
experiences (tell me if there's a better place).

I found some problems that I will submit in the Flex Bug System. I
already submitted one (https://bugs.adobe.com/jira/browse/SDK-16315),
more is coming :)

Some questions that raised during my explorations:
1. What's the difference between TextBox and TextGraphic?
2. Why TextBox doesn't support the 'direction' property?
2. Why setting properties of TextArea's and TextIput's textView are
not applied until the content is changed? Is this a bug or am I doing
it the wrong way?

That's it for now :)

Haykel


--- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote:

 Hi, Haykel.
 
  
 
 In current builds of Gumbo, you can set all FXG text attributes (plus
 verticalAlign) on what we consider the Gumbo text primitives: TextBox,
 TextGraphic, and TextView. You have to currently set them as properties,
 not CSS styles; support for CSS will come later, probably within a month
 or two.
 
  
 
 Higher-level components like the Gumbo Button, TextInput, TextArea, etc.
 do not yet support setting text attributes. You have to work on the
 primitive in their skin. This will be fixed in the same time frame.
 
  
 
 Astro's text engine is known as FTE (Flash Text Engine). It does not
 support a markup language. TCAL, the Text Component ActionScript
 Library, which implemented in the three text_xxx SWCs, adds support for
 a markup language which is a superset of FXG. I'm not sure whether we
 have published the spec for FXG or not yet. (Do you know?) I don't think
 we have a spec for the superset that TCAL supports, but you can see
 TCAL's API by looking at the ASDoc for the text.* packages in the Gumbo
 ASDoc at http://livedocs.adobe.com/flex/gumbo/langref/.
 
  
 
 I'm happy to hear that you're interested in Gumbo's text features. I'm
 the engineer who is integrating FTE and TCAL into the Flex framework.
 
  
 
 Gordon Smith
 
 Adobe Flex SDK Team
 




Re: [flexcoders] Re: NaN and Infinity showing in output - How to modify?

2008-07-31 Thread Sid Maskit
I think I see your point here, and I guess that I have not made mine clearly 
enough, so here is a little more on this.

When we say text={myNumber}, we are really setting up whatever is within the 
braces as an event handler for the event dispatched whenever myNumber changes. 
If we think of binding as setting up that relationship, then yes, everything in 
this thread is using binding. However, I think it is common for beginners to 
think of that statement as binding the text attribute to the latest value of 
myNumber, and to think of binding as doing no more than such assignments.

I think it is important part of learning flex to realize that one can do much 
more than that. In the largest sense, one can do almost anything that is 
possible with a single ActionScript statement, so long as it returns a valid 
value for the attribute to which it is assigned, in this case the text 
attribute. For example, one could do something rather complicated, like this:

text={(myNumber != 0) ? myFunction() : myOtherFunction()}

So long as both functions returned a value that could be validly assigned to 
the text attribute, this approach is valid, and we can obviously do any valid 
ActionScript within either function. I'm not sure that this approach would be a 
best practice, but the point is that we are doing a lot more than simply taking 
the value of myNumber and assigning it to text.

Finally, although I do not think you meant to imply this, I think it is worth 
saying that one cannot use ActionScript within an assignment to an MXML 
attribute without using braces. Well, one can, but it will be treated as a 
string, not as code to be run.
 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: Amy [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, July 31, 2008 10:47:30 AM
Subject: [flexcoders] Re: NaN and Infinity showing in output - How to modify?


--- In [EMAIL PROTECTED] ups.com, Sid Maskit [EMAIL PROTECTED]  wrote:

 Try something like this:
 
 mx:Label id=display text={(isNaN( myNumber as Number)) ? 0 : 
PrepForDisplay. format(myNumber) } visible={display. text != '0' 
amp;amp; display.text != 'In,fin,ity. 00'}/
 
 Note that you need to give the Label component and id, and use that 
id to refer to it in your statements within braces.
 
 By the way, as you are no doubt noticing, the larger point here is 
that braces are not just for binding, but can contain all sorts of 
ActionScript.

The braces actually _are_ executing a binding here, as they will do 
something different when the value of the variable changes.  If the 
value was not expected to change, you could do the same without the 
braces.

HTH;

Amy

 


  

[flexcoders] Re: Any future plans to support ODBC Connections for AIR applications?

2008-07-31 Thread pbrendanc
I understand the tcp approach but that's just a really
roundabout/indirect approach vs a direct db connection of some sort
(maybe native drivers if ODBC is not your thing - again look at the
Python libraries) .

I'd be curious to hear the official Adobe position on this and whether
this is a feature they may offer in the future. Since AIR allows access
to the file system (XML or csv text files only AFAIK) I can see folks
asking for other access to other file types (e.g. MS Excel).  I can also
understand that Adobe may see this somewhat problematic from a
marketing/product positioning/support standpoint.

FWIW I don't think this issue will go away if AIR gets real traction in
the market place. There are just so many desktop database apps out there
that are begging to be web enabled.

Just my $0.02c-
Patrick



--- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote:

 That being said, I know you can do ODBC over tcp, so if you've got
some sort
 of server available that can route from odbc over tcp to a local file
DSN,
 you could probably write a socket ODBC client for AIR, and then charge
 people in your position a fortune to use it. People stuck in
Windows-world
 seem to be used to that sort of thing. Sounds like pain though :D

 -Josh

 On Thu, Jul 31, 2008 at 5:45 PM, Josh McDonald [EMAIL PROTECTED] wrote:

  It's pretty evil. I'd just ship a 30-lines-of-c# utility to pull the
data
  out and put it in something standard that your air app can
understand.
 
  -Josh
 
 
 


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

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





Re: [flexcoders] applet on top of flash?

2008-07-31 Thread ibo
for the benefit of other flex devs integrating applets / dhtml,
on the object tag of your swf, just add param name=wmode 
value=transparent/ as parameter.
As expected, the YUI Panel worked seamlessly.



- Original Message 
From: ibo [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, July 31, 2008 11:00:12 AM
Subject: [flexcoders] applet on top of flash?


Anyone tried displaying applet on top of flex/flash? Can someone pls point me a 
link to an example demo?
I did a search on this topic and Ive read that its possible to do so but 
couldnt find an working example.
I want it to be displayed as seamless as possible and dont want to open a new 
browser window (using navigateToURL) .
I modified the index.template. html so that It can load the applet and float it 
on top of the flex app
but it wont render the html panel. Im using Yahoo UI Panel btw.

-Stephen


[flexcoders] Selecting an Editor for a DataGridColumn at runtime - how?

2008-07-31 Thread garyq22
Hello Group

I would like to select an Editor for each cell in my DataGrid
depending on other data values that might be in the same row.

I believe I can use the itemEditBegin event to assign and create my
chosen editor. I've got this far and I'm well stuck.

I know the following doesn't work - I just posted it to show that I am
trying :-)

Any assistance greatly appreciated!

private function onItemEditBegin(event:DataGridEvent):void
{
 var dgc:DataGridColumn;
 dgc = 
event.currentTarget.columns[event.currentTarget.editedItemPosition.columnIndex];
 if (dgc != null)
 {
  dgc.itemEditor = IFactory(mx.controls.NumericStepper);
  event.currentTarget.createItemEditor();
 }
}



[flexcoders] Re: Chart: pass info about series1 to series2 lineSegmentRenderer callback?

2008-07-31 Thread chigwell23
Hi Johannes,

The actual data to chart is of course already provided to the 2 series
via the dataprovider - the reason I need series 2 renderer to know
about series 1 is in order to position the line segments exactly above
the series 1 columns as Flex auto adjusts those column positions based
on underlying data/position of the moon etc :-)

--- In flexcoders@yahoogroups.com, Johannes Nel [EMAIL PROTECTED]
wrote:

 i think you are making your own life difficult. calculate the values
before
 hand and render it then instead of trying to do it while you render,
 
 On Thu, Jul 31, 2008 at 7:26 PM, chigwell23 [EMAIL PROTECTED] wrote:
 
Hi Laurent,
 
  Yes true, but the data passed to the renderer is only the data for the
  associated series, and I also need the data for the first series in
  order to do my calcs within the renderer :-(
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Laurent
  Cozic pogopixels@ wrote:
  
   Normally, the way to pass parameters to the item renderer is through
  its data property. So just make sure that your data provider
  contains whatever information you need to set the item renderer
position.
  
   -- Laurent Cozic
  
  
   Flash, Flex and Web Application development
   http://pogopixels.com
  
  
  
   - Original Message 
   From: chigwell23 chigwell23@
   To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
   Sent: Thursday, July 31, 2008 4:33:54 PM
   Subject: [flexcoders] Chart: pass info about series1 to series2
  lineSegmentRenderer callback?
  
  
   First question is whether I can pass actual parameters to a callback
   in the first place? This is what I need to do:
  
   mx:ColumnSeries id=salesSeries
   yField=sales 
   /mx:ColumnSeries
  
   mx:LineSeries id=percSeries
   yField=percent
   lineSegmentRenderer =PercentLineRen derer(orig callback params,
   new callback params)
   /mx:LineSeries
  
   Conventionally of course the lineSegmentRenderer gets no params as a
   callback. But in this instance I need to manipulate the position of
   the percent line series lines through the renderer based on
sales
   series data so that the lines are positioned exactly over the
columns
   of the sales series. I have code in the renderer that
positions the
   lines, but different underlying data for the column series (2
side by
   side cols for each data point), changes the width and horizontal
   position of the columns and then the percent line fragments
above no
   longer line up.
  
   If I could get the sales series info to the percent series
   renderer I think I stand a chance of coding interacting series
  
   A big thank you in advance,
  
   Mic.
  
 
   
 
 
 
 
 -- 
 j:pn
 \\no comment





RE: [flexcoders] Re: Load Complete on tilelist

2008-07-31 Thread Alex Harui
I assumed the images were also being externally loaded in response to
the result from the server

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of zyzzx00_99
Sent: Thursday, July 31, 2008 11:17 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Load Complete on tilelist

 

Really? Why can't you just use the result event and set
result=functionName on HTTPService?

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Alex Harui [EMAIL PROTECTED] wrote:

 You'l lhave to write that method yourself. Listen for complete
events
 from the image controls
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of David Gironella
 Sent: Thursday, July 31, 2008 5:36 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Load Complete on tilelist
 
 
 
 I have a tilelist with a dataprovider from an httpservice. I each item
 render I load an image.
 
 
 
 Exists some method to know when all images are complete loaded? I can
 use some events on tilelist to know this.
 
 
 
 Thanks.
 
 
 
 Giro.


 



[flexcoders] LCDS - Tomcat - JOTM Integration

2008-07-31 Thread Geoffrey
After a couple days of fussing around, I was able to successfully
integrate JOTM into our webapp, and thought that I'd share what I did.
 Hopefully it will be useful to someone else.


Environment:
Eclipse 3.3.1.1
Tomcat 6.0.16
LCDS 2.5.1
JOTM 2.0.10


Installation:
1) Download JOTM 2.0.10 from http://forge.objectweb.org/projects/jotm/
if you don't already have it.
2) Unzip to c:\
3) Link those jars to Tomcat
a. Double-click Tomcat definition in the Servers tab of Eclipse.
b. Click Open launch configuration.
c. Select the Classpath tab.
d. Select User Entries, and then Add External JARs.
e. Navigate to C:\jotm-2.0.10\lib.
f. Select all classes except commons-logging.jar and log4j.jar.
g. Apply the changes and exit Tomcat properties.
h. (optional) test JOTM installation by starting the server and
accessing the below JSP file*.  Success will be obvious.
4) Edit your META-INF\context.xml to include the following line:
Transaction name=UserTransaction auth=Container
factory=org.objectweb.jotm.UserTransactionFactory jotm.timeout=60/


You should now be able to perform create, delete, and update
operations on a managed collection of a DataService.


* Optional JSP file(I got this from someone in this forum, but can't
remember who)
%@ page import=javax.transaction.UserTransaction %
%@ page import=javax.naming.InitialContext %
%@ page import=javax.naming.Context %
[EMAIL PROTECTED] import=javax.naming.NamingException%
body
startbr/
%
try
{
Context ctx = new InitialContext();
 
String userTransactionJndi = java:comp/UserTransaction;
String userSpecified = System.getProperty(UserTxJndiName);
if (userSpecified != null)
{
userTransactionJndi = userSpecified;
}
UserTransaction userTransaction = (UserTransaction)
ctx.lookup(userTransactionJndi);
if (userTransaction != null)
{
userTransaction.begin();
out.println(begin ok!br);
userTransaction.commit();
out.println(commit ok!br);
}
else
{
out.println(Context returned null userTransaction);
}
}
catch (NamingException ne)
{
out.println(ne.toString());
}
catch (Exception e)
{
out.println(e.toString());
}
%
done
/body



[flexcoders] Can see series[0].seriesRenderData in debug - cannot code to it?

2008-07-31 Thread chigwell23
Hi all,

Thanks very much for all your help so far ... I am now accessing the
chart object from within the line renderer with:

override protected function updateDisplayList(unscaledWidth:Number,
 
unscaledHeight:Number):void
{

var lc:ColumnChart;
var ls:LineSeries = parent as LineSeries;
lc = ls.owner as ColumnChart;

In examining debug, I found

lc.series[0].seriesRenderData of type ColumnSeriesRenderData which
Represents all the information needed by the ColumnSeries to render
and within that

seriesRenderData.renderedXOffset, The offset of each column from its x
value, in pixels;
seriesRenderData.renderedhalfWidth,Half the width of a column, in pixels;

Thinking that I was now cooking with gas/petroleum/ethanol/mazola I coded

var renderedXOffset:Number = lc.series[0].seriesRenderData.renderedXOffset

to find that any reference to .seriesRenderData creates an error. If I
can see this dot notation in the debug variable pane, shouldn't I be
able to code it? Again TIA,

Mic.



RE: [flexcoders] Selecting an Editor for a DataGridColumn at runtime - how?

2008-07-31 Thread Alex Harui
You didn't say what error you got, but did you try this?

private function onItemEditBegin(event:DataGridEvent):void
{
var dgc:DataGridColumn;
dgc = 
event.currentTarget.columns[event.currentTarget.editedItemPosition.colum
nIndex];
if (dgc != null)
{
dgc.itemEditor = new ClassFactory(mx.controls.NumericStepper);
}
}

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of garyq22
Sent: Thursday, July 31, 2008 12:16 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Selecting an Editor for a DataGridColumn at
runtime - how?

 

Hello Group

I would like to select an Editor for each cell in my DataGrid
depending on other data values that might be in the same row.

I believe I can use the itemEditBegin event to assign and create my
chosen editor. I've got this far and I'm well stuck.

I know the following doesn't work - I just posted it to show that I am
trying :-)

Any assistance greatly appreciated!

private function onItemEditBegin(event:DataGridEvent):void
{
var dgc:DataGridColumn;
dgc = 
event.currentTarget.columns[event.currentTarget.editedItemPosition.colum
nIndex];
if (dgc != null)
{
dgc.itemEditor = IFactory(mx.controls.NumericStepper);
event.currentTarget.createItemEditor();
}
}

 



[flexcoders] Re: NaN and Infinity showing in output - How to modify?

2008-07-31 Thread Amy
--- In flexcoders@yahoogroups.com, Sid Maskit [EMAIL PROTECTED] wrote:

 I think I see your point here, and I guess that I have not made 
mine clearly enough, so here is a little more on this.
 
 When we say text={myNumber}, we are really setting up whatever is 
within the braces as an event handler for the event dispatched 
whenever myNumber changes. If we think of binding as setting up that 
relationship, then yes, everything in this thread is using binding. 
However, I think it is common for beginners to think of that 
statement as binding the text attribute to the latest value of 
myNumber, and to think of binding as doing no more than such 
assignments.
 
 I think it is important part of learning flex to realize that one 
can do much more than that. In the largest sense, one can do almost 
anything that is possible with a single ActionScript statement, so 
long as it returns a valid value for the attribute to which it is 
assigned, in this case the text attribute. For example, one could do 
something rather complicated, like this:
 
 text={(myNumber != 0) ? myFunction() : myOtherFunction()}
 
 So long as both functions returned a value that could be validly 
assigned to the text attribute, this approach is valid, and we can 
obviously do any valid ActionScript within either function. I'm not 
sure that this approach would be a best practice, but the point is 
that we are doing a lot more than simply taking the value of myNumber 
and assigning it to text.
 
 Finally, although I do not think you meant to imply this, I think 
it is worth saying that one cannot use ActionScript within an 
assignment to an MXML attribute without using braces. Well, one can, 
but it will be treated as a string, not as code to be run.

In at least some instances, MXML will run code that is not within 
braces, for instance 

mx:LinkBar id=chartSwitcher borderStyle=solid 
itemClick=invalidateDisplayList() /

It's not treating the text within the itemClick property as a string, 
but as code to be run.  I'm not certain exactly where the line is, 
but you don't ALWAYS have to enclose your as expressions in brackets 
to get them to run.

-Amy



[flexcoders] problem adding images to UIComponents using AS3

2008-07-31 Thread Merrill, Jason
I don't get why this code is failing, it's reproducible if you put an image in 
the path shown below.  (This isn't the actual code in my app, I just isolated a 
problem and made the problem reproducible it here.  In my real app, it's 
failing to embed an image into a class that is added to a UI component. The 
class extends Sprite). 

The first Image class instance declared with MXML embeds the image just fine. 
The second, using a UIComponent and adding an instance of the image class to it 
fails. Why?  See comments in the code below:


?xml version=1.0?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;

mx:Script
![CDATA[
import mx.controls.Image;

[Embed(source = /media/icons/help.png)]
[Bindable]
private var myHelpImageSource:Class;

private function initUI():void
{
var myHelpImage:Image = new Image();
myHelpImage.source = myHelpImageSource;
myUIComponent.addChild(myHelpImage);
trace(initUI called.)//traces fine
}

]]
/mx:Script

mx:Panel width=100% height=100%
mx:Canvas width=600 height=500

!-- this works to embed the image--
mx:Image source={myHelpImageSource} x=50 y=50 /

!-- this fails to embed the image using ActionScript 
above - why? --
mx:UIComponent id=myUIComponent 
creationComplete=initUI() x=100 y=100 /

/mx:Canvas
/mx:Panel

/mx:Application


Jason Merrill 
Bank of America 
Enterprise Technology  Global Risk LLD 
Instructional Technology  Media

Join the Bank of America Flash Platform Developer Community  
blocked::http://sharepoint.bankofamerica.com/sites/tlc/flash/default.aspx 

Are you a Bank of America associate interested in innovative learning ideas and 
technologies?
Check out our internal  GTO Innovative Learning Blog 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx  
 subscribe 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.aspx?List=\{41BD3FC9-BB07-4763-B3AB-A6C7C99C5B8D\}Source=http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/Lists/Posts/Archive.aspx
 . 




[flexcoders] Re: Selecting an Editor for a DataGridColumn at runtime - how?

2008-07-31 Thread garyq22
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 You didn't say what error you got, but did you try this?
 
 private function onItemEditBegin(event:DataGridEvent):void
 {
 var dgc:DataGridColumn;
 dgc = 
 event.currentTarget.columns[event.currentTarget.editedItemPosition.colum
 nIndex];
 if (dgc != null)
 {
 dgc.itemEditor = new ClassFactory(mx.controls.NumericStepper);
 }
 }
 
  
 
Yes - it worked thanks!!
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of garyq22
 Sent: Thursday, July 31, 2008 12:16 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Selecting an Editor for a DataGridColumn at
 runtime - how?
 
  
 
 Hello Group
 
 I would like to select an Editor for each cell in my DataGrid
 depending on other data values that might be in the same row.
 
 I believe I can use the itemEditBegin event to assign and create my
 chosen editor. I've got this far and I'm well stuck.
 
 I know the following doesn't work - I just posted it to show that I am
 trying :-)
 
 Any assistance greatly appreciated!
 
 private function onItemEditBegin(event:DataGridEvent):void
 {
 var dgc:DataGridColumn;
 dgc = 
 event.currentTarget.columns[event.currentTarget.editedItemPosition.colum
 nIndex];
 if (dgc != null)
 {
 dgc.itemEditor = IFactory(mx.controls.NumericStepper);
 event.currentTarget.createItemEditor();
 }
 }





Re: [flexcoders] Re: NaN and Infinity showing in output - How to modify?

2008-07-31 Thread Sid Maskit
True. Good point. Event handler attributes are assumed to contain code. Most 
attributes are of a type like string or number, and will need braces to get a 
value treated as code. I'm not sure if there are other attributes beside event 
handlers which are also assumed to contain code, but it wouldn't surprise me if 
there are some others.

 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: Amy [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, July 31, 2008 1:01:13 PM
Subject: [flexcoders] Re: NaN and Infinity showing in output - How to modify?


--- In [EMAIL PROTECTED] ups.com, Sid Maskit [EMAIL PROTECTED]  wrote:

 I think I see your point here, and I guess that I have not made 
mine clearly enough, so here is a little more on this.
 
 When we say text={myNumber} , we are really setting up whatever is 
within the braces as an event handler for the event dispatched 
whenever myNumber changes. If we think of binding as setting up that 
relationship, then yes, everything in this thread is using binding. 
However, I think it is common for beginners to think of that 
statement as binding the text attribute to the latest value of 
myNumber, and to think of binding as doing no more than such 
assignments.
 
 I think it is important part of learning flex to realize that one 
can do much more than that. In the largest sense, one can do almost 
anything that is possible with a single ActionScript statement, so 
long as it returns a valid value for the attribute to which it is 
assigned, in this case the text attribute. For example, one could do 
something rather complicated, like this:
 
 text={(myNumber != 0) ? myFunction() : myOtherFunction( )}
 
 So long as both functions returned a value that could be validly 
assigned to the text attribute, this approach is valid, and we can 
obviously do any valid ActionScript within either function. I'm not 
sure that this approach would be a best practice, but the point is 
that we are doing a lot more than simply taking the value of myNumber 
and assigning it to text.
 
 Finally, although I do not think you meant to imply this, I think 
it is worth saying that one cannot use ActionScript within an 
assignment to an MXML attribute without using braces. Well, one can, 
but it will be treated as a string, not as code to be run.

In at least some instances, MXML will run code that is not within 
braces, for instance 

mx:LinkBar id=chartSwitcher borderStyle= solid 
itemClick=invalida teDisplayList( ) /

It's not treating the text within the itemClick property as a string, 
but as code to be run.  I'm not certain exactly where the line is, 
but you don't ALWAYS have to enclose your as expressions in brackets 
to get them to run.

-Amy

 


  

[flexcoders] Multi-line repeated graphics

2008-07-31 Thread Richard Rodseth
I have a requirement for a data visualization that involves a graphic
repeated n times as follows, over multiple lines/rows.

x
x
xx

However, it should also never scroll, and fill whatever space is available,
with the cell size varying as necessary, with aspect ratio preserved.

I've experimented with two approaches:
1) using Degrafa as an item renderer for a TileList
2) Tile with Repeater, with Degrafa object inside Repeater

2) is promising, and as someone on the Degrafa list suggested, I could
render at a fixed reference size, and apply a scale to the container. The
overhead of the repeater approach is obviously a concern, but the challenge
with 1) is dynamically determining the cell size so that the component
doesn't scroll. I can't turn off clipContent, since TileList is not a
container.

I feel the need for a Degrafa extension or yet another custom tiling
component, but my other one hasn't exactly been a walk in the park, so ideas
are welcome.


Re: [flexcoders] problem adding images to UIComponents using AS3

2008-07-31 Thread Sid Maskit
There is probably more to it than this, but note that the action script 
language reference listing for UIComponent says, The UIComponent class is not 
used as an MXML tag, but is used as a base class for other classes.

My suspicion is that it does not contain the logic needed to properly display 
children that are added to it, and that its descendents provide this logic.
 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: Merrill, Jason [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, July 31, 2008 1:18:27 PM
Subject: [flexcoders] problem adding images to UIComponents using AS3


I don't get why this code is failing, it's reproducible if you put an image in 
the path shown below.  (This isn't the actual code in my app, I just isolated a 
problem and made the problem reproducible it here.  In my real app, it's 
failing to embed an image into a class that is added to a UI component. The 
class extends Sprite). 
The first Image class instance declared with MXML embeds the image just fine. 
The second, using a UIComponent and adding an instance of the image class to it 
fails. Why?  See comments in the code below:

?xml version=1.0? 
mx:Application xmlns:mx=http://www.adobe. com/2006/ mxml 

mx:Script 
![CDATA[ 
import mx.controls. Image; 

[Embed(source = /media/icons/ help.png)] 
[Bindable] 
private var myHelpImageSource: Class; 

private function initUI():void 
{ 
var myHelpImage: Image = new Image(); 
myHelpImage. source = myHelpImageSource; 
myUIComponent. addChild( myHelpImage) ; 
trace(initUI called.)//traces fine 
} 

]] 
/mx:Script 

mx:Panel width=100% height=100% 
mx:Canvas width=600 height=500 

!-- this works to embed the image-- 
mx:Image source={myHelpImageSource} x=50 y=50 / 

!-- this fails to embed the image using ActionScript 
above - why? -- 
mx:UIComponent id=myUIComponent 
creationComplete=initUI() x=100 y=100 / 

/mx:Canvas 
/mx:Panel 

/mx:Application 

Jason Merrill
Bank of America 
Enterprise Technology  Global Risk LLD
Instructional Technology  Media 
Join the Bank of America Flash Platform Developer Community 
Are you a Bank of America associate interested in innovative learning ideas and 
technologies?
Check out our internal  GTO Innovative Learning Blog  subscribe. 



  

  1   2   >