[flexcoders] Re: one to one chat

2009-05-22 Thread arieljake
http://labs.adobe.com/technologies/stratus/

--- In flexcoders@yahoogroups.com, Pedro Sena  wrote:
>
> On the other hand
> 
> I would recommend you GraniteDS
> 
> IMHO its easier than BlazeDS
> 
> Make your try
> 
> On Thu, May 21, 2009 at 4:20 PM, valdhor wrote:
> 
> >
> >
> > Depends on your back end.
> >
> > Here is one I got with a quick Google search...
> >
> >
> > http://learn.adobe.com/wiki/display/Flex/Creating+a+BlazeDS+messaging+application+in+Flex+Builder
> >
> > Also, WebORB has a sample chat application. Check them out at
> > http://www.themidnightcoders.com
> >
> > HTH
> >
> > Steve
> >
> >
> > --- In flexcoders@yahoogroups.com ,
> > "dev.achiever"  wrote:
> > >
> > > Please help me one to one chat application develop by using flex
> > >
> >
> >  
> >
> 
> 
> 
> -- 
> /**
> * Pedro Sena
> * Systems Architect
> * Sun Certified Java Programmer
> * Sun Certified Web Component Developer
> */
>




[flexcoders] Re: Flash to JPG

2009-05-22 Thread halfbaked11704
Hi! thank you for your tip. I'll try this one.


--- In flexcoders@yahoogroups.com, "filipevirginio"  wrote:
>
> Hi,
> you can use ImageSnapshot class:
> http://livedocs.adobe.com/flex/3/langref/mx/graphics/ImageSnapshot.html
> 
> 
> --- In flexcoders@yahoogroups.com, "halfbaked11704"  wrote:
> >
> > hello everyone!
> > I am new to this community.
> > I have a problem regarding flash.
> > 
> > How to save .swf file to a .jpg format?
> >
>




[flexcoders] Getting data out of a DataGrid...

2009-05-22 Thread laurence5905
Ok, given the following:


  






  


How do I get the data out of the 6th column there?  I don't know the name of 
the field, so the 'event.itemRenderer.data.fieldName' won't work.  And 
something 'event.itemRenderer.data.(regCodeVO.validation_field)' won't work 
either...  So how do you get the data out of a DataGrid when you have the field 
you need stored in a String, instead of hard-coded into the program?

Thanks,
Laurence MacNeill
Mableton, Georgia, USA





[flexcoders] Formatting my messages on this list...

2009-05-22 Thread laurence5905
Why is it, every single time I post a message with some code in it, the 
formatting is always removed?  All those tabs and spaces I have in there to 
make my code look halfway decent are all gone when the message is posted.  
Anyone know how to stop the formatting from being removed like that?

Thanks,
Laurence MacNeill
Mableton, Georgia, USA




[flexcoders] Problem converting Flex app to AIR

2009-05-22 Thread reflexactions
Ok the original web based application uses a lot of RSL/modules launched from a 
central 'desktop'.

We converted this to AIR and can launch the application and display the 
'desktop'.

Our problem is when we try to pop up a window. These are TitleWindow's that 
originally were loaded via PopupManager.

We now instead create a NativeWindow and then use NativeWindow.stage.addChild() 
to add our TitleWindow.

Problem is that although the NativeWindow appears (can see it and also see it 
in teh TaskBar) it is empty, just a white background.

Actually checking the TitleWindow we found the constructor runs but initialize  
etc. never gets called.

Assume it something simple weve missed but don't know what any ideas.

tks



[flexcoders] Re: Formatting my messages on this list...

2009-05-22 Thread Cato Paus
Hi, this is not a solution for your question,but if you replay from the forum 
with the Rich-Text Editor that still are in beta, works almost. 

--- In flexcoders@yahoogroups.com, "laurence5905"  wrote:
>
> Why is it, every single time I post a message with some code in it, the 
> formatting is always removed?  All those tabs and spaces I have in there to 
> make my code look halfway decent are all gone when the message is posted.  
> Anyone know how to stop the formatting from being removed like that?
> 
> Thanks,
> Laurence MacNeill
> Mableton, Georgia, USA
>




[flexcoders] localized parseFloat

2009-05-22 Thread thomas parquier
Hi,

Couldn't parseFloat() use the SharedResources properties to parse localized
strings ?

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


[flexcoders] Re: Problem converting Flex app to AIR

2009-05-22 Thread reflexactions
Never mind, I figured it out.  

I was just being dumb and blind...

--- In flexcoders@yahoogroups.com, "reflexactions"  wrote:
>
> Ok the original web based application uses a lot of RSL/modules launched from 
> a central 'desktop'.
> 
> We converted this to AIR and can launch the application and display the 
> 'desktop'.
> 
> Our problem is when we try to pop up a window. These are TitleWindow's that 
> originally were loaded via PopupManager.
> 
> We now instead create a NativeWindow and then use 
> NativeWindow.stage.addChild() to add our TitleWindow.
> 
> Problem is that although the NativeWindow appears (can see it and also see it 
> in teh TaskBar) it is empty, just a white background.
> 
> Actually checking the TitleWindow we found the constructor runs but 
> initialize  etc. never gets called.
> 
> Assume it something simple weve missed but don't know what any ideas.
> 
> tks
>




Re: [flexcoders] Pb With Falsh Player 10

2009-05-22 Thread Stephane Guyot


Christophe,

maybe user-initiated action
read  that : http://www.adobe.com/devnet/flashplayer/articles/ 
fplayer10_uia_requirements.html


HTH,
Stephane

Le 20 mai 09 à 10:54, christophe_jacquelin a écrit :




Hello,

I have an upload component that running well with Flash Player 9  
and running wrong with Flash Player 10.


What could be the problem.

Thank you,

Christophe;





IBCM :  International Bank of Chatenay-Malabry http://www.kiva.org/ 
lender/stephane4127 - Click on Map View







[flexcoders] Remote Service fails with IE8 - NetConnection.Call.Failed: HTTP: Status 200

2009-05-22 Thread t_varada
Hi Flex experts,

Once our clients upgrade to IE8 from IE7 the Flex remote service fails with the 
following exception,

The weird thing is "HTTP status 200" stands for successful request then why 
should it fail? Also tried adding "add-no-cache-headers" in services-config.xml 
still no use.

I really appreciate your help on this.

body = (Object)#1
  clientId = (null)
  correlationId = "B924DFCC-32C0-7DDF-CB34-67A9DF8567D4"
  destination = ""
  extendedData = (null)
  faultCode = "Client.Error.MessageSend"
  faultDetail = "Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: 
Status 200: url: 'http://localhost:8600/messagebroker/amf'"
  faultString = "Send failed"
  headers = (Object)#2
  messageId = "4E0B2F92-B1C2-3C6E-C634-67A9F10A4C79"
  rootCause = (mx.messaging.events::ChannelFaultEvent)#3
bubbles = false
cancelable = false
channel = (mx.messaging.channels::AMFChannel)#4



Re: [flexcoders] Flex Obfuscation -- WITH MODULES

2009-05-22 Thread Marvin Froeder
Hey,
http://nitrolm.com/nitro-lm-lite

It is not exactly obfuscation, is
encryption


VELO

On Thu, May 21, 2009 at 8:52 PM, Raheen M Shabbazz <
raheen_m_shabb...@yahoo.com> wrote:

>
>
> Hello All,
>
> Has anyone found an obfuscation application that works well with a flex app
> using modules (Flex 3)? Does such a thing exist?! I feel like I have tried
> them all -- SecureSWF, SwfEncrypt, etc, etc -- but I have yet to find one
> that works well with modules.
>
> My main app loads and unloads modules -- modules that have been optimized
> against the main application. So, obfuscating the main app means that the
> modules need to have the EXACT SAME obfuscated names available to it.
>
> Surely, someone has solved this before, right? Thus far, I haven't found
> anything of use.
>
> Anyone else?
>
>  
>


[flexcoders] Re: Ctrl click in combobox

2009-05-22 Thread arnab.s...@rocketmail.com
Listen to MouseEvent, there you'l find property MouseEvent .controlKey to know 
ctrl is press or not!!

--- In flexcoders@yahoogroups.com, "lampei"  wrote:
>
> Until recently, I did not know that you could reset the combobox back to the 
> "prompt" value by ctrl-clicking the value in the combobox dropdown.  However, 
> as most people don't know that this is a possiblity with the combobox, I'm 
> trying to mimic this functionality by setting the selectedIndex to -1 if a 
> person clicks (without the ctrl key) the same value that is already selected.
> 
> I have yet to find the "selectedIndexChanged" property change to anything 
> other than false when the "change" event fires, so I'm unable to use that 
> (same for selectedItemChanged).  I tried setting the item under the mouse 
> when "itemRollOver" fires to a property, then set it to null when 
> "itemRollOut" fires.  Then when the person clicks, I said if the selectedItem 
> == the value underneath the mouse during itemRollOver, set the selectedIndex 
> = -1, however, the itemRollOut seems to fire before the click event is fired. 
>  I've also yet to find where the code is for the ctrl-left click, or what 
> causes that event to fire.
> 
> If anyone has any hints for this, I would appreciate it.  I'm running into a 
> wall now...literally :)
>




[flexcoders] Re: Scrolling a text in text input when textalign is set to right

2009-05-22 Thread valdhor
You are probably going to have to use the Text Layout Framework in Gumbo.

This thread may help:

http://forums.adobe.com/thread/232706

Or you could try this:

http://www.arabicode.com/en/flaraby/as3/flex/


HTH


Steve



--- In flexcoders@yahoogroups.com, Rohit Sharma  wrote:
>
> Sorry for being vague about my requirements.
> The chat component is an Arabic chat component (RTL text).
> Hence the text is right text aligned. When we start typing in the text
> input, once the
> text input gets filled we are not able to see any further text provided by
> user. It does not
> get scrolled automatically to the new insertion position. If you want to see
> the text you have
> to select it using mouse and then drag it.
>   Just try this by setting the text align property to right and start
> filling the text input.
> Once it gets filled you wont be able to see what you are inputting next.
> 
> Hope this helps.
> 
> Thanks,
> Rohit
> 
> On Fri, May 22, 2009 at 12:12 AM, valdhor wrote:
> 
> >
> >
> > What is a "right to left chat application" ?
> >
> > Can you point me at an example of how it's meant to work?
> >
> >
> > --- In flexcoders@yahoogroups.com , Rohit
> > Sharma  wrote:
> > >
> > > Hi Steve,
> > > Its not working. While I am typing the text shifts as left aligned.
> > > This being a right to left chat application, I cant let it happen.
> > >
> > > Thanks,
> > > Rohit
> >
> >  
> >
>




[flexcoders] Re: Getting data out of a DataGrid...

2009-05-22 Thread valdhor
Actually, you do know the name of the field.

Try this...

event.currentTarget.selectedItem[_regCodeVO.validation_field]


HTH


Steve

--- In flexcoders@yahoogroups.com, "laurence5905"  wrote:
>
> Ok, given the following:
> 
>itemClick="membersListDGItemClickHandler(event);">
>   
>width="80"/>
>width="80"/>
>width="160"/>
> 
> 
> 
>   
> 
> 
> How do I get the data out of the 6th column there?  I don't know the name of 
> the field, so the 'event.itemRenderer.data.fieldName' won't work.  And 
> something 'event.itemRenderer.data.(regCodeVO.validation_field)' won't work 
> either...  So how do you get the data out of a DataGrid when you have the 
> field you need stored in a String, instead of hard-coded into the program?
> 
> Thanks,
> Laurence MacNeill
> Mableton, Georgia, USA
>




[flexcoders] Re: modify item before binding to datagrid

