RE: [SPAM] [flexcoders] Multiple Script Files

2009-11-27 Thread Dan Pride
I have never heard of this before, where could I find out about it (I come from 
database design not java)
Dan Pride

--- On Fri, 11/27/09, Tracy Spratt  wrote:

From: Tracy Spratt 
Subject: RE: [SPAM] [flexcoders] Multiple Script Files
To: flexcoders@yahoogroups.com
Date: Friday, November 27, 2009, 5:21 PM







 



  



  
  
  







Another solution to this is to use helper
classes, instead of compiling the script block into the component class.  I
never have more than a single script block in an mxml file, rarely have more
than one included script file, and often have none of either. 

   

You can use the code-behind technique, or
static functions in a separate class, or a normally instantiated helper class. 

   



Tracy Spratt, 

Lariat Services, development services
available 











From: flexcod...@yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On 
Behalf Of Dan Pride

Sent: Thursday, November 26, 2009
2:41 PM

To: flexcod...@yahoogro ups.com

Subject: [SPAM] [flexcoders]
Multiple Script Files 



   

   









A similar question. To simplfy things I have created a
script file for each table with the relevant actionscript functions for the
table in the file.



i.e.

 

 

 

etc etc 



Is this a common way to handle script complexity as an application grows?

The app only uses a couple of components so there is a fair bit of actionScript
code tied to the main app file.



Thanks

Dan Pride 











 





 



  






  

RE: [SPAM] RE: [flexcoders] Re: constraintColumns/constraintRows on extended Sprite object REFdn6025643069

2009-11-27 Thread Tracy Spratt
The constraints are styles, not properties.  So to use constraints in AS,
you need to define them in a style sheet, and/or use setStyle().

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of dennis
Sent: Thursday, November 26, 2009 9:48 AM
To: flexcoders@yahoogroups.com
Subject: [SPAM] RE: [flexcoders] Re: constraintColumns/constraintRows on
extended Sprite object REFdn6025643069

 

  

Thank you for your reply.

 

I work only with AS, I mean with no MXML. 

I tried to use the Canvas container but using the mx.containers.Canvas,
there is no right property (even top, bottom, left).

 

What do I miss?

 

dennis

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of jamesfin
Sent: Wednesday, November 18, 2009 7:01 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: constraintColumns/constraintRows on extended
Sprite object REFdn6025643069

 

  



You can always do this where the right / top is constraining the item.


http://www.adobe. 
com/2006/mxml" layout="absolute" creationComplete="init()">









--- In flexcod...@yahoogro  ups.com,
"dennis"  wrote:
>
> Hello people..
> 
> 
> 
> I have an extended Sprite object and I put in on the Stage (via addChild).
> 
> How may I "anchor" it on runtime on the Stage? 
> 
> How may I constraint it in Columns and Rows?
> 
> 
> 
> Suppose that I want a Sprite(Panel) object, to be always 20 pixels from
> right edge of the Stage, even if the Stage resized.
> 
> 
> 
> Thank in advance.
> 
> Dennis
>



__ NOD32 4618 (20091118) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.  com





RE: [SPAM] [flexcoders] Multiple Script Files

2009-11-27 Thread Tracy Spratt
Another solution to this is to use helper classes, instead of compiling the
script block into the component class.  I never have more than a single
script block in an mxml file, rarely have more than one included script
file, and often have none of either.

 

You can use the code-behind technique, or static functions in a separate
class, or a normally instantiated helper class.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Dan Pride
Sent: Thursday, November 26, 2009 2:41 PM
To: flexcoders@yahoogroups.com
Subject: [SPAM] [flexcoders] Multiple Script Files

 

  

A similar question. To simplfy things I have created a script file for each
table with the relevant actionscript functions for the table in the file.

i.e.
 
 
 
etc etc 

Is this a common way to handle script complexity as an application grows?
The app only uses a couple of components so there is a fair bit of
actionScript code tied to the main app file.

Thanks
Dan Pride





RE: [SPAM] [flexcoders] XMLList refrence problem

2009-11-27 Thread Tracy Spratt
Why use an itemRenderer?  Looks like a labelFunction would do what you want.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of criptopus
Sent: Friday, November 27, 2009 10:33 AM
To: flexcoders@yahoogroups.com
Subject: [SPAM] [flexcoders] XMLList refrence problem

 

  

I have this...








With a datagrid with this in...







What do I put in the {} to get:

Non-Member to show up for data.usrstatus == 0
Member to show up for data.usrstatus == 1
etc.

Its been driving me crazy!

- Stephen





RE: [SPAM] [flexcoders] Counting XML nodes with attributes having specific values (using EX4 perhaps)...

2009-11-27 Thread Tracy Spratt
The length() of the resultant XML list of the e4x expression will be the
count of the nodes found.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of flexfortress
Sent: Friday, November 27, 2009 3:39 PM
To: flexcoders@yahoogroups.com
Subject: [SPAM] [flexcoders] Counting XML nodes with attributes having
specific values (using EX4 perhaps)...

 

  

Hello all!

I'm creating a charting application in Flex and I have been given XML in the
following format...








I need to COUNT the number of nodes/rows that have a value of "x1" for
attribute a, and say..."y2" and "y1" for attribute b, etc., so I can
aggregate and chart them.

