[flexcoders] Re: Datagrid sort order: is there a natsort() such as in PHP?

2008-05-06 Thread dougco2000
You have to do a sortCompareFunction, ala mx:DataGridColumn dataField=number sortCompareFunction={sortOnNumber} / and then create something like: private function sortOnNumber( obj1:Object, obj2:Object ):int { if( obj1[number]

[flexcoders] Re: Combobox And Datagrid

2008-04-28 Thread dougco2000
I found success in these cases using dataChange, see http://blog.dougco.com/coding/flex/datagrid-with-multiple-pulldowns/ for more details. -d --- In flexcoders@yahoogroups.com, [EMAIL PROTECTED] wrote: Hi Friends .. I am writting a simple code in which i have one datagrid with two

[flexcoders] Re: How to Clear/Reset Item Renderers When the Data Provider Changes?

2008-04-03 Thread dougco2000
I had success with the dataChange event handler, see: http://blog.dougco.com/coding/flex/datagrid-with-multiple-pulldowns/ --- In flexcoders@yahoogroups.com, Paul Whitelock [EMAIL PROTECTED] wrote: After a bit more investigation it appears that it might be a redraw issue since the last cell

[flexcoders] Re: How to set the datetime format in datagrid?

2008-04-03 Thread dougco2000
One way to display a human readable date in a datagrid and have it be sortable, is to use labelFunction={convertDate} and have the server send over unix milliseconds. This is important if you want to be able to properly sort the column. A sample function looks like: private function

[flexcoders] Re: What happens with dataProvider when you sort a List control?

2008-03-31 Thread dougco2000
You might find my posting helpful: http://blog.dougco.com/coding/flex/datagrid-with-multiple-pulldowns/ --- In flexcoders@yahoogroups.com, cobpez [EMAIL PROTECTED] wrote: Hello, I just found both Flex and this group. So here a newbie problem: I have a DataGrid (AdvancedDataGrid even) that

[flexcoders] Re: Dynamically generated DataGrids having troubles with column width

2008-03-28 Thread dougco2000
I recall having to play around with this when I did this in the past, just from memory I would suggest you try setting widths after you set grid.columns by doing grid.columns[0].width = 100, etc. I think it also would not work exactly if the total widths did not match the grid, so you could try

[flexcoders] Re: ComboBoxes + Label in ItemRenderer

2008-03-25 Thread dougco2000
You need to move your code that sets the label: criticite.text = ( resultGravite * resultProbabilite ).toString(); into the doShow() routine since that is where the objects get (re)set everytime the grid changes. -doug --- In flexcoders@yahoogroups.com, quantum_ohm [EMAIL PROTECTED] wrote:

[flexcoders] Re: Date object and daylight saving - need help

2008-03-24 Thread dougco2000
I have seen this also, I have a server function which sends back to the client the UNIX time in seconds, and I find that I have to manually tell the client to do the offset: var myDate:Date = new Date( unixSecs - (8*60*60*1000) ); since I want the time/date in separate pieces:

[flexcoders] Re: ComboBoxes as ItemRenderer

2008-03-24 Thread dougco2000
My advice is to make the itemrenderer a separate component and use the dataChange event in that component. I have an example at http://blog.dougco.com/coding/flex/datagrid-with-multiple-pulldowns/ Hope that helps, -doug --- In flexcoders@yahoogroups.com, quantum_ohm [EMAIL PROTECTED] wrote: Hi

[flexcoders] Re: Is this normal behaviour for DataGrid ?

2008-03-21 Thread dougco2000
I think you ran into the same thing I did, the datagrid will render things oddly sometimes, I had to use the dataChange function in my itemrenderer to get what I wanted. I go into more detail at http://blog.dougco.com/coding/flex/doesnt-seem-like-normal-behaviour-for-datagrid/ if that is helpful.

[flexcoders] DataGrid setting selectedIndex causes text colors to change

2007-05-17 Thread dougco2000
Hi all, I am building out a datagrid in AS, and the mx piece is: mx:DataGrid id=tables dataProvider={gridData} change=selectTable(event) sortableColumns=true width=100% height=100% / Now, when I create the grid, everything shows up great but at the end of the populating the grid code I have a

[flexcoders] Placing a tooltip

2007-05-14 Thread dougco2000
I'd like to be able to control the placement of a tooltip, i.e. have it appear to the left of the object. It seems to decide either above or below the object normally. Anyone develop a way to do this? thanks

[flexcoders] Loading image and handling IOErrorEvent

2007-05-09 Thread dougco2000
Hi, I am loading in images in a loop as follows: imgs[j] = new Image(); pict = new Loader(); url = http://mydomain.com/images/test; + j + .jpg; preq = new URLRequest(url); pict.load(preq); imgs[j].addChild(pict); and if I close my browser or navigate away during a load, I get a popup from

[flexcoders] embedding multiple images programmatically

2007-04-27 Thread dougco2000
Hi all, I have an array of image names (of PNGs on my server), and I want to load these all up in an object list of images so I can show them when needed in my application. I've found an oddity where some of these, sometimes, don't load properly for whatever reason and are blank when I need to

[flexcoders] Flex variable for creation date?

2007-04-16 Thread dougco2000
I'm wondering if there is a way to reference a distinguishing variable for a given app, such as a last-modified or build date? As we're pushing out new versions of a given app it would be nice to have something in the lower corner letting the user know the version they are running without relying

[flexcoders] Re: Versioning swf files for bug reporting

2007-04-15 Thread dougco2000
Check In system, ala CVS or SVN... http://www.nongnu.org/cvs/ d --- In flexcoders@yahoogroups.com, simonjpalmer [EMAIL PROTECTED] wrote: 'scuse the ignorant question, but what is a CI system? --- In flexcoders@yahoogroups.com, bhaq1972 mbhaque@ wrote: Thanks Johannes. Can you suggest

[flexcoders] passing variables to Timer handler routine

2007-04-10 Thread dougco2000
Hi all, If I have an action (like putting up an alert popup, adding a child to the canvas, etc) that needs to be delayed, it would be great to have a good old sleep or something prior to the command, but I guess one has to use Timers. But since Timer calls a new function, how to best pass along

[flexcoders] passing data to an EventListener

2007-03-29 Thread dougco2000
I'm creating a number of buttons programmatically and I'd like to have a unique value passed along to a function when each one is clicked. So if I am doing something like: for (i=0;i10;i++) { b = new Button(); b.y = offset; b.label = click me; b.tooltip = button +i;

[flexcoders] Re: changing states from within a component

2007-02-27 Thread dougco2000
--- In flexcoders@yahoogroups.com, boy_trike [EMAIL PROTECTED] wrote: parentApplication.currentState = foobar; bruce I've used: import mx.core.Application; Application.application.currentState = foobar;