[flexcoders] Re: Push verse Poll in Flash Player

2010-08-17 Thread Alexander
I think it's worth trying, because trying to read an integer this way won't waste any CPU cycles - Flash/Flex probably run select() or poll() internally and just sleep - until anything arrives over the socket. (Versus trying to pull anything every 30 seconds - that will cost you CPU and also feel

[flexcoders] What's wrong in using itemRenderer ?

2010-08-17 Thread RishiShahi
I'm trying to add itemRenderer like, but it doesn't work. However if I remove the check it's adding the itemRenderer. for each (var column:XML in columns) { var col:AdvancedDataGridColumn = new AdvancedDataGridColumn(column); col.headertext=colu...@label; if(column==status) {

[flexcoders] Why can't I change the highlight color of Spark text?

2010-08-17 Thread dorkie dork from dorktown
I've spent soo much time trying to find how to do this. I'm using, sparkTextArea.selectAll() to select text but I've found no way to change the highlight color. JP

[flexcoders] Re: Detecting List width from its itemRenderer

2010-08-17 Thread Alexander
Hello Alex and others, --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: The renderer should be given an explicitWidth by the time its measure() method gets called. That would be a good time to choose a different size avatar and report a different measuredHeight. my

Re: [flexcoders] Method for a Datagrid Button Itemrenderer

2010-08-17 Thread Angelo Anolin
I know someone has encountered this before. Better to rephrase this one I guess. I have an MXML file, where I have a method. In that MXML file, I have a datagrid, where one of the columns, I created an external itemrenderer. The itemrenderer is a button. When I click that button, I want

[flexcoders] Re: Method for a Datagrid Button Itemrenderer

2010-08-17 Thread fusionpage
I typically use code like this to call a method in the parent MXML page that contains the dataGrid... mx:AdvancedDataGridColumn width=80 headerText=Launch dataField=contentURL mx:itemRenderer

Re: [flexcoders] Re: Method for a Datagrid Button Itemrenderer

2010-08-17 Thread Angelo Anolin
Hi Don, Thanks for the reply. I do am able to do the same using an in-line itemrenderer. But right now, my itemrenderer is an external AS file. So I declare my MXML like: mx:DataGridColumn id=dgActionColumn width=100 visible=true itemRenderer=myButtonItemRenderer / Where

[flexcoders] String format

2010-08-17 Thread Christophe
Hello, I have an int : 500 And I would like to have a string with 0 before. String : 000500 How to format such a string ? Thank you, Christophe,

Re: [flexcoders] String format

2010-08-17 Thread Csomák Gábor
var num:int=500 var myString:string=000+num.toString(); trace(myString) //traces 000500 2010/8/17 Christophe christophe_jacque...@yahoo.fr Hello, I have an int : 500 And I would like to have a string with 0 before. String : 000500 How to format such a string ? Thank you,

Re: [flexcoders] Re: Method for a Datagrid Button Itemrenderer

2010-08-17 Thread Angelo Anolin
I have written the following scripts, and yet this does not seem to work. in my MXML file (main) private function myDataGrid_CreationComplete() :void { myDataGrid.addEventListener('myTest', myTesting); } private function myTesting() :void { Alert.show('This event should have been called!');

[flexcoders] Accessing Network Drive in AIR

2010-08-17 Thread sdl1326
I have created an AIR application that accesses files on the network drive. Each machine that is running the AIR app may have a different letter/drive mapped to the network drive. Therefore, in order to alleviate drive mapping issues, I wanted to simply use the absolute network path to the

Re: [flexcoders] String format

2010-08-17 Thread meaglith
http://code.google.com/p/printf-as3/ var num : int = 500; http://code.google.com/p/printf-as3/var str : String = printf('000%d', num); trace(str); //'000500' --- Blog: http://douhua.im Twitter: http://twitter.com/genedna Website:

[flexcoders] Animate Application Background

2010-08-17 Thread Dan Vega
I am trying to do a simple animation with a flex app skin between 2 backgrounds. Why does this not work? The function changeBG does not get called as expected. Its really weird though because every now and then it does. I would expect it to get called every second with the following code. ?xml

[flexcoders] Re: Animate Application Background

2010-08-17 Thread Dan Vega
OOOPs...pulled a dumb one there, I was listening for complete..this works. ?xml version=1.0 encoding=utf-8? s:Skin xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark creationComplete=init(); fx:Metadata [HostComponent(spark.components.Application)]

[flexcoders] Re: Method for a Datagrid Button Itemrenderer

2010-08-17 Thread turbo_vb
Hi Angelo, You're close. You'll need to declare the event in the DataGrid. A simple subclass should do the trick. This way you can add the event listener in mxml too: package myPackage { import mx.controls.DataGrid; [Event( name=myTest, type=flash.events.Event )] public class

Re: [flexcoders] Why can't I change the highlight color of Spark text?

2010-08-17 Thread Alex Harui
focusedTextSelectionColor? On 8/17/10 2:14 AM, dorkiedorkfromdorkt...@gmail.com dorkiedorkfromdorkt...@gmail.com wrote: I've spent soo much time trying to find how to do this. I'm using, sparkTextArea.selectAll() to select text but I've found no way to change the highlight color. JP

[flexcoders] Re: Detecting List width from its itemRenderer

2010-08-17 Thread Alexander
Hello again, I thought I've found a solution by using the List's resize event to change the size of its items, but while it works for the simple test case listed below, it goes into endless loop in my real app with more complex layout and I see the traces: resize list: 0 - 480 resize list:

Re: [flexcoders] Re: Method for a Datagrid Button Itemrenderer

2010-08-17 Thread Angelo Anolin
Would it be possible to simply add it to the MXML file where I am declaring the datagrid, instead of subclassing it? Thanks. From: turbo_vb timh...@aol.com To: flexcoders@yahoogroups.com Sent: Tue, 17 August, 2010 8:30:29 Subject: [flexcoders] Re: Method for

[flexcoders] Null object error on test for null

2010-08-17 Thread Tom McNeer
In the function below, I begin by testing to see if a particular object is null (the array of ComboBoxes that represent the children of a Repeater, which may or may not exist). The element is defined in MXML, though of course it may be null. But if it *is *null, a null object reference error is

[flexcoders] Re: Method for a Datagrid Button Itemrenderer

2010-08-17 Thread turbo_vb
Not that I know of. You could avoid all of this by just listening for the DataGrid's itemClick event. (mx.events.ListEvent) In the result handler you could check if ( event.itemRenderer is btnRenderer ) { do your thing } -TH --- In flexcoders@yahoogroups.com, Angelo Anolin angelo_ano...@...

Re: [flexcoders] Re: Method for a Datagrid Button Itemrenderer

2010-08-17 Thread Wesley Acheson
in my datagrid, i have declared creationComplete=myDataGrid_CreationComplete() In my itemrenderer, I have placed a code : override protected function clickHandler(event:MouseEvent) :void { dispatchEvent(new Event('myTest', true)); } try override protected function

[flexcoders] Handling XML

2010-08-17 Thread Stephen
var xml:XML = library shelf book chapterOnce Upon A Time/chapter /book /shelf /library ; var path1:XMLList = xml.shelf.book.chapter; trace(path1: + path1.text()); // output: path1: Once Upon A Time var string:String =

Re: [flexcoders] Handling XML

2010-08-17 Thread Alex Harui
There is no “eval” in actionscript. To pass XMLLIst a string it would have to be a string that can be converted to XML, not something that references variables. On 8/17/10 1:40 PM, Stephen sd_br...@ntlworld.com wrote: var xml:XML = library shelf book chapterOnce Upon A Time/chapter

[flexcoders] Possible to filter data by Type for LineChart series?

2010-08-17 Thread eb
All of the data examples I see for Flex charting are simply string months and number attributes, but that doesn't mesh with normal query results. Let's say this is my dataset from a query (returns all my withdrawals for the month). //my data var expensesAC:ArrayCollection = new

Re: [flexcoders] Why can't I change the highlight color of Spark text?

2010-08-17 Thread dorkie dork from dorktown
Thanks. It was working all along. I was using textarea.selectRange(). Since I was pressing a button to select the text the textarea was always unfocused so I wasn't seeing the effect of that style. I added unfocusedTextSelectionColor as well. On Tue, Aug 17, 2010 at 12:07 PM, Alex Harui

[flexcoders] How to get the width of the Itemrenderer in a List

2010-08-17 Thread dorkie dork from dorktown
How would I get the width of an item renderer in a list? I'm trying to fit the width of a list so that it doesn't clip an item renderer half way thru if there's not enough space. So if the List is 105 px wide and an single itemrenderer is 10 pixels wide then I want to resize the list to 100

Re: [flexcoders] Re: Method for a Datagrid Button Itemrenderer

2010-08-17 Thread Wesley Acheson
sorry that should have been owner.dispatchEvent()

Re: [flexcoders] Why can't I change the highlight color of Spark text?

2010-08-17 Thread Jeff Gomes
Assuming you want to set it for all text areas, you could experiment with the global styles selectionColor and focusedTextSelectionColor. -Jeff At 02:14 8/17/2010, dorkie dork from dorktown wrote: I've spent soo much time trying to find how to do this. I'm using, sparkTextArea.selectAll()

[flexcoders] Insert Image in Rich Text Editor

2010-08-17 Thread mailstosrini
Hi, I want to insert an image in to rich text editor. After complete the image insertion i need to update in the database. Please do the needful for my requirement Thanks in advance Regards Srini

[flexcoders] Drag and Drop toolbox

2010-08-17 Thread juvemihaido
Well, in the toolbox the are labels for the components.I want to drag the label and drop the component.After that i want to double click the component to show an alert. The Application: ?xml version=1.0 encoding=utf-8? s:Application xmlns:fx=http://ns.adobe.com/mxml/2009;

[flexcoders] how to disable the rest of application when one combo box is open

2010-08-17 Thread coder3
Hi I have a combo box, if it's open, user needs to make a selection to close it. so, if nothing is selected, the combo box will keep opening. my question is, when the combo box is open, i want to disable the rest of the application, how do i do it? thanks C -- View this message in context:

[flexcoders] HTTPService not updating...

2010-08-17 Thread Laurence
Ok. I have the following HTTP Service declared: mx:HTTPService id=reportDataRPC url=reports/xml/{_reportInfo.fileName}.xml result=rdHandler(event); fault=rpcFaultHandler(event);/ In the init() function (which is called when the 'show' event happens, because the page it's

Re: [flexcoders] HTTPService not updating...

2010-08-17 Thread Jake Churchill
It might be getting cached. nbsp;Try adding a timestamp to the end of the url (ie url/myfile.xml?timestamp={currentTimeStamp} ). Before you all the .send() method, reset the timestamp variable to the current time. nbsp; -Jake -- Sent from my Palm Pre On Aug 17, 2010 6:23 PM, Laurence

Re: [flexcoders] HTTPService not updating...

2010-08-17 Thread dorkie dork from dorktown
it's prob accessing it from the cache. instead of this, url=reports/xml/{_reportInfo.fileName}.xml use this: url=reports/xml/{_reportInfo.fileName}.xml?time={getTimer()} that snippet might not be bindable so add the time in code whenever you access that file On Tue, Aug 17, 2010 at 6:17 PM,

Re: [flexcoders] How to get the width of the Itemrenderer in a List

2010-08-17 Thread Alex Harui
Spark or MX List. Did you confuse width for height? On 8/17/10 2:30 PM, dorkiedorkfromdorkt...@gmail.com dorkiedorkfromdorkt...@gmail.com wrote: How would I get the width of an item renderer in a list? I'm trying to fit the width of a list so that it doesn't clip an item renderer half

[flexcoders] 360Flex DC is coming up soon! Don't miss it!

2010-08-17 Thread John Wilker
Hey Flexcoders list! I just wanted to pop in and make sure everyone knew that 360|Flex was coming up fast in Washington DC. September 19-22 The full session details have been posted as a PDF here. http://360flex.com/downloads/sessions.pdf and you can check out the schedule here:

Re: [flexcoders] How to get the width of the Itemrenderer in a List

2010-08-17 Thread dorkie dork from dorktown
Spark. If the item renderer item is outside of the Lists visible area then it returns width or height 0 or sometimes index out of bounds errors. It seems items aren't created if they haven't been scrolled into view yet and if they have but they aren't in view currently then I think it's returning

[flexcoders] Re: What's wrong in using itemRenderer ?

2010-08-17 Thread Amy
An XML node can never be equal to a string. --- In flexcoders@yahoogroups.com, RishiShahi rishi.s...@... wrote: I'm trying to add itemRenderer like, but it doesn't work. However if I remove the check it's adding the itemRenderer. for each (var column:XML in columns) { var

[flexcoders] Re: Null object error on test for null

2010-08-17 Thread Sunil D
Which line does the null pointer error occur on? Not that this is you problem, but I always check for null when casting with 'as'. Sunil --- In flexcoders@yahoogroups.com, Tom McNeer tmcn...@... wrote: In the function below, I begin by testing to see if a particular object is null (the

Re: [flexcoders] Re: What's wrong in using itemRenderer ?

2010-08-17 Thread Rishi Sahi
Hi Amy, Thanks.. One more question , Is there any different rule to add itemrender on categorized grids ? For example, Here is my sample code to for Hazard and Status column , var col1:AdvancedDataGridColumn = new AdvancedDataGridColumn(); var