Anyone know of an efficient and effective way of doing this in ActionScript
3?

Thanks to all in advance! 

David





[flexcoders] Counting XML nodes with attributes having specific values (using EX4 perhaps)...

2009-11-27 Thread flexfortress
Hello all!

I'm creating a charting application in Flex and I have been given XML in the 
following format...








I need to COUNT the number of nodes/rows that have a value of "x1" for 
attribute a, and say..."y2" and "y1" for attribute b, etc., so I can aggregate 
and chart them.

Anyone know of an efficient and effective way of doing this in ActionScript 3?

Thanks to all in advance!  

David



Re: [flexcoders] How does Button 3 knows that it has been clicked in this example?

2009-11-27 Thread Pat Buchanan
Fred:

There are multiple ways to listen for events, such as click events.  Button
1 and button 2 add the listener inline (click="handleClick(event)") in the
MXML markup.

For button 3, the author listens for the even using this line:

button3.addEventListener(MouseEvent.CLICK, handleClick);

It get's called when the app is initialized (initialize="init()")

You can delete that line and replace it with the way button 1 and 2 do it if
you want, but both do the exact same thing.

Thanks!
-Pat

On Thu, Nov 26, 2009 at 10:06 AM, fred44455  wrote:

>
>
> This an example taken out of a Flex 4 book(Amstrong).
> I pretty understand this code but if you look at button3
> at the very end of the code , it has no click(event) associated
> with it. why is that? Will it be ok to add:click="handleClick(event)"/>
> Like it was done for button2 ??
>
>
> Thanks.
>
> 
>  xmlns:fx="http://ns.adobe.com/mxml/2009";
> xmlns:s="library://ns.adobe.com/flex/spark"
> xmlns:mx="library://ns.adobe.com/flex/halo"
> initialize="init()">
>
> 
> 
>  click="label.text += 'Button 1 clicked\n'"/>
>  click="handleClick(event)"/>
> 
> 
> 
> 
>
>  
>


RE: [flexcoders] MAC : TextInput focus

2009-11-27 Thread suman gayakwad
Alex,

 As soon as the application loads up, im getting the login
screen(TitlwWindow component) which has got three fields username, password
and domain. I'm trying to set the focus to the username field so that user
can start typing. The focus is set to username field in IE, Firefox and also
in Chrome but not in Safari browser. The weird thing here(in Safari browser)
as soon as i click on the application,(ie. somewhere within the browser
window)  the focus will be set to username field.

Is this browser plug-in issue or bug on Flex side ?

Thanks,
Suman


[flexcoders] Cairngorm store example - newbie binding question #2

2009-11-27 Thread normc_actionscript
Thank you Tracy for answering my previous question.

New one:
Why is 'handler' bound to 'confirmOrder' in this snippet?
 

confirmOrder is a function in the same file.
Is it just a way to set an initial value?

Thanks,
Norm



[flexcoders] Re: Technique to tell the filterFunction to chill for a sec before going into eff

2009-11-27 Thread steveb805

Actually, this is a non-issue.  The visual activity isn't as bad as I thought 
if I just set the filterfunction to null while I'm doing my editing of the 
value object.

--- In flexcoders@yahoogroups.com, "steveb805"  wrote:
>
> 
> I have a filter function for a List that hides the item if the duedate is 
> larger than a particular number.
> 
> In a function I call, to change a value object field, as soon as I hit this 
> line below, the filter goes into effect (which is expected since duedate is 
> the field specified in the filter)
> 
> projectListAC[projectList.selectedIndex].duedate = tempDateNumber;
> 
>   and hides the item, and the selectedIndex goes to -1.
> 
>  (projectListAC is the dp)
> 
> If I temporarily set filterFunction to null, and then change the duedate, and 
> then set it back to the filter, you get a visual flash of all a sudden a lot 
> of items becoming visible, and then back again.
> 
> Not really the effect I want.
> 
> Shouldn't the List only change after calling refresh() on the dataprovider?  
> As soon as i change the List's value object field, the filtering takes place
> 
> Steve
>




Re: [Spam] RE: [flexcoders] mx:ControlBar horizontalAlign="right" - doesn'twork?

2009-11-27 Thread Nick Middleweek
This is a bit old but i had the same problem again and it's quite easy to
fix by setting the width of the controlBar :-)


  



Thanks to my work colleague Gilles! :)






2009/10/6 Nick Middleweek 

> It just stays left aligned...
>
> that's odd... Could there be anything that is over riding it?
>
>
> Thanks,
> Nick
>
>
>
>
> 2009/10/5 Alex Harui 
>
>
>>
>>  Works for me.  What did you see?
>>
>>
>>
>> Alex Harui
>>
>> Flex SDK Developer
>>
>> Adobe Systems Inc. 
>>
>> Blog: http://blogs.adobe.com/aharui
>>
>
>


[flexcoders] XMLList refrence problem

2009-11-27 Thread criptopus
I have this...








With a datagrid with this in...







What do I put in the {} to get:

Non-Member to show up for data.usrstatus == 0
Member to show up for data.usrstatus == 1
etc.

Its been driving me crazy!

- Stephen