2009-05-22 Thread markgoldin_2000
How about 
import.utils.ObjectUtil;
--- In flexcoders@yahoogroups.com, Angelo Anolin  wrote:
>
> Hi Mark,
> 
> I cannot seem to get your code working for me..
> 
> I am getting this error:
> 
> Access of Undefined Property ObjectUtil..
> 
> I am trying to simply copy the function which you have posted.
> 
> Any further advise?
> 
> 
> 
> 
> 
> From: markgoldin_2000 
> To: flexcoders@yahoogroups.com
> Sent: Wednesday, 20 May, 2009 21:52:25
> Subject: [flexcoders] Re: modify item before binding to datagrid
> 
> 
> 
> 
> 
> Angelo,
> did you try the code I have replied to you with?
> 
> --- In flexcod...@yahoogro ups.com, Angelo Anolin  wrote:
> >
> > My apologies but I forgot to mention that I am getting the data from a .NET 
> > web service which is a dataset and then returned via string (XML) using the 
> > .NET function 
> > 
> > String strConn = ConfigurationManage r.ConnectionStri 
> > ngs["conString" ].ConnectionStri ng;
> > SqlConnection dbConnection = new SqlConnection( strConn);
> > String strCommand = "SELECT SupplierID, CompanyName, 
> > ContactName, ContactTitle, Address FROM Suppliers ";
> > SqlDataAdapter objCommand = new SqlDataAdapter( strCommand, 
> > dbConnection) ;
> > DataSet DS = new DataSet();
> > objCommand.Fill( DS);
> > dbConnection. Close();
> > dbConnection = null;
> > DataTable DT = DS.Tables[0] ;
> > 
> > return DS.GetXml();
> > 
> > 
> > So, basically, I think the SupplierID which is numeric originally becomes a 
> > string. How can I then prior to binding the same to the datagrid control, 
> > convert its data type back to numeric so that when I perform a sort, it 
> > would sort the supplierID interpreting it as a numeric value?
> > 
> > Thanks.
> > 
> > 
> >  _ _ __
> > From: markgoldin_2000 
> > To: flexcod...@yahoogro ups.com
> > Sent: Monday, 18 May, 2009 23:44:33
> > Subject: [flexcoders] Re: modify item before binding to datagrid
> > 
> > 
> > 
> > 
> > 
> > Here is what I am doing.
> > column definition:
> >  > sortCompareFunction ="sortNumericCol umnTrackTotal" />
> > and:
> > private function sortNumericColumnTr ackTotal( itemA:Object, itemB:Object) 
> > :int
> > {
> > return ObjectUtil.numericC ompare(itemA[ TrackTotal. col], 
> > itemB[TrackTotal. col]);
> > } 
> > 
> > where TrackTotal is a DG's id.
> > 
> > HTH
> > 
> > --- In flexcod...@yahoogro ups.com, Angelo Anolin  
> > wrote:
> > >
> > > 
> > > Hi.
> > > 
> > > I am quite new in Flex and would like to ask a simple question.
> > > 
> > > I am retrieving datasets from a .NET webservice and binding the same to a 
> > > datagrid.  The datagrid comes with a feature that when you click on any 
> > > of the headers, the column is sorted ASC or DESC.
> > > 
> > > Now, one column which I am binding to is originally a numeric column.  
> > > But when it binds to the datagrid, it's data type becomes string.  Is it 
> > > possible that prior to binding the said column to the datagrid, I would 
> > > be able to convert it back to its numeric data taype?  Since sorting the 
> > > column in a string format would give a different result as compared to 
> > > sorting the same column in a numeric format.
> > > 
> > > Thanks.
> > > 
> > > Regards.
> > >
> >
>




[flexcoders] Re: modify item before binding to datagrid

2009-05-22 Thread markgoldin_2000
Of cource I meant:
import mx.utils.ObjectUtil;

--- In flexcoders@yahoogroups.com, "markgoldin_2000"  
wrote:
>
> How about 
> import.utils.ObjectUtil;
> --- In flexcoders@yahoogroups.com, Angelo Anolin  wrote:
> >
> > Hi Mark,
> > 
> > I cannot seem to get your code working for me..
> > 
> > I am getting this error:
> > 
> > Access of Undefined Property ObjectUtil..
> > 
> > I am trying to simply copy the function which you have posted.
> > 
> > Any further advise?
> > 
> > 
> > 
> > 
> > 
> > From: markgoldin_2000 
> > To: flexcoders@yahoogroups.com
> > Sent: Wednesday, 20 May, 2009 21:52:25
> > Subject: [flexcoders] Re: modify item before binding to datagrid
> > 
> > 
> > 
> > 
> > 
> > Angelo,
> > did you try the code I have replied to you with?
> > 
> > --- In flexcod...@yahoogro ups.com, Angelo Anolin  
> > wrote:
> > >
> > > My apologies but I forgot to mention that I am getting the data from a 
> > > .NET web service which is a dataset and then returned via string (XML) 
> > > using the .NET function 
> > > 
> > > String strConn = ConfigurationManage r.ConnectionStri 
> > > ngs["conString" ].ConnectionStri ng;
> > > SqlConnection dbConnection = new SqlConnection( strConn);
> > > String strCommand = "SELECT SupplierID, CompanyName, 
> > > ContactName, ContactTitle, Address FROM Suppliers ";
> > > SqlDataAdapter objCommand = new SqlDataAdapter( strCommand, 
> > > dbConnection) ;
> > > DataSet DS = new DataSet();
> > > objCommand.Fill( DS);
> > > dbConnection. Close();
> > > dbConnection = null;
> > > DataTable DT = DS.Tables[0] ;
> > > 
> > > return DS.GetXml();
> > > 
> > > 
> > > So, basically, I think the SupplierID which is numeric originally becomes 
> > > a string. How can I then prior to binding the same to the datagrid 
> > > control, convert its data type back to numeric so that when I perform a 
> > > sort, it would sort the supplierID interpreting it as a numeric value?
> > > 
> > > Thanks.
> > > 
> > > 
> > >  _ _ __
> > > From: markgoldin_2000 
> > > To: flexcod...@yahoogro ups.com
> > > Sent: Monday, 18 May, 2009 23:44:33
> > > Subject: [flexcoders] Re: modify item before binding to datagrid
> > > 
> > > 
> > > 
> > > 
> > > 
> > > Here is what I am doing.
> > > column definition:
> > >  > > sortCompareFunction ="sortNumericCol umnTrackTotal" />
> > > and:
> > > private function sortNumericColumnTr ackTotal( itemA:Object, 
> > > itemB:Object) :int
> > > {
> > > return ObjectUtil.numericC ompare(itemA[ TrackTotal. col], 
> > > itemB[TrackTotal. col]);
> > > } 
> > > 
> > > where TrackTotal is a DG's id.
> > > 
> > > HTH
> > > 
> > > --- In flexcod...@yahoogro ups.com, Angelo Anolin  
> > > wrote:
> > > >
> > > > 
> > > > Hi.
> > > > 
> > > > I am quite new in Flex and would like to ask a simple question.
> > > > 
> > > > I am retrieving datasets from a .NET webservice and binding the same to 
> > > > a datagrid.  The datagrid comes with a feature that when you click on 
> > > > any of the headers, the column is sorted ASC or DESC.
> > > > 
> > > > Now, one column which I am binding to is originally a numeric column.  
> > > > But when it binds to the datagrid, it's data type becomes string.  Is 
> > > > it possible that prior to binding the said column to the datagrid, I 
> > > > would be able to convert it back to its numeric data taype?  Since 
> > > > sorting the column in a string format would give a different result as 
> > > > compared to sorting the same column in a numeric format.
> > > > 
> > > > Thanks.
> > > > 
> > > > Regards.
> > > >
> > >
> >
>




[flexcoders] Re: Still more problems with DataGrid

2009-05-22 Thread Amy
--- In flexcoders@yahoogroups.com, Laurence MacNeill  wrote:
>
> As I add and delete items from my DataGrid's dataProvider (an 
> ArrayCollection), my custom ItemRenderer starts messing things 
> up.  It "remembers" values from previous data that was there, but got 
> deleted.  But the weird thing is, it doesn't *always* do that, only 
> some of the time.
> 
> Basically, it'd be nice, whenever I delete a value from the 
> DataProvider, to completely "reset" the DataGrid.  Make it re-render 
> itself completely from scratch, including the custom ItemRenderer in 
> the 3rd column.  How do I do this?

http://www.magnoliamultimedia.com/flex_examples/Amys_Flex_FAQ.pdf
Q2



[flexcoders] SWFLoader showing images originally off the 'canvas'

2009-05-22 Thread twcrone70
In Flex I am trying to show "examples" of SWFs that run on portable devices in 
FlashLite.  I am able to open them in a Flex control (HBox, TitleWindow etc.) 
and pass necessariy parameters but some images that are normally off the 
'canvas' or 'stage' for the flash SWFs are showing up outside the container 
that I am loading the SWFs into.

Setting heights and widths seem to constrain the "main" part of the swf but the 
other stuff still appears off ends but within the boundaries of the Flex app 
itself.

Any ideas how to 'crop' the Flash lite SWFs?

Thanks,

- Todd



Re: [flexcoders] SWFLoader showing images originally off the 'canvas'

2009-05-22 Thread Clint Tredway
Use a canvas as a mask on the swf loader and that should work.

On Fri, May 22, 2009 at 9:20 AM, twcrone70  wrote:

>
>
> In Flex I am trying to show "examples" of SWFs that run on portable devices
> in FlashLite. I am able to open them in a Flex control (HBox, TitleWindow
> etc.) and pass necessariy parameters but some images that are normally off
> the 'canvas' or 'stage' for the flash SWFs are showing up outside the
> container that I am loading the SWFs into.
>
> Setting heights and widths seem to constrain the "main" part of the swf but
> the other stuff still appears off ends but within the boundaries of the Flex
> app itself.
>
> Any ideas how to 'crop' the Flash lite SWFs?
>
> Thanks,
>
> - Todd
>
>  
>



-- 
“When you choose hope, anything is possible.”
-Christopher Reeve


Re: [flexcoders] Re: simple array?

2009-05-22 Thread Charles Parcell
Why even have the Array aspect in the second example? It stands as a
pointless container for what we are seeing it used for. Unless there will be
some additional items added to it that we have not seen yet.

I just feel the need to point that out. :)

Charles P.


On Thu, May 21, 2009 at 3:49 PM, Eric Cooper  wrote:

> I just tried compiling what I wrote - and realized that it didn't... so
> here are two variants. The first is same as previous, but it compiles. The
> second may be more in the spirit of what you were attempting initially - and
> kind of highlights similarities between arrays and objects.
>
> First:
>
>var records:Array = new Array(
>{ code:"AC", text:"Remember to reset
> the station address." },
>{ code:"RN", text:"Remember to reset
> the station expiration date." },
>{ code:"CP", text:"Remember to
> contact contractor to remove the certificates from this station." },
>{ code:"CR", text:"Remember to
> cancel the refund payment." }
>);
>
> for each (var test:Object in records) {
>if
> (grid.selectedItem.PAYMENT_TYPE_CODE == test.code)
>Alert.show(test.text );
>}
>
>
> Second:
>
>var PAYMENT_TYPE_CODE:String = "CR";
> var records:Array = new Array(
>{ "AC": "Remember to reset the
> station address." },
>{ "RN": "Remember to reset the
> station expiration date." },
>{ "CP": "Remember to contact
> contractor to remove the certificates from this station." },
>{ "CR": "Remember to cancel the
> refund payment." }
>);
>
> for (var i:int = 0; i < records.length;
> ++i) {
>if
> (records[i][grid.selectedItem.PAYMENT_TYPE_CODE])
>
>  Alert.show(records[i][PAYMENT_TYPE_CODE]);
> }
>
>
>
>
> --- In flexcoders@yahoogroups.com, "Jason B"  wrote:
> >
> > SWEET thanks
> >
> > --- In flexcoders@yahoogroups.com, "Eric Cooper"  wrote:
> > >
> > > How about this:
> > >
> > > var records:Array = new Array(
> > > { code:"AC", text:"Remember to
> reset the station address." },
> > > { code:"RN", text:"Remember to
> reset the station expiration date." },
> > > { code:"CP", text:"Remember to
> contact contractor to remove the certificates from this station." },
> > > { code:"CR", text:"Remember to
> cancel the refund payment." },
> > > );
> > >
> > > for each(test:Object in records){
> > > if(grid.selectedItem.PAYMENT_TYPE_CODE == test[i].code)
> > > Alert.show(test[i].text );
> > > }
> > >
> > > would that do it?
> > >
> > > -eric
> > >
> > > --- In flexcoders@yahoogroups.com, "Jason B"  wrote:
> > > >
> > > > var records:Array = new Array({
> > > >   "AC": "Remember to reset the station address.",
> > > >   "RN": "Remember to reset the station expiration
> date.",
> > > >   "CP": "Remember to contact contractor to remove the
> certificates from this station.",
> > > >   "CR": "Remember to cancel the refund payment."
> > > >   });
> > > >
> > > >
> > > > for each(test:Object in records){
> > > >
> > > > //HERE we match up PAYMENT TYPE CODE with AC RN CP if one is a match
> we show the value
> > > >
> > > > if(grid.selectedItem.PAYMENT_TYPE_CODE == test[i])
> > > >  Alert.show(SHOW ME --->"Remember to reset the station address" );
> > > >
> > > >
> > > >
> > > > }
> > > >
> > > >
> > > > datagrid hidden column AC, RN, CP are in datagrid
> > > > user selects RT item from grid and hits button
> > > > system match's that row with what message should be displayed
> > > > user never see's RT since its a hidden field in grid
> > > > user now see's a message displayed as a reminder
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --- In flexcoders@yahoogroups.com, "Paul Andrews"  wrote:
> > > > >
> > > > > Jason,
> > > > >
> > > > > I'm not sure I follow exactly what the problem is now.
> > > > >
> > > > > Paul
> > > > > - Original Message -
> > > > > From: "Jason B" 
> > > > > To: 
> > > > > Sent: Thursday, May 21, 2009 4:02 PM
> > > > > Subject: [flexcoders] Re: simple array?
> > > > >
> > > > >
> > > > > >i want to loop the records and compare the value "addressc

Re: [flexcoders] Re: simple array?

2009-05-22 Thread Charles Parcell
Additionally, utilizing a loop to locate an item can eat up cycles if the
list of codes gets to be large.  Granted that in the case of this example
looping 3 or even 10 items is likely not going to be an issue in anyway.
Something to think about if the application of this example is used
differently.

Charles P.


On Fri, May 22, 2009 at 10:50 AM, Charles Parcell
wrote:

> Why even have the Array aspect in the second example? It stands as a
> pointless container for what we are seeing it used for. Unless there will be
> some additional items added to it that we have not seen yet.
>
> I just feel the need to point that out. :)
>
> Charles P.
>
>
>
> On Thu, May 21, 2009 at 3:49 PM, Eric Cooper  wrote:
>
>> I just tried compiling what I wrote - and realized that it didn't... so
>> here are two variants. The first is same as previous, but it compiles. The
>> second may be more in the spirit of what you were attempting initially - and
>> kind of highlights similarities between arrays and objects.
>>
>> First:
>>
>>var records:Array = new Array(
>>{ code:"AC", text:"Remember to
>> reset the station address." },
>>{ code:"RN", text:"Remember to
>> reset the station expiration date." },
>>{ code:"CP", text:"Remember to
>> contact contractor to remove the certificates from this station." },
>>{ code:"CR", text:"Remember to
>> cancel the refund payment." }
>>);
>>
>> for each (var test:Object in records) {
>>if
>> (grid.selectedItem.PAYMENT_TYPE_CODE == test.code)
>>Alert.show(test.text );
>>}
>>
>>
>> Second:
>>
>>var PAYMENT_TYPE_CODE:String = "CR";
>> var records:Array = new Array(
>>{ "AC": "Remember to reset the
>> station address." },
>>{ "RN": "Remember to reset the
>> station expiration date." },
>>{ "CP": "Remember to contact
>> contractor to remove the certificates from this station." },
>>{ "CR": "Remember to cancel the
>> refund payment." }
>>);
>>
>> for (var i:int = 0; i < records.length;
>> ++i) {
>>if
>> (records[i][grid.selectedItem.PAYMENT_TYPE_CODE])
>>
>>  Alert.show(records[i][PAYMENT_TYPE_CODE]);
>> }
>>
>>
>>
>>
>> --- In flexcoders@yahoogroups.com, "Jason B"  wrote:
>> >
>> > SWEET thanks
>> >
>> > --- In flexcoders@yahoogroups.com, "Eric Cooper"  wrote:
>> > >
>> > > How about this:
>> > >
>> > > var records:Array = new Array(
>> > > { code:"AC", text:"Remember to
>> reset the station address." },
>> > > { code:"RN", text:"Remember to
>> reset the station expiration date." },
>> > > { code:"CP", text:"Remember to
>> contact contractor to remove the certificates from this station." },
>> > > { code:"CR", text:"Remember to
>> cancel the refund payment." },
>> > > );
>> > >
>> > > for each(test:Object in records){
>> > > if(grid.selectedItem.PAYMENT_TYPE_CODE == test[i].code)
>> > > Alert.show(test[i].text );
>> > > }
>> > >
>> > > would that do it?
>> > >
>> > > -eric
>> > >
>> > > --- In flexcoders@yahoogroups.com, "Jason B"  wrote:
>> > > >
>> > > > var records:Array = new Array({
>> > > >   "AC": "Remember to reset the station address.",
>> > > >   "RN": "Remember to reset the station expiration
>> date.",
>> > > >   "CP": "Remember to contact contractor to remove
>> the certificates from this station.",
>> > > >   "CR": "Remember to cancel the refund payment."
>> > > >   });
>> > > >
>> > > >
>> > > > for each(test:Object in records){
>> > > >
>> > > > //HERE we match up PAYMENT TYPE CODE with AC RN CP if one is a match
>> we show the value
>> > > >
>> > > > if(grid.selectedItem.PAYMENT_TYPE_CODE == test[i])
>> > > >  Alert.show(SHOW ME --->"Remember to reset the station address" );
>> > > >
>> > > >
>> > > >
>> > > > }
>> > > >
>> > > >
>> > > > datagrid hidden column AC, RN, CP are in datagrid
>> > > > user selects RT item from grid and hits button
>> > > > system match's that row with what message should be displayed
>> > > > user never see's RT since its a hidden field in grid
>> > > > user now see's a message displayed as a reminder
>> > > >
>> > >

Re: [flexcoders] Re: modify item before binding to datagrid

2009-05-22 Thread Angelo Anolin
Hi Mark,

Thanks for your patience.  I did write the import code for the ObjectUtil class.

But I still cannot get things properly.

In your code, you have this..

return ObjectUtil.numericC ompare(itemA[ TrackTotal. col], itemB[TrackTotal. 
col]);

my dataGrid's ID is MydataGrid

what does the col pertains to? the column id defined for the datagrid?

Here's my datagrid mxml











The SupplierID is the numeric column.

But when I tried 

private function sortNumericColumn(itemA:Object, itemB:Object): int
{
return ObjectUtil.numericCompare(itemA[MydataGrid.SupplierID], 
itemB[MydataGrid.SupplierID]);
}
in the function you gave, I am getting the error:

Access of possibly undefined property SupplierID through a reference with 
static type mx.controls:DataGrid

Thanks a bunch for your patience.





From: markgoldin_2000 
To: flexcoders@yahoogroups.com
Sent: Friday, 22 May, 2009 21:51:55
Subject: [flexcoders] Re: modify item before binding to datagrid





Of cource I meant:
import mx.utils.ObjectUtil ;

--- In flexcod...@yahoogro ups.com, "markgoldin_ 2000"  
wrote:
>
> How about 
> import.utils. ObjectUtil;
> --- In flexcod...@yahoogro ups.com, Angelo Anolin  wrote:
> >
> > Hi Mark,
> > 
> > I cannot seem to get your code working for me..
> > 
> > I am getting this error:
> > 
> > Access of Undefined Property ObjectUtil..
> > 
> > I am trying to simply copy the function which you have posted.
> > 
> > Any further advise?
> > 
> > 
> > 
> > 
> >  _ _ __
> > From: markgoldin_2000 
> > To: flexcod...@yahoogro ups.com
> > Sent: Wednesday, 20 May, 2009 21:52:25
> > Subject: [flexcoders] Re: modify item before binding to datagrid
> > 
  > > 
> > > 
> > > 
> > > 
> > > Here is what I am doing.
> > > column definition:
> > >  > > sortCompareFunction ="sortNumericCol umnTrackTotal" />
> > > and:
> > > private function sortNumericColumnTr ackTotal( itemA:Object, 
> > > itemB:Object) :int
> > > {
> > > return ObjectUtil.numericC ompare(itemA[ TrackTotal. col], 
> > > itemB[TrackTotal. col]);
> > > } 
> > > 
> > > where TrackTotal is a DG's id.
> > > 
> > > HTH
> > > 
> > > --- In flexcod...@yahoogro ups.com, Angelo Anolin  
> > > wrote:
> > > >
> > > > 
> > > > Hi.
> > > > 
> > > > I am quite new in Flex and would like to ask a simple question.
> > > > 
> > > > I am retrieving datasets from a .NET webservice and binding the same to 
> > > > a datagrid.  The datagrid comes with a feature that when you click on 
> > > > any of the headers, the column is sorted ASC or DESC.
> > > > 
> > > > Now, one column which I am binding to is originally a numeric column.  
> > > > But when it binds to the datagrid, it's data type becomes string.  Is 
> > > > it possible that prior to binding the said column to the datagrid, I 
> > > > would be able to convert it back to its numeric data taype?  Since 
> > > > sorting the column in a string format would give a different result as 
> > > > compared to sorting the same column in a numeric format.
> > > > 
> > > > Thanks.
> > > > 
> > > > Regards.
> > > >
> > >
> >
>


   


  

[flexcoders] Re: How to optimise SWC to its minimal size?

2009-05-22 Thread lytvynyuk
Any ideas? Hey, Flex gurus I know you are here! :)



[flexcoders] Re: modify item before binding to datagrid

2009-05-22 Thread markgoldin_2000
I use col as a reference to the clicked column's dataField retrieved via column 
collection. Just use same as mine code.
--- In flexcoders@yahoogroups.com, Angelo Anolin  wrote:
>
> Hi Mark,
> 
> Thanks for your patience.  I did write the import code for the ObjectUtil 
> class.
> 
> But I still cannot get things properly.
> 
> In your code, you have this..
> 
> return ObjectUtil.numericC ompare(itemA[ TrackTotal. col], itemB[TrackTotal. 
> col]);
> 
> my dataGrid's ID is MydataGrid
> 
> what does the col pertains to? the column id defined for the datagrid?
> 
> Here's my datagrid mxml
> 
>  height="100%" visible="false" dataProvider="{_xmlData.*}" 
> itemClick="getDataItems();">
> 
>  dataField="SupplierID" width="30"/>
>  dataField="CompanyName" width="100"/>
>  dataField="ContactName"  width="100"/>
>  dataField="ContactTitle" width="50"/>
>  dataField="Address" width="150"/>
> 
> 
> 
> The SupplierID is the numeric column.
> 
> But when I tried 
> 
> private function sortNumericColumn(itemA:Object, itemB:Object): int
> {
> return 
> ObjectUtil.numericCompare(itemA[MydataGrid.SupplierID], 
> itemB[MydataGrid.SupplierID]);
> }
> in the function you gave, I am getting the error:
> 
> Access of possibly undefined property SupplierID through a reference with 
> static type mx.controls:DataGrid
> 
> Thanks a bunch for your patience.
> 
> 
> 
> 
> 
> From: markgoldin_2000 
> To: flexcoders@yahoogroups.com
> Sent: Friday, 22 May, 2009 21:51:55
> Subject: [flexcoders] Re: modify item before binding to datagrid
> 
> 
> 
> 
> 
> Of cource I meant:
> import mx.utils.ObjectUtil ;
> 
> --- In flexcod...@yahoogro ups.com, "markgoldin_ 2000"  
> wrote:
> >
> > How about 
> > import.utils. ObjectUtil;
> > --- In flexcod...@yahoogro ups.com, Angelo Anolin  wrote:
> > >
> > > Hi Mark,
> > > 
> > > I cannot seem to get your code working for me..
> > > 
> > > I am getting this error:
> > > 
> > > Access of Undefined Property ObjectUtil..
> > > 
> > > I am trying to simply copy the function which you have posted.
> > > 
> > > Any further advise?
> > > 
> > > 
> > > 
> > > 
> > >  _ _ __
> > > From: markgoldin_2000 
> > > To: flexcod...@yahoogro ups.com
> > > Sent: Wednesday, 20 May, 2009 21:52:25
> > > Subject: [flexcoders] Re: modify item before binding to datagrid
> > > 
>   > > 
> > > > 
> > > > 
> > > > 
> > > > Here is what I am doing.
> > > > column definition:
> > > >  > > > sortCompareFunction ="sortNumericCol umnTrackTotal" />
> > > > and:
> > > > private function sortNumericColumnTr ackTotal( itemA:Object, 
> > > > itemB:Object) :int
> > > > {
> > > > return ObjectUtil.numericC ompare(itemA[ TrackTotal. col], 
> > > > itemB[TrackTotal. col]);
> > > > } 
> > > > 
> > > > where TrackTotal is a DG's id.
> > > > 
> > > > HTH
> > > > 
> > > > --- In flexcod...@yahoogro ups.com, Angelo Anolin  
> > > > wrote:
> > > > >
> > > > > 
> > > > > Hi.
> > > > > 
> > > > > I am quite new in Flex and would like to ask a simple question.
> > > > > 
> > > > > I am retrieving datasets from a .NET webservice and binding the same 
> > > > > to a datagrid.  The datagrid comes with a feature that when you click 
> > > > > on any of the headers, the column is sorted ASC or DESC.
> > > > > 
> > > > > Now, one column which I am binding to is originally a numeric column. 
> > > > >  But when it binds to the datagrid, it's data type becomes string.  
> > > > > Is it possible that prior to binding the said column to the datagrid, 
> > > > > I would be able to convert it back to its numeric data taype?  Since 
> > > > > sorting the column in a string format would give a different result 
> > > > > as compared to sorting the same column in a numeric format.
> > > > > 
> > > > > Thanks.
> > > > > 
> > > > > Regards.
> > > > >
> > > >
> > >
> >
>




Re: [flexcoders] Re: How to optimise SWC to its minimal size?

2009-05-22 Thread Alan Klement

Well, you mention that classes that are used directly or indirectly are
Œgarbage¹, but it¹s being used so they aren¹t garbage

If they were pulled in, then it¹s more than likely that what ever you are
trying to extract, depends on those Œgarbage¹ classes.

On 5/22/09 11:13 AM, "lytvynyuk"  wrote:
> Any ideas? Hey, Flex gurus I know you are here! :)



[flexcoders] Re: LineChart Magic

2009-05-22 Thread jdizowat
So I whipped out my wand and wrote a custom LineSegmentRenderer which extends 
ShadowLineRenderer.  I used updateDisplayList to loop through the 
lineSeriesItems to draw my custom line.  

What I'm charting is surgical cases by day in a given month.  What I wanted to 
show was a linechart that had weekends colored differently so we'd know why the 
case counts plateaued.  I feel like I've just done my first bit of advanced 
coding in actionscript.  I know this isn't very advanced, but hopefully it will 
help someone else trying to achieve a similar effect.  I've left out some of 
the logic code, but you'll get the idea.

var items:Array = (data as LineSeriesSegment).items;
for (var i:int = 0; i < items.length; i++)
{
// get the graphics object
var g:Graphics = graphics;

if (isWeekend)
{
// use weekend lineStyle
g.lineStyle(3, 0x99, 1);
}
else
{
// use the weekday lineStyle
g.lineStyle(2, 0xF2F2F2, 1);
}

// move to the starting point if we are at the 
first item
if (i==0)
g.moveTo(thisItem.x, thisItem.y);

// draw if we are not the last item
if (!lastItem)
{
g.lineTo(nextItem.x, nextItem.y);
}
}





Re: [flexcoders] Re: How to optimise SWC to its minimal size?

2009-05-22 Thread Ian Thomas
You can use the 'externs' command-line option to the Flex compiler to
tell Flex to exclude specific classes - as long as you're sure that
your code _will_ have access to them at runtime.

Documentation here:

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

HTH,
   Ian

On Fri, May 22, 2009 at 4:13 PM, lytvynyuk  wrote:
>
>
> Any ideas? Hey, Flex gurus I know you are here! :)
>
> 


RE: [flexcoders] Re: LineChart Magic

2009-05-22 Thread Jake Churchill
Nice.  I don't see a lot of charting examples but this is nice because I'm
about to start a project plotting multiple items dealing with commodities
and futures and I'm sure I'll need to customize it quite a bit.

 

Jake Churchill
CF Webtools
11204 Davenport, Ste. 100
Omaha, NE  68154
  http://www.cfwebtools.com
402-408-3733 x103

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of jdizowat
Sent: Friday, May 22, 2009 10:36 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: LineChart Magic

 






So I whipped out my wand and wrote a custom LineSegmentRenderer which
extends ShadowLineRenderer. I used updateDisplayList to loop through the
lineSeriesItems to draw my custom line. 

What I'm charting is surgical cases by day in a given month. What I wanted
to show was a linechart that had weekends colored differently so we'd know
why the case counts plateaued. I feel like I've just done my first bit of
advanced coding in actionscript. I know this isn't very advanced, but
hopefully it will help someone else trying to achieve a similar effect. I've
left out some of the logic code, but you'll get the idea.

var items:Array = (data as LineSeriesSegment).items;
for (var i:int = 0; i < items.length; i++)
{
// get the graphics object
var g:Graphics = graphics;

if (isWeekend)
{
// use weekend lineStyle
g.lineStyle(3, 0x99, 1);
}
else
{
// use the weekday lineStyle
g.lineStyle(2, 0xF2F2F2, 1);
}

// move to the starting point if we are at the first item
if (i==0)
g.moveTo(thisItem.x, thisItem.y);

// draw if we are not the last item
if (!lastItem)
{
g.lineTo(nextItem.x, nextItem.y);
}
}



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.339 / Virus Database: 270.12.36/2126 - Release Date: 05/22/09
06:03:00



RE: [flexcoders] localized parseFloat

2009-05-22 Thread Alex Harui
parseFloat is a player API.  I think it will localize with the OS language.  
There might be third-party localizable parseFloat equivalents somewhere.

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

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of thomas parquier
Sent: Friday, May 22, 2009 1:45 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] localized parseFloat





Hi,

Couldn't parseFloat() use the SharedResources properties to parse localized 
strings ?

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



[flexcoders] Local compile issue on Flex Builder 3 on OSX Leopard

2009-05-22 Thread Ryan
I am trying to help my boss set up a Flex project which works fine for me. He 
is on Mac, I am on PC. He can't compile in our properties files, even though he 
has them on his computer.

I access these files via a compiler variable pointing to an absolute path on my 
machine, ie: "C:\my\folder\etc\etc\locales\{locale}"

Below is the info from my boss's setup: 
("-source-path=/Users/doe/Documents/code/amp/trunk/locales/src/main/resources/locales/{locale}"
 is the bad part, everything else works fine!

Thanks!



Compiler argument:

-show-unused-type-selector-warnings=false -locale=en_US 
-source-path=/Users/doe/Documents/code/amp/trunk/locales/src/main/resources/locales/{locale};
 
-services=/Users/doe/Documents/code/amp/trunk/platform/platform-client/src/main/resources/services-config_LOCAL.xml
 -context-root=platform -default-background-color #FF

Error message
unable to open 
'/Users/doe/Documents/code/amp/trunk/locales/src/main/resources/locales/en_US;'

Test on OS:

$ cd 
/Users/doe/Documents/code/amp/trunk/locales/src/main/resources/locales/en_US
$ ls
platformResources.properties
$

So the path is valid per the OS. 



[flexcoders] Re: SWFLoader showing images originally off the 'canvas'

2009-05-22 Thread twcrone70
I must be using the mask incorrectly cause it kills my swf but your suggestion 
led me to another solution that seems to work.  Set the scrollRect on resize 
event to the size I want and seems to crop it.

resize="swfLdr.scrollRect = new Rectangle(0,0,swfLdr.width,swfLdr.height);" />
 
See any problems with this?

- Todd

--- In flexcoders@yahoogroups.com, Clint Tredway  wrote:
>
> Use a canvas as a mask on the swf loader and that should work.
> 
> On Fri, May 22, 2009 at 9:20 AM, twcrone70  wrote:
> 
> >
> >
> > In Flex I am trying to show "examples" of SWFs that run on portable devices
> > in FlashLite. I am able to open them in a Flex control (HBox, TitleWindow
> > etc.) and pass necessariy parameters but some images that are normally off
> > the 'canvas' or 'stage' for the flash SWFs are showing up outside the
> > container that I am loading the SWFs into.
> >
> > Setting heights and widths seem to constrain the "main" part of the swf but
> > the other stuff still appears off ends but within the boundaries of the Flex
> > app itself.
> >
> > Any ideas how to 'crop' the Flash lite SWFs?
> >
> > Thanks,
> >
> > - Todd
> >
> >  
> >
> 
> 
> 
> -- 
> "When you choose hope, anything is possible."
> -Christopher Reeve
>




[flexcoders] Re: Local compile issue on Flex Builder 3 on OSX Leopard

2009-05-22 Thread Ryan
nevermind we fixed it. thanks!



[flexcoders] Multi-column drop-in checkbox renderer

2009-05-22 Thread Richard Rodseth
I am creating a CheckBox item renderer (redacted code at the end of this
post). Using the static methods that return a ClassFactory lets me tell the
renderer which column it applies to, as follows:

itemRenderer="{PermissionCheckBox.factory('columnName')}"

The renderer dispatches a bubbling event, for which I have to attach a
listener using AS (or create a subclass of the grid that adds Event
metadata):

private function onCreationComplete(event:Event):void {


myGrid.addEventListener(ChangePermissionEvent.CHANGE_PERMISSION,
onPermissionChange, false,0,true);

}

So far, so good. What's the cleanest way to get the checkbox selected state
to bind to the property indicated by dataField (or columnName).

Do I have to resort to something like this:

http://techmytongue.blogspot.com/2009/04/reuse-itemrenderers-for-multiple.html

or go back to an inline renderer?

The effect I want is:
Ihttp://www.adobe.com/2006/mxml";
selected="{data[this.columnName]}" change="onChange(event)" >

Thanks.

Renderer-in-progress:


http://www.adobe.com/2006/mxml";
label="{columnName:String}" change="onChange(event)" >







[flexcoders] Re: modify item before binding to datagrid

2009-05-22 Thread valdhor
This is how I would do it..


 
 
 
 
 
 
 


private function IDCompare(itemA:Object, itemB:Object):int
{
 return ObjectUtil.numericCompare(itemA.SupplierID,
itemB.SupplierID);
}

--- In flexcoders@yahoogroups.com, Angelo Anolin 
wrote:
>
> Hi Mark,
>
> Thanks for your patience.  I did write the import code for the
ObjectUtil class.
>
> But I still cannot get things properly.
>
> In your code, you have this..
>
> return ObjectUtil.numericC ompare(itemA[ TrackTotal. col],
itemB[TrackTotal. col]);
>
> my dataGrid's ID is MydataGrid
>
> what does the col pertains to? the column id defined for the datagrid?
>
> Here's my datagrid mxml
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> The SupplierID is the numeric column.
>
> But when I tried
>
> private function sortNumericColumn(itemA:Object, itemB:Object): int
> {
> return
ObjectUtil.numericCompare(itemA[MydataGrid.SupplierID],
itemB[MydataGrid.SupplierID]);
> }
> in the function you gave, I am getting the error:
>
> Access of possibly undefined property SupplierID through a reference
with static type mx.controls:DataGrid
>
> Thanks a bunch for your patience.
>
>
>
>
> 
> From: markgoldin_2000 markgoldin_2...@...
> To: flexcoders@yahoogroups.com
> Sent: Friday, 22 May, 2009 21:51:55
> Subject: [flexcoders] Re: modify item before binding to datagrid
>
>
>
>
>
> Of cource I meant:
> import mx.utils.ObjectUtil ;
>
> --- In flexcod...@yahoogro ups.com, "markgoldin_ 2000"  >
> > How about
> > import.utils. ObjectUtil;
> > --- In flexcod...@yahoogro ups.com, Angelo Anolin 
wrote:
> > >
> > > Hi Mark,
> > >
> > > I cannot seem to get your code working for me..
> > >
> > > I am getting this error:
> > >
> > > Access of Undefined Property ObjectUtil..
> > >
> > > I am trying to simply copy the function which you have posted.
> > >
> > > Any further advise?
> > >
> > >
> > >
> > >
> > >  _ _ __
> > > From: markgoldin_2000 
> > > To: flexcod...@yahoogro ups.com
> > > Sent: Wednesday, 20 May, 2009 21:52:25
> > > Subject: [flexcoders] Re: modify item before binding to datagrid
> > >
>   > >
> > > >
> > > >
> > > >
> > > > Here is what I am doing.
> > > > column definition:
> > > > 
> > > > and:
> > > > private function sortNumericColumnTr ackTotal( itemA:Object,
itemB:Object) :int
> > > > {
> > > > return ObjectUtil.numericC ompare(itemA[ TrackTotal. col],
itemB[TrackTotal. col]);
> > > > }
> > > >
> > > > where TrackTotal is a DG's id.
> > > >
> > > > HTH
> > > >
> > > > --- In flexcod...@yahoogro ups.com, Angelo Anolin
 wrote:
> > > > >
> > > > >
> > > > > Hi.
> > > > >
> > > > > I am quite new in Flex and would like to ask a simple
question.
> > > > >
> > > > > I am retrieving datasets from a .NET webservice and binding
the same to a datagrid.  The datagrid comes with a feature that when you
click on any of the headers, the column is sorted ASC or DESC.
> > > > >
> > > > > Now, one column which I am binding to is originally a numeric
column.  But when it binds to the datagrid, it's data type becomes
string.  Is it possible that prior to binding the said column to the
datagrid, I would be able to convert it back to its numeric data taype? 
Since sorting the column in a string format would give a different
result as compared to sorting the same column in a numeric format.
> > > > >
> > > > > Thanks.
> > > > >
> > > > > Regards.
> > > > >
> > > >
> > >
> >
>



RE: [flexcoders] Multi-column drop-in checkbox renderer

2009-05-22 Thread Alex Harui
Sounds like a lot of work and I'm not sure I quite follow, but CheckBox already 
implements IDropInListItemRenderer and will set its check mark based on the 
Boolean value of the dataField in the data item

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

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Richard Rodseth
Sent: Friday, May 22, 2009 10:48 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Multi-column drop-in checkbox renderer





I am creating a CheckBox item renderer (redacted code at the end of this post). 
Using the static methods that return a ClassFactory lets me tell the renderer 
which column it applies to, as follows:

itemRenderer="{PermissionCheckBox.factory('columnName')}"

The renderer dispatches a bubbling event, for which I have to attach a listener 
using AS (or create a subclass of the grid that adds Event metadata):

private function onCreationComplete(event:Event):void {


myGrid.addEventListener(ChangePermissionEvent.CHANGE_PERMISSION, 
onPermissionChange, false,0,true);

}

So far, so good. What's the cleanest way to get the checkbox selected state to 
bind to the property indicated by dataField (or columnName).

Do I have to resort to something like this:

http://techmytongue.blogspot.com/2009/04/reuse-itemrenderers-for-multiple.html

or go back to an inline renderer?

The effect I want is:
Ihttp://www.adobe.com/2006/mxml"; 
selected="{data[this.columnName]}" change="onChange(event)" >

Thanks.

Renderer-in-progress:


http://www.adobe.com/2006/mxml"; 
label="{columnName:String}" change="onChange(event)" >








Re: [flexcoders] absolute paths for mx:script source

2009-05-22 Thread Manish Jethani
On Fri, May 22, 2009 at 5:32 AM, coder3  wrote:

> I wonder if there is a way to add absolute path to mx:script
>
> for example, my file is under src/app1/app1.mxml. and the as file is
> src/common/asfile.as

[...]

> i tried to use
>        
>
> but the error shows: no .../src/app1/common/asfile.as found.

That would be the absolute path on your disk.

For instance:

  

Manish


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

2009-05-22 Thread Dharmendra Chauhan
Hi,
I really need to have more than 15 menu item displayed on Context Menu. I 
desperately need some workaround or ideas to achieve this 

My client has invested thousands of dollar in Flex Project, he definitely need 
more than 15 menu item.If this project failed , client will NEVER think to 
invest in flex.
 

Had I been  aware of this limitation before I would have thought some solution 
by now.This comes as a surprise to me at the last moment ,just fews days before 
Prod Date.

Pls gents help me get rid of this ...PLEASE provide some ideas.

Thanks in advance.

Thanks,
Dharmendra 





[flexcoders] session.getAttribute("somekey") returning NULL in SessionDestroyed

2009-05-22 Thread Dharmendra Chauhan
Hi all,
session.getAttribute("somekey") is returning null  in 
SessionDestroyed() method of flex listener.

Below are the steps I am following 

1) I am adding flexLister in contextInitialized method of ServletContextListener

   FlexSession.addSessionCreateListener(myListener) 

2) In sessionCreate method 
sessionCreated(FlexSession session) {
   session.addSessionDestroyListener(this)

}   
3) some where in applicaion I am putting a key vlaue pair in session like this

FlexContext.getSession().setAttribute("somekey" , someVlue)  ;


The issue is when I try to retreive vale from session

her is how I m retreiving value 

   sessionDestroyed(FlexSession session) {

  session.getAttribute("somekey"); this return null WHY ?

   }


This is always returning me null

Pls note that I am RTMP channel and  version of LCDS is 2.6 

I also tried RTMPFlexSession 

  RTMPFlexSession.addSessionCreateListener(myListener) 

but no luck  , still got null 

Am I doing anything wrong  ?


Thanks ,
Dharmendra




 


 



Re: [flexcoders] Ctrl click in combobox

2009-05-22 Thread Manish Jethani
On Fri, May 22, 2009 at 5:47 AM, lampei  wrote:
> Until recently, I did not know that you could reset the combobox back to the 
> "prompt" value by ctrl-clicking the value in the combobox dropdown.  However, 
> as most people don't know that this is a possiblity with the combobox, I'm 
> trying to mimic this functionality by setting the selectedIndex to -1 if a 
> person clicks (without the ctrl key) the same value that is already selected.
>
> I have yet to find the "selectedIndexChanged" property change to anything 
> other than false when the "change" event fires, so I'm unable to use that 
> (same for selectedItemChanged).  I tried setting the item under the mouse 
> when "itemRollOver" fires to a property, then set it to null when 
> "itemRollOut" fires.  Then when the person clicks, I said if the selectedItem 
> == the value underneath the mouse during itemRollOver, set the selectedIndex 
> = -1, however, the itemRollOut seems to fire before the click event is fired. 
>  I've also yet to find where the code is for the ctrl-left click, or what 
> causes that event to fire.
>

The code is in ListBase.as: the selectItem function (called from
mouseDownHandler).

// allow unselecting via ctrl-click
if (ctrlKey && selectedData[uid])
{
selectionChange = true;
clearSelected(transition);
}

Here's the solution.

 1.  Make a custom class, MyList.

public class MyList extends List
{
override protected function selectItem(item:IListItemRenderer,
shiftKey:Boolean, ctrlKey:Boolean,
transition:Boolean = true):Boolean
{
var index:int = itemRendererToIndex(item);

if (index == selectedIndex)
ctrlKey = true;

return super.selectItem(item, shiftKey, ctrlKey, transition);
}
}

 2.  Use this class as the dropdown in the ComboBox.

  

Tada!

Manish

-- 
www.manishjethani.com


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

2009-05-22 Thread Yves Riel
What about intercepting the right-click at the browser level and
displaying your own contextual menu? However, you might have some
browser incompatibility to look at.
 
http://blog.another-d-mention.ro/programming/right-click-and-custom-cont
ext-menu-in-flash-flex/



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Dharmendra Chauhan
Sent: Friday, May 22, 2009 3:03 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] NEED more than 15 menu item in Context Menu 





Hi,
I really need to have more than 15 menu item displayed on Context Menu.
I desperately need some workaround or ideas to achieve this 

My client has invested thousands of dollar in Flex Project, he
definitely need more than 15 menu item.If this project failed , client
will NEVER think to invest in flex.


Had I been aware of this limitation before I would have thought some
solution by now.This comes as a surprise to me at the last moment ,just
fews days before Prod Date.

Pls gents help me get rid of this ...PLEASE provide some ideas.

Thanks in advance.

Thanks,
Dharmendra 






[flexcoders] Access FormItem child

2009-05-22 Thread markgoldin_2000
If I have a FormItem like this:

http://www.adobe.com/2006/mxml"; 
width="100%" height="100%" direction="horizontal">
  
 



then in another mxml fil where I am using that component:



is there a way of accessing username via markup tags? Or it's only via AS?

Thanks



[flexcoders] Waiting for Flash Player to connect to the debugger

2009-05-22 Thread luvfotography
I can't run the debugger today
I'm getting:  Launching: Waiting for Flash Player to connect to the debugger

yesterday all was working fine, never seen this error before, 
Run mode takes forever now, the following 5 line flex file takes 16 seconds to 
show 
up in the browser.  Yesterday, less than 1.


I've got a MAC:
running: MAC OS x version 10.5.6

Model Name: iMac
  Model Identifier: iMac8,1
  Processor Name:   Intel Core 2 Duo
  Processor Speed:  2.4 GHz
  Number Of Processors: 1
  Total Number Of Cores:2
  L2 Cache: 6 MB
  Memory:   2 GB
  Bus Speed:1.07 GHz
  Boot ROM Version: IM81.00C1.B00
  SMC Version:  1.29f1
   
 I'm running Safari: Version 3.2.1 (5525.27.1)
and Firefox V 3.0.10

I have Flash version 10,0,12,36 installed.

I've tried using both Safari and Firefox,  same problem on both.


Here's my sourcecode in a NEW workspace and project:


http://www.adobe.com/2006/mxml"; layout="absolute">





Hit the debug button and get:

 

Launching: Waiting for Flash Player to connect to the debugger


Failed to connect; session timed out.
Ensure that:
  1. You compiled your Flash application with debugging on.
  2. You are running the debugger version of Flash Player.


I updated Flash player 10.0.22.87
still same problem.
 

I then reinstalled Flex Builder 3 into the same directory, and updated it to: 
3.0.2.213193
and am using Flash Player 9.0.124.0
Still cannot debug.

here is my eclipse config.ini:
#Eclipse Runtime Configuration File
#Thu Mar 31 18:10:37 PST 2005
osgi.bundles=org.eclipse.equinox.com...@2:start,org.eclipse.update.configura...@3:start,org.eclipse.core.runt...@start
osgi.bundles.defaultStartLevel=4
eclipse.product=com.adobe.flexbuilder.standalone.product
osgi.splashPath=platform\:/base/plugins/com.adobe.flexbuilder.standalone
osgi.instance.area.defau...@user.home/Documents/Flex Builder 3
#osgi.user.d...@user.home/Documents/Flex Builder 3
osgi.configuration.ar...@user.home/Documents/Flex Builder 3/configuration
osgi.sharedConfiguration.area=platform\:/base/configuration
osgi.sharedConfiguration.area.readOnly=true
osgi.configuration.cascaded=true

I've cleared the cache out of BOTH browsers and Flash Player.
Still cannot debug.??

Any suggestions?
thanks




Re: [flexcoders] localized parseFloat

2009-05-22 Thread Manish Jethani
On Fri, May 22, 2009 at 2:14 PM, thomas parquier
 wrote:

> Couldn't parseFloat() use the SharedResources properties to parse localized
> strings ?

If you intend to parse a string like "1.234,56", I think you'll have
to run it through a NumberFormatter first ("1234.56") before you send
it to the parse function.

Manish


[flexcoders] Re: Waiting for Flash Player to connect to the debugger

2009-05-22 Thread a.scavarelli
Hmm, I often get problems like this when, for some reason, another instance of 
the debugger/player is running. Try making sure you are always closing each 
instance properly after running your program. Also check out your task manager 
to see if there are any running in the background.

Hopefully that helps. If not, hopefully another wiser can :)


--- In flexcoders@yahoogroups.com, "luvfotography"  wrote:
>
> I can't run the debugger today
> I'm getting:  Launching: Waiting for Flash Player to connect to the debugger
> 
> yesterday all was working fine, never seen this error before, 
> Run mode takes forever now, the following 5 line flex file takes 16 seconds 
> to show 
> up in the browser.  Yesterday, less than 1.
> 
> 
> I've got a MAC:
> running: MAC OS x version 10.5.6
> 
> Model Name:   iMac
>   Model Identifier:   iMac8,1
>   Processor Name: Intel Core 2 Duo
>   Processor Speed:2.4 GHz
>   Number Of Processors:   1
>   Total Number Of Cores:  2
>   L2 Cache:   6 MB
>   Memory: 2 GB
>   Bus Speed:  1.07 GHz
>   Boot ROM Version:   IM81.00C1.B00
>   SMC Version:1.29f1
>
>  I'm running Safari: Version 3.2.1 (5525.27.1)
> and Firefox V 3.0.10
> 
> I have Flash version 10,0,12,36 installed.
> 
> I've tried using both Safari and Firefox,  same problem on both.
> 
> 
> Here's my sourcecode in a NEW workspace and project:
> 
> 
> http://www.adobe.com/2006/mxml"; layout="absolute">
>   
>   
>   
> 
> 
> Hit the debug button and get:
> 
>  
> 
> Launching: Waiting for Flash Player to connect to the debugger
> 
> 
> Failed to connect; session timed out.
> Ensure that:
>   1. You compiled your Flash application with debugging on.
>   2. You are running the debugger version of Flash Player.
> 
> 
> I updated Flash player 10.0.22.87
> still same problem.
>  
> 
> I then reinstalled Flex Builder 3 into the same directory, and updated it to: 
> 3.0.2.213193
> and am using Flash Player 9.0.124.0
> Still cannot debug.
> 
> here is my eclipse config.ini:
> #Eclipse Runtime Configuration File
> #Thu Mar 31 18:10:37 PST 2005
> osgi.bundles=org.eclipse.equinox.com...@2:start,org.eclipse.update.configura...@3:start,org.eclipse.core.runt...@start
> osgi.bundles.defaultStartLevel=4
> eclipse.product=com.adobe.flexbuilder.standalone.product
> osgi.splashPath=platform\:/base/plugins/com.adobe.flexbuilder.standalone
> osgi.instance.area.defau...@user.home/Documents/Flex Builder 3
> #osgi.user.d...@user.home/Documents/Flex Builder 3
> osgi.configuration.ar...@user.home/Documents/Flex Builder 3/configuration
> osgi.sharedConfiguration.area=platform\:/base/configuration
> osgi.sharedConfiguration.area.readOnly=true
> osgi.configuration.cascaded=true
> 
> I've cleared the cache out of BOTH browsers and Flash Player.
> Still cannot debug.??
> 
> Any suggestions?
> thanks
>




Re: [flexcoders] Re: Waiting for Flash Player to connect to the debugger

2009-05-22 Thread Nate Beck
Did you install the Debug version of Flash Player?
http://www.adobe.com/support/flashplayer/downloads.html

Under this section:
Adobe Flash Player 10 — Debugger Versions (aka debug players or content
debuggers)

On Fri, May 22, 2009 at 1:46 PM, a.scavarelli wrote:

>
>
> Hmm, I often get problems like this when, for some reason, another instance
> of the debugger/player is running. Try making sure you are always closing
> each instance properly after running your program. Also check out your task
> manager to see if there are any running in the background.
>
> Hopefully that helps. If not, hopefully another wiser can :)
>
>
> --- In flexcoders@yahoogroups.com ,
> "luvfotography"  wrote:
> >
> > I can't run the debugger today
> > I'm getting: Launching: Waiting for Flash Player to connect to the
> debugger
> >
> > yesterday all was working fine, never seen this error before,
> > Run mode takes forever now, the following 5 line flex file takes 16
> seconds to show
> > up in the browser. Yesterday, less than 1.
> >
> >
> > I've got a MAC:
> > running: MAC OS x version 10.5.6
> >
> > Model Name: iMac
> > Model Identifier: iMac8,1
> > Processor Name: Intel Core 2 Duo
> > Processor Speed: 2.4 GHz
> > Number Of Processors: 1
> > Total Number Of Cores: 2
> > L2 Cache: 6 MB
> > Memory: 2 GB
> > Bus Speed: 1.07 GHz
> > Boot ROM Version: IM81.00C1.B00
> > SMC Version: 1.29f1
> >
> > I'm running Safari: Version 3.2.1 (5525.27.1)
> > and Firefox V 3.0.10
> >
> > I have Flash version 10,0,12,36 installed.
> >
> > I've tried using both Safari and Firefox, same problem on both.
> >
> >
> > Here's my sourcecode in a NEW workspace and project:
> >
> > 
> > http://www.adobe.com/2006/mxml";
> layout="absolute">
> > 
> > 
> >
> > 
> >
> > Hit the debug button and get:
> >
> >
> >
> > Launching: Waiting for Flash Player to connect to the debugger
> >
> >
> > Failed to connect; session timed out.
> > Ensure that:
> > 1. You compiled your Flash application with debugging on.
> > 2. You are running the debugger version of Flash Player.
> >
> >
> > I updated Flash player 10.0.22.87
> > still same problem.
> >
> >
> > I then reinstalled Flex Builder 3 into the same directory, and updated it
> to: 3.0.2.213193
> > and am using Flash Player 9.0.124.0
> > Still cannot debug.
> >
> > here is my eclipse config.ini:
> > #Eclipse Runtime Configuration File
> > #Thu Mar 31 18:10:37 PST 2005
> > osgi.bundles=org.eclipse.equinox.com...@2
> :start,org.eclipse.update.configura...@3
> :start,org.eclipse.core.runt...@start
> > osgi.bundles.defaultStartLevel=4
> > eclipse.product=com.adobe.flexbuilder.standalone.product
> > osgi.splashPath=platform\:/base/plugins/com.adobe.flexbuilder.standalone
> > osgi.instance.area.defau...@user.home/Documents/Flex
> Builder 3
> > #osgi.user.d...@user.home <%23osgi.user.dir%3D%40user.home>/Documents/Flex
> Builder 3
> > osgi.configuration.ar...@user.home/Documents/Flex
> Builder 3/configuration
> > osgi.sharedConfiguration.area=platform\:/base/configuration
> > osgi.sharedConfiguration.area.readOnly=true
> > osgi.configuration.cascaded=true
> >
> > I've cleared the cache out of BOTH browsers and Flash Player.
> > Still cannot debug.??
> >
> > Any suggestions?
> > thanks
> >
>
>  
>



-- 

Cheers,
Nate

http://blog.natebeck.net


[flexcoders] BindingUtils question.

2009-05-22 Thread markflex2007
I read a demo
BindingUtils.bindProperty(dogNameText, "text", myDog, "name")

dogNameText is textInput and myDog is a object

how to I bind dogNameText's Texr property to one variable like "myString"

BindingUtils.bindProperty(dogNameText, "text", myString) give me error.

Please give me a idea how to do this.Thanks


Mark



Re: [flexcoders] Re: Waiting for Flash Player to connect to the debugger

2009-05-22 Thread Manish Jethani
On Sat, May 23, 2009 at 2:16 AM, a.scavarelli  wrote:
> Hmm, I often get problems like this when, for some reason, another instance 
> of the debugger/player is running. Try making sure you are always closing 
> each instance properly after running your program. Also check out your task 
> manager to see if there are any running in the background.

The command-line debugger (fdb) listens for the player to connect on
port 7935. So on OS X you could run this command to see if another
instance is already listening:

lsof -i | grep 7935

Output:

java  5408 manish6u  IPv6 0x395ba24  0t0  TCP *:7935 (LISTEN)

That most likely is fdb. You can kill it using its PID:

kill -9 5408

I don't know if this'll work for Flex Builder though.

Manish

-- 
www.manishjethani.com


Re: [flexcoders] localized parseFloat

2009-05-22 Thread thomas parquier
Manish,

NumberFormatter input is a number, whereas parsing should occur on strings
already localized ("1 234,56"=>1234.56).

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


2009/5/22 Manish Jethani 

>
>
> On Fri, May 22, 2009 at 2:14 PM, thomas parquier
> > wrote:
>
> > Couldn't parseFloat() use the SharedResources properties to parse
> localized
> > strings ?
>
> If you intend to parse a string like "1.234,56", I think you'll have
> to run it through a NumberFormatter first ("1234.56") before you send
> it to the parse function.
>
> Manish
>  
>


Re: [flexcoders] Multi-column drop-in checkbox renderer

2009-05-22 Thread Richard Rodseth
 In that case, I would expect my subclass of CheckBox to do the same. I've
added a super call as follows:

override public function set data(value:Object):void {
super.data = value;
_row = value as MyRow;
}

and set the dataField on the column.

Consider the following example from the documentation:

http://livedocs.adobe.com/flex/3/html/cellrenderer_5.html

I added the "Change" button to change the underlying data. It only works if
I call refresh() on the collection. Is that expected? If so, then I might be
on the right track if I get the right incantation of rendererIsEditor,
dataField, editorDataField etc.

http://www.adobe.com/2006/mxml"; layout="vertical">





















On Fri, May 22, 2009 at 11:17 AM, Alex Harui  wrote:

>
>
>  Sounds like a lot of work and I’m not sure I quite follow, but CheckBox
> already implements IDropInListItemRenderer and will set its check mark based
> on the Boolean value of the dataField in the data item
>
>
>
> Alex Harui
>
> Flex SDK Developer
>
> Adobe Systems Inc. 
>
> Blog: http://blogs.adobe.com/aharui
>
>
>
> *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
> Behalf Of *Richard Rodseth
> *Sent:* Friday, May 22, 2009 10:48 AM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] Multi-column drop-in checkbox renderer
>
>
>
>
>
>
>  I am creating a CheckBox item renderer (redacted code at the end of this
> post). Using the static methods that return a ClassFactory lets me tell the
> renderer which column it applies to, as follows:
>
> itemRenderer="{PermissionCheckBox.factory('columnName')}"
>
> The renderer dispatches a bubbling event, for which I have to attach a
> listener using AS (or create a subclass of the grid that adds Event
> metadata):
>
> private function onCreationComplete(event:Event):void {
>
>
> myGrid.addEventListener(ChangePermissionEvent.CHANGE_PERMISSION,
> onPermissionChange, false,0,true);
>
> }
>
> So far, so good. What's the cleanest way to get the checkbox selected state
> to bind to the property indicated by dataField (or columnName).
>
> Do I have to resort to something like this:
>
>
> http://techmytongue.blogspot.com/2009/04/reuse-itemrenderers-for-multiple.html
>
> or go back to an inline renderer?
>
> The effect I want is:
> Ihttp://www.adobe.com/2006/mxml";
> selected="{data[this.columnName]}" change="onChange(event)" >
>
> Thanks.
>
> Renderer-in-progress:
>
> 
> http://www.adobe.com/2006/mxml";
> label="{columnName:String}" change="onChange(event)" >
>
> 
> 
> 
> 
>
>   
>


Re: [flexcoders] BindingUtils question.

2009-05-22 Thread Rajan Jain


Try using

BindingUtils.bindSetter and create function.



From: markflex2007 
To: flexcoders@yahoogroups.com
Sent: Friday, May 22, 2009 5:07:21 PM
Subject: [flexcoders] BindingUtils question.





I read a demo
BindingUtils. bindProperty( dogNameText, "text", myDog, "name")

dogNameText is textInput and myDog is a object

how to I bind dogNameText' s Texr property to one variable like "myString"

BindingUtils. bindProperty( dogNameText, "text", myString) give me error.

Please give me a idea how to do this.Thanks

Mark





  

Re: [flexcoders] localized parseFloat

2009-05-22 Thread Manish Jethani
On Sat, May 23, 2009 at 2:52 AM, thomas parquier
 wrote:

> NumberFormatter input is a number, whereas parsing should occur on strings
> already localized ("1 234,56"=>1234.56).

That's not true. You can pass a string to NumberFormatter.

See this example:

 var nf:NumberFormatter = new NumberFormatter();

  nf.decimalSeparatorFrom = ",";
  nf.thousandsSeparatorFrom = ".";
  nf.decimalSeparatorTo = ".";
  nf.thousandsSeparatorTo = "";

  var s:String = nf.format("1.234,56");

  trace(s);

  var f:Number = parseFloat(s);

  trace(f);

Manish


[flexcoders] Re: BindingUtils question.

2009-05-22 Thread Marius-Remus Mate
Have a look here -- http://blogu.lu/mrm/2009/01/data-binding-and-actionscript-3/

--- In flexcoders@yahoogroups.com, "markflex2007"  wrote:
>
> I read a demo
> BindingUtils.bindProperty(dogNameText, "text", myDog, "name")
> 
> dogNameText is textInput and myDog is a object
> 
> how to I bind dogNameText's Texr property to one variable like "myString"
> 
> BindingUtils.bindProperty(dogNameText, "text", myString) give me error.
> 
> Please give me a idea how to do this.Thanks
> 
> 
> Mark
>




Re: [flexcoders] localized parseFloat

2009-05-22 Thread thomas parquier
Thanks you Manish.

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


2009/5/22 Manish Jethani 

>
>
> On Sat, May 23, 2009 at 2:52 AM, thomas parquier
>
> > wrote:
>
> > NumberFormatter input is a number, whereas parsing should occur on
> strings
> > already localized ("1 234,56"=>1234.56).
>
> That's not true. You can pass a string to NumberFormatter.
>
> See this example:
>
> var nf:NumberFormatter = new NumberFormatter();
>
> nf.decimalSeparatorFrom = ",";
> nf.thousandsSeparatorFrom = ".";
> nf.decimalSeparatorTo = ".";
> nf.thousandsSeparatorTo = "";
>
> var s:String = nf.format("1.234,56");
>
> trace(s);
>
> var f:Number = parseFloat(s);
>
> trace(f);
>
> Manish
>  
>


Re: [flexcoders] absolute paths for mx:script source

2009-05-22 Thread coder3



is there a way or a key to go to the project root directory relatively?

thanks

C


Manish Jethani wrote:
> 
> On Fri, May 22, 2009 at 5:32 AM, coder3  wrote:
> 
>> I wonder if there is a way to add absolute path to mx:script
>>
>> for example, my file is under src/app1/app1.mxml. and the as file is
>> src/common/asfile.as
> 
> [...]
> 
>> i tried to use
>>        
>>
>> but the error shows: no .../src/app1/common/asfile.as found.
> 
> That would be the absolute path on your disk.
> 
> For instance:
> 
>   
> 
> Manish
> 
> 

-- 
View this message in context: 
http://www.nabble.com/absolute-paths-for-mx%3Ascript-source-tp23662408p23678693.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] absolute paths for mx:script source

2009-05-22 Thread Manish Jethani
On Sat, May 23, 2009 at 3:45 AM, coder3  wrote:

> is there a way or a key to go to the project root directory relatively?

The Flex compiler (mxmlc) doesn't know about "projects". If Flex
Builder has any special variables like ${PROJECT_ROOT} or such
settings, I'm not aware of that.

Manish


[flexcoders] Re: simple array?

2009-05-22 Thread Eric Cooper
Two good points.

I used an Array, as I wrote, to try to show how Jason might have done what he 
had initially intended using arrays. I didn't mean to suggest that that's how 
it would be best done. Sorry for confusion. I guess I just like the similarity 
of arrays and objects - something that is not seen in all languages.

As for efficiency, I would probably go with static const int's (in lieu of 
enums) and use an array. This would require to iterating - just simple offset 
into array. Something like,

static const PAYMENT_TYPE_AC:int = 0;
static const PAYMENT_TYPE_RN:int = 1;
static const PAYMENT_TYPE_CP:int = 2;
static const PAYMENT_TYPE_CR:int = 3;

static const PAYMENT_MESSAGES:Array = 
[
"Remember to reset the station 
address.",
"Remember to reset the station 
expiration date.",
"Remember to contact contractor to 
remove the certificates from this station.",
"Remember to cancel the refund payment."
];


If there are better ways, I am always happy to hear them. I am still pretty new 
to this Flex thing.

-eric

--- In flexcoders@yahoogroups.com, Charles Parcell  wrote:
>
> Additionally, utilizing a loop to locate an item can eat up cycles if the
> list of codes gets to be large.  Granted that in the case of this example
> looping 3 or even 10 items is likely not going to be an issue in anyway.
> Something to think about if the application of this example is used
> differently.
> 
> Charles P.
> 
> 
> On Fri, May 22, 2009 at 10:50 AM, Charles Parcell
> wrote:
> 
> > Why even have the Array aspect in the second example? It stands as a
> > pointless container for what we are seeing it used for. Unless there will be
> > some additional items added to it that we have not seen yet.
> >
> > I just feel the need to point that out. :)
> >
> > Charles P.
> >
> >
> >
> > On Thu, May 21, 2009 at 3:49 PM, Eric Cooper  wrote:
> >
> >> I just tried compiling what I wrote - and realized that it didn't... so
> >> here are two variants. The first is same as previous, but it compiles. The
> >> second may be more in the spirit of what you were attempting initially - 
> >> and
> >> kind of highlights similarities between arrays and objects.
> >>
> >> First:
> >>
> >>var records:Array = new Array(
> >>{ code:"AC", text:"Remember to
> >> reset the station address." },
> >>{ code:"RN", text:"Remember to
> >> reset the station expiration date." },
> >>{ code:"CP", text:"Remember to
> >> contact contractor to remove the certificates from this station." },
> >>{ code:"CR", text:"Remember to
> >> cancel the refund payment." }
> >>);
> >>
> >> for each (var test:Object in records) {
> >>if
> >> (grid.selectedItem.PAYMENT_TYPE_CODE == test.code)
> >>Alert.show(test.text );
> >>}
> >>
> >>
> >> Second:
> >>
> >>var PAYMENT_TYPE_CODE:String = "CR";
> >> var records:Array = new Array(
> >>{ "AC": "Remember to reset the
> >> station address." },
> >>{ "RN": "Remember to reset the
> >> station expiration date." },
> >>{ "CP": "Remember to contact
> >> contractor to remove the certificates from this station." },
> >>{ "CR": "Remember to cancel the
> >> refund payment." }
> >>);
> >>
> >> for (var i:int = 0; i < records.length;
> >> ++i) {
> >>if
> >> (records[i][grid.selectedItem.PAYMENT_TYPE_CODE])
> >>
> >>  Alert.show(records[i][PAYMENT_TYPE_CODE]);
> >> }
> >>
> >>
> >>
> >>
> >> --- In flexcoders@yahoogroups.com, "Jason B"  wrote:
> >> >
> >> > SWEET thanks
> >> >
> >> > --- In flexcoders@yahoogroups.com, "Eric Cooper"  wrote:
> >> > >
> >> > > How about this:
> >> > >
> >> > > var records:Array = new Array(
> >> > > { code:"AC", text:"Remember to
> >> reset the station address." },
> >> > > { code:"RN", text:"Remember to
> >> reset the station expiration date." },
> >> > > { code:"CP", text:"Remember to
> >> contact contractor to remove the certificates from this station." },
> >> > > { code:"CR", t

[flexcoders] Problem importing classes with D.eval

2009-05-22 Thread Alexandre Demeure
Hi,

I write you again because I haven't manage to use D.importClass(Label); 
However, by using personnal classes, I was able to indirectly create labels, 
here is
the code:
I have try to create a personal class which inerit of Label class
or which have a Label property. The two working examples show how I did :

Example 1 what it works :


 http://www.adobe.com/2006/mxml"; 
creationComplete="init()"
layout="vertical" cornerRadius="0" alpha="1.0" backgroundGradientAlphas="[1.0,
1.0]" backgroundGradientColors="[#EF0808, #F6E8E8]" color="#22B21B"
borderColor="#202FC1">
 
 
 
 


maClasse.as :

package 
{
import mx.controls.Label;
public class maClasse extends Label
{
public function maClasse(name:String)
{
super();
super.text = name;
}
}
}

Example 2 what it works (just maClasse changed) : 

maClasse.as :

package 
{
import mx.controls.Label;
public class maClasse
{
public var lab:Label;
public function maClasse(name:String)
{
super();
lab = new Label();
super.text = name;
}
}
}

_
These examples work pretty fine. No runtime error.
However it's still impossible to directly import and use a Label with D.eval,
following code fails at runtime:


The error message is :

Runtime Error: msg.rt.no.class [line:1]
at r1.deval.rt::CallExpr/getAny()
at r1.deval.rt::ExprStmt/exec()
at r1.deval.rt::Block/exec()
at r1.deval.rt::Block/run()
at r1.deval.rt::Env$/run()
at r1.deval::D$/eval()
at test/init()
at test/___test_Application1_creationComplete()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
at mx.core::UIComponent/set initialized()
at mx.managers::LayoutManager/doPhasedInstantiation()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at mx.core::UIComponent/callLaterDispatcher2()
at mx.core::UIComponent/callLaterDispatcher()


_
We suspect a problem with namespace or something like that (Label is defined 
under a
specific namespace)
But we don't know how to import a namespace in D.eval neither how to use the
namespaceand neither if it's really the problem ;o)

Does anyone have an idea about that problem?

Wishes



  

[flexcoders] Re: simple array?

2009-05-22 Thread Eric Cooper
Two good points.

I used an Array, as I wrote, to try to show how Jason might have done what he
had initially intended using arrays. I didn't mean to suggest that that's how it
would be best done. Sorry for confusion. I guess I just like the similarity of
arrays and objects - something that is not seen in all languages.

As for efficiency, I would probably go with static const int's (in lieu of
enums) and use an array. This would require no iterating - just simple offset
into array. Something like,

static const PAYMENT_TYPE_AC:int = 0;
static const PAYMENT_TYPE_RN:int = 1;
static const PAYMENT_TYPE_CP:int = 2;
static const PAYMENT_TYPE_CR:int = 3;

static const PAYMENT_MESSAGES:Array =
[
"Remember to reset the station address.",
"Remember to reset the station expiration date.",
"Remember to contact contractor to remove the certificates from this
station.",
"Remember to cancel the refund payment."
];


If there are better ways, I am always happy to hear them. I am still pretty new
to this Flex thing.

-eric
--- In flexcoders@yahoogroups.com, Charles Parcell  wrote:
>
> Additionally, utilizing a loop to locate an item can eat up cycles if the
> list of codes gets to be large.  Granted that in the case of this example
> looping 3 or even 10 items is likely not going to be an issue in anyway.
> Something to think about if the application of this example is used
> differently.
> 
> Charles P.
> 
> 
> On Fri, May 22, 2009 at 10:50 AM, Charles Parcell
> wrote:
> 
> > Why even have the Array aspect in the second example? It stands as a
> > pointless container for what we are seeing it used for. Unless there will be
> > some additional items added to it that we have not seen yet.
> >
> > I just feel the need to point that out. :)
> >
> > Charles P.
> >
> >
> >
> > On Thu, May 21, 2009 at 3:49 PM, Eric Cooper  wrote:
> >
> >> I just tried compiling what I wrote - and realized that it didn't... so
> >> here are two variants. The first is same as previous, but it compiles. The
> >> second may be more in the spirit of what you were attempting initially - 
> >> and
> >> kind of highlights similarities between arrays and objects.
> >>
> >> First:
> >>
> >>var records:Array = new Array(
> >>{ code:"AC", text:"Remember to
> >> reset the station address." },
> >>{ code:"RN", text:"Remember to
> >> reset the station expiration date." },
> >>{ code:"CP", text:"Remember to
> >> contact contractor to remove the certificates from this station." },
> >>{ code:"CR", text:"Remember to
> >> cancel the refund payment." }
> >>);
> >>
> >> for each (var test:Object in records) {
> >>if
> >> (grid.selectedItem.PAYMENT_TYPE_CODE == test.code)
> >>Alert.show(test.text );
> >>}
> >>
> >>
> >> Second:
> >>
> >>var PAYMENT_TYPE_CODE:String = "CR";
> >> var records:Array = new Array(
> >>{ "AC": "Remember to reset the
> >> station address." },
> >>{ "RN": "Remember to reset the
> >> station expiration date." },
> >>{ "CP": "Remember to contact
> >> contractor to remove the certificates from this station." },
> >>{ "CR": "Remember to cancel the
> >> refund payment." }
> >>);
> >>
> >> for (var i:int = 0; i < records.length;
> >> ++i) {
> >>if
> >> (records[i][grid.selectedItem.PAYMENT_TYPE_CODE])
> >>
> >>  Alert.show(records[i][PAYMENT_TYPE_CODE]);
> >> }
> >>
> >>
> >>
> >>
> >> --- In flexcoders@yahoogroups.com, "Jason B"  wrote:
> >> >
> >> > SWEET thanks
> >> >
> >> > --- In flexcoders@yahoogroups.com, "Eric Cooper"  wrote:
> >> > >
> >> > > How about this:
> >> > >
> >> > > var records:Array = new Array(
> >> > > { code:"AC", text:"Remember to
> >> reset the station address." },
> >> > > { code:"RN", text:"Remember to
> >> reset the station expiration date." },
> >> > > { code:"CP", text:"Remember to
> >> contact contractor to remove the certificates from this station." },
> >> > > { code:"CR", text:"Remember to
> >> cancel the refund payment." },
> >> > > );
> >> > >
> >> > > for each(test:Object in records){
> >> > > if(grid.selectedItem.PAYMENT_TYPE_CODE == test[i].code)
> >> > > 

Re: [flexcoders] Access FormItem child

2009-05-22 Thread Bob Wohl
Actionscript.

On Fri, May 22, 2009 at 1:01 PM, markgoldin_2000
 wrote:
>
>
> If I have a FormItem like this:
> 
> http://www.adobe.com/2006/mxml";
> width="100%" height="100%" direction="horizontal">
> 
> 
> 
> 
>
> then in another mxml fil where I am using that component:
> 
> 
>
> is there a way of accessing username via markup tags? Or it's only via AS?
>
> Thanks
>
> 


[flexcoders] AdvancedDataGrid Server Side Sorting

2009-05-22 Thread mutyonok
Hi. 
I have AdvancedDataGrid with server side pagination and sorting.

The thing I cannot implement is showing sort triangles in datagrid headers.

The only way i've found is manually listen SORT event and set collection.sort 
property of my dataProvider - but then when I change collection.source it 
causes collection.refresh() on my dataProvider's collection and it sorts again 
in Flex :(

So some fields sorted in wrong way (differently as I sorted them on server (in 
DB))

Please help me :)



[flexcoders] Dynamic Org Chart - Needed

2009-05-22 Thread caliventures
Hi.

New to flexcoders. Not a developer. Talking to a guy from Adobe who said I 
should post here. I'm trying to figure out how to create an Org Chart/Tree 
Chart app similar to academia.edu/geni.com.

Cristophe said that flex/actionscript would be the way to go, and said I might 
find resources/people here that I could talk to to figure this out.

Rather than bog the list with too much stuff if this isn't the right place, I'd 
rather talk offline with anybody that can/wants to help. I'm more than willing 
to add more information on this thread if it's the right thing to do!

The goal of this is to also potentially release this back to the open source 
community, as my need for this is kind of tangental to my targeted goal.

Thanks

-bruce
caliventu...@yahoo.com





[flexcoders] Re: Multiple filters on datagrid

2009-05-22 Thread kaushal.shah05
I'm also trying something similar, but with various components:

http://s256908546.onlinehome.us/datagrid/am_post.html

I can't get the filtering to work correctly.


--- In flexcoders@yahoogroups.com, "alinmircea_s"  wrote:
>
> From what I understand, is this what you're looking for? (a quick
> example for you get the basic idea. There are better and cleaner ways
> to do this.)
> 
> 
> http://www.adobe.com/2006/mxml";
> layout="vertical">
> 
> 
> 
> 
> 
> 
> 
>  change="filterScChange(event)"/>
>  change="filterScChange(event)"/>
>  change="filterScChange(event)"/>
>  change="filterScChange(event)"/>
>   
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>




[flexcoders] Filtering multiple conditions in an arraycollection

2009-05-22 Thread kaushal.shah05
I want to filter a datagrid by multiple criteria.   I would like to have 
several types of components (checkbox, slider, textfield, etc) to filter, each 
one 

set to filter a particular datafield (asset_status, serial, tagsee data 
structure) in the arraycollection.   

The filterfunction does not work.  When I click type in the textbox or check 
any checkboxes, it does not retreive the intended results.   My entire code is 
below.   

The data source structure from the httpservice is listed before the code.

Appreciate any help.


/// Data Source Returned From HTTPService ///

 

  
  Active 
   
  2CE9049CMC 
  Reporting 
  CUSA221733 
  3/13/2009 3:18:00 PM 
  61 
  24 
  4/19/2009 8:24:00 PM 
   
   
  3 
  05/10/2009 
  Triple 
  okay 
  Always Connected 
  



 CODE 


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





   




















 
   
   
  

  

  
  
  
  


  
  
  
  
  
  
  
  
  
  
  
 

  



   

  



 
 
 



 
 

   
   

   


   
 
   
 
 
   
 
 
   
 
 
   
 
 
 
 
 
   
   
 
  
 
 
  


  
   












 





[flexcoders] Vector issues when using child application domains

2009-05-22 Thread Gordon Hirsch
If I use a SWFLoader to load two sub-applications in child application 
domains (loadForCompatibility=false), and if each sub-application 
defines a type of the same name, "Thing", then it doesn't seem possible 
to use the type Vector. in both sub-applications. (The Thing type 
is *not* known to the parent application.)

The first sub-application can declare a Vector. and add Thing 
objects to it, but if the second sub-app tries to do the same, a type 
error is thrown.

Is this a known limitation of Vector/sub-applications? Are there any 
known workarounds?

There's some code that demonstrates the problem attached to 
https://bugs.adobe.com/jira/browse/FP-1986. Here's an example of the 
stack trace I get:

TypeError: Error #1034: Type Coercion failed: cannot convert 
th...@3786461 to Thing.
at Vector$object/http://adobe.com/AS3/2006/builtin::push()
at 
VectorBugSubapp/onCreationComplete()[C:\workspace\x\VectorBugSubapp\src\VectorBugSubapp.mxml:9]
at 
VectorBugSubapp/___VectorBugSubapp_Application1_creationComplete()[C:\workspace\x\VectorBugSubapp\src\VectorBugSubapp.mxml:2]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at 
mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9298]
at mx.core::UIComponent/set 
initialized()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:1169]
at 
mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:718]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at 
mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8628]
at 
mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8568]


[flexcoders] Flash Skins Vs Css Vs Programatic Skin?? (All about performance)

2009-05-22 Thread Gus
Hi all!!

each of the techniques has its differences, but which one of these is more 
efficient in performance when styling an application??

GUS



[flexcoders] Tile and 100% width

2009-05-22 Thread Maciek Sakrejda
If I create a Tile element with a percent-based width (and leave the
height unset), it uses some weird method to determine the height, and
it's typically two to three times as tall as it needs to be. Any
suggestions for how to work around this? I'd like the tile to be 100%
the width of its parent container, but just tall enough to fit its
children.

-Maciek


Re: [flexcoders] Re: simple array?

2009-05-22 Thread Charles Parcell
Not that I think it is the best way, but the way I had originally suggested
(which seemed to get over looked) was as follows.

var records:Object = {
"AC": "Remember to reset the station address.",
"RN": "Remember to reset the station expiration date.",
"CP": "Remember to contact contractor to remove the certificates from
this station.",
"CR": "Remember to cancel the refund payment."
};

var CODE:String = grid.selectedItem.PAYMENT_TYPE_CODE;
if(records[CODE] != null ){
Alert.show(records[CODE]);
}


On Fri, May 22, 2009 at 6:55 PM, Eric Cooper  wrote:

> Two good points.
>
> I used an Array, as I wrote, to try to show how Jason might have done what
> he
> had initially intended using arrays. I didn't mean to suggest that that's
> how it
> would be best done. Sorry for confusion. I guess I just like the similarity
> of
> arrays and objects - something that is not seen in all languages.
>
> As for efficiency, I would probably go with static const int's (in lieu of
> enums) and use an array. This would require no iterating - just simple
> offset
> into array. Something like,
>
> static const PAYMENT_TYPE_AC:int = 0;
> static const PAYMENT_TYPE_RN:int = 1;
> static const PAYMENT_TYPE_CP:int = 2;
> static const PAYMENT_TYPE_CR:int = 3;
>
> static const PAYMENT_MESSAGES:Array =
> [
> "Remember to reset the station address.",
> "Remember to reset the station expiration date.",
> "Remember to contact contractor to remove the certificates from this
> station.",
> "Remember to cancel the refund payment."
> ];
>
>
> If there are better ways, I am always happy to hear them. I am still pretty
> new
> to this Flex thing.
>
> -eric
> --- In flexcoders@yahoogroups.com, Charles Parcell 
> wrote:
> >
> > Additionally, utilizing a loop to locate an item can eat up cycles if the
> > list of codes gets to be large.  Granted that in the case of this example
> > looping 3 or even 10 items is likely not going to be an issue in anyway.
> > Something to think about if the application of this example is used
> > differently.
> >
> > Charles P.
> >
> >
> > On Fri, May 22, 2009 at 10:50 AM, Charles Parcell
> > wrote:
> >
> > > Why even have the Array aspect in the second example? It stands as a
> > > pointless container for what we are seeing it used for. Unless there
> will be
> > > some additional items added to it that we have not seen yet.
> > >
> > > I just feel the need to point that out. :)
> > >
> > > Charles P.
> > >
> > >
> > >
> > > On Thu, May 21, 2009 at 3:49 PM, Eric Cooper  wrote:
> > >
> > >> I just tried compiling what I wrote - and realized that it didn't...
> so
> > >> here are two variants. The first is same as previous, but it compiles.
> The
> > >> second may be more in the spirit of what you were attempting initially
> - and
> > >> kind of highlights similarities between arrays and objects.
> > >>
> > >> First:
> > >>
> > >>var records:Array = new Array(
> > >>{ code:"AC", text:"Remember to
> > >> reset the station address." },
> > >>{ code:"RN", text:"Remember to
> > >> reset the station expiration date." },
> > >>{ code:"CP", text:"Remember to
> > >> contact contractor to remove the certificates from this station." },
> > >>{ code:"CR", text:"Remember to
> > >> cancel the refund payment." }
> > >>);
> > >>
> > >> for each (var test:Object in records)
> {
> > >>if
> > >> (grid.selectedItem.PAYMENT_TYPE_CODE == test.code)
> > >>Alert.show(test.text );
> > >>}
> > >>
> > >>
> > >> Second:
> > >>
> > >>var PAYMENT_TYPE_CODE:String = "CR";
> > >> var records:Array = new Array(
> > >>{ "AC": "Remember to reset the
> > >> station address." },
> > >>{ "RN": "Remember to reset the
> > >> station expiration date." },
> > >>{ "CP": "Remember to contact
> > >> contractor to remove the certificates from this station." },
> > >>{ "CR": "Remember to cancel the
> > >> refund payment." }
> > >>);
> > >>
> > >> for (var i:int = 0; i <
> records.length;
> > >> ++i) {
> > >>if
> > >> (records[i][grid.selectedItem.PAYMENT_TYPE_CODE])
> > >>
> > >>  Alert.show(records[i][PAYMENT_TYPE_CODE]);
> > >> }
> > >>
> > >>
> > >>
> > >>
> > >> --- In flexcoders@yahoogroups.com, "Jason B"  wrote:
> > >> >
> > >> > SWEET thanks
> > >> >
> > >> > --- In flexcoders@ya

[flexcoders] Re: Ctrl click in combobox

2009-05-22 Thread lampei
Argh!  I was looking in the wrong component :)  I should've been checking out 
the dropdown (I tried setting some listeners on this, but was unsuccessful), 
but I was looking in the ComboBox.  Thanks for the pointer and the code.  Looks 
like it will do the job.

--- In flexcoders@yahoogroups.com, Manish Jethani  wrote:
>
> On Fri, May 22, 2009 at 5:47 AM, lampei  wrote:
> > Until recently, I did not know that you could reset the combobox back to 
> > the "prompt" value by ctrl-clicking the value in the combobox dropdown. 
> > �However, as most people don't know that this is a possiblity with the 
> > combobox, I'm trying to mimic this functionality by setting the 
> > selectedIndex to -1 if a person clicks (without the ctrl key) the same 
> > value that is already selected.
> >
> > I have yet to find the "selectedIndexChanged" property change to anything 
> > other than false when the "change" event fires, so I'm unable to use that 
> > (same for selectedItemChanged). �I tried setting the item under the mouse 
> > when "itemRollOver" fires to a property, then set it to null when 
> > "itemRollOut" fires. �Then when the person clicks, I said if the 
> > selectedItem == the value underneath the mouse during itemRollOver, set the 
> > selectedIndex = -1, however, the itemRollOut seems to fire before the click 
> > event is fired. �I've also yet to find where the code is for the 
> > ctrl-left click, or what causes that event to fire.
> >
> 
> The code is in ListBase.as: the selectItem function (called from
> mouseDownHandler).
> 
> // allow unselecting via ctrl-click
> if (ctrlKey && selectedData[uid])
> {
> selectionChange = true;
> clearSelected(transition);
> }
> 
> Here's the solution.
> 
>  1.  Make a custom class, MyList.
> 
> public class MyList extends List
> {
> override protected function selectItem(item:IListItemRenderer,
> shiftKey:Boolean, ctrlKey:Boolean,
> transition:Boolean = true):Boolean
> {
> var index:int = itemRendererToIndex(item);
> 
> if (index == selectedIndex)
> ctrlKey = true;
> 
> return super.selectItem(item, shiftKey, ctrlKey, transition);
> }
> }
> 
>  2.  Use this class as the dropdown in the ComboBox.
> 
>dropdownFactory="{new ClassFactory(MyList)}" />
> 
> Tada!
> 
> Manish
> 
> -- 
> www.manishjethani.com
>




[flexcoders] Gumbo - new namespaces - error

2009-05-22 Thread Mic
Assuming that the latest namespace changes point to this standard:

?xml version="1.0" encoding="utf-8"?>
http://ns.adobe.com/mxml/2009";
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo">


   
 

Why does  give a

Could not resolve  to a component implementation?

 What does work in the way of code completion does pop up , and 
Gumbo Lang Refs still lists . TIA,

Mic.




[flexcoders] FlexBuilder design-mode wierdness...

2009-05-22 Thread Laurence MacNeill
Ok, all of the sudden one of my components can't be rendered in 
Design Mode anymore...  I have no clue why...

Is there some sort of size-restriction?  Like, the length of the file 
can't be longer than a certain length or Design Mode won't 
work?  That's the only thing I can think of.

It's just this one file that won't render at all in Design Mode - no 
errors or anything, just a blank screen when I try to go into Design 
Mode to look at the file...

Anyone have any clue at all as to why it's suddenly doing this?


Laurence MacNeill
Mableton, Georgia, USA



[flexcoders] Form validation in Flex?

2009-05-22 Thread markflex2007
Hi,

I have many forms that need do form validation.

Do you think if I can have a common Flex component to do all the form 
validation.

Thanks for your help.

Mark



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

2009-05-22 Thread Dharmendra Chauhan
Thanks Lot for the Reply.
My FLex Application is not running inside browser , It is running inside DOt 
Net container as a Active X control. the idea you suggested required default 
context menu to be hidden ..is it possible to hide it ? If yes then I Can open 
some custom window on right click and design. I am not sure how concrete this 
idea is..
 

--- In flexcoders@yahoogroups.com, "Yves Riel"  wrote:
>
> What about intercepting the right-click at the browser level and
> displaying your own contextual menu? However, you might have some
> browser incompatibility to look at.
>  
> http://blog.another-d-mention.ro/programming/right-click-and-custom-cont
> ext-menu-in-flash-flex/
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of Dharmendra Chauhan
> Sent: Friday, May 22, 2009 3:03 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] NEED more than 15 menu item in Context Menu 
> 
> 
> 
> 
> 
> Hi,
> I really need to have more than 15 menu item displayed on Context Menu.
> I desperately need some workaround or ideas to achieve this 
> 
> My client has invested thousands of dollar in Flex Project, he
> definitely need more than 15 menu item.If this project failed , client
> will NEVER think to invest in flex.
> 
> 
> Had I been aware of this limitation before I would have thought some
> solution by now.This comes as a surprise to me at the last moment ,just
> fews days before Prod Date.
> 
> Pls gents help me get rid of this ...PLEASE provide some ideas.
> 
> Thanks in advance.
> 
> Thanks,
> Dharmendra
>




[flexcoders] Re: session.getAttribute("somekey") returning NULL in SessionDestroyed

2009-05-22 Thread Dharmendra Chauhan
Hi Flexcoders,
 I request you to have a look in to it as I could not figure out why it 
is happening.  

--- In flexcoders@yahoogroups.com, "Dharmendra Chauhan"  
wrote:
>
> Hi all,
>   session.getAttribute("somekey") is returning null  in 
> SessionDestroyed() method of flex listener.
> 
> Below are the steps I am following 
> 
> 1) I am adding flexLister in contextInitialized method of 
> ServletContextListener
> 
>FlexSession.addSessionCreateListener(myListener) 
> 
> 2) In sessionCreate method 
>   sessionCreated(FlexSession session) {
>session.addSessionDestroyListener(this)
> 
>   }   
> 3) some where in applicaion I am putting a key vlaue pair in session like this
> 
> FlexContext.getSession().setAttribute("somekey" , someVlue)  ;
> 
> 
> The issue is when I try to retreive vale from session
> 
> her is how I m retreiving value 
> 
>sessionDestroyed(FlexSession session) {
> 
>   session.getAttribute("somekey"); this return null WHY ?
> 
>}
> 
> 
> This is always returning me null
> 
> Pls note that I am RTMP channel and  version of LCDS is 2.6 
> 
> I also tried RTMPFlexSession 
> 
>   RTMPFlexSession.addSessionCreateListener(myListener) 
> 
> but no luck  , still got null 
> 
> Am I doing anything wrong  ?
> 
> 
> Thanks ,
> Dharmendra
>




RE: [flexcoders] Form validation in Flex?

2009-05-22 Thread Jake Churchill
It would probably be better to have all forms extend a base component and
handle validation there.

 

Jake Churchill

CF Webtools

11204 Davenport, Ste. 100

Omaha, NE  68154

http://www.cfwebtools.com

402-408-3733 x103

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of markflex2007
Sent: Friday, May 22, 2009 10:34 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Form validation in Flex?

 






Hi,

I have many forms that need do form validation.

Do you think if I can have a common Flex component to do all the form
validation.

Thanks for your help.

Mark





[flexcoders] Working with files

2009-05-22 Thread Cordova Aaron

I am trying to download a response from my server and then write that response 
out to a local file. But the local file is never complete. The amount of data 
I'm grabbing from the server can vary between a few K up to a couple megs. I am 
using a HTTPService call to request my data and then writing the file in my 
result function. I think that the data is not 100% transfered when the 
HTTPService is emitting the result event. The local file usualy varies from 26K 
lines of text to 56K lines and it is never 100%. In my result handler the code 
looks similar to this:


private function resultFunction(e:ResultEvent):void
{
  var data:String = e.result.toString();
  var localFile:File = 
File.applicationStorageDirectory.resolvePath("response.xml");
  var fileStream:FileStream = new FileStream;

  fileStream.addEventListener(Event.COMPLETE, localFileWritten);
  fileStream.openAsync(localFile, FileMode.WRITE);
  fileStream.writeUTFBytes(data);
 
  fileStream.close();
}

Should I be listening for a different event to know when e.result is done 
populating?