[flexcoders] problem with Consumer
I have a flex project using BlazeDS where I am trying to create a message destination dynamically and then subscribe to it in Flex. I've been using the sample from Blaze as a reference. Java method returns the string of the new destination: ... ms = (MessageService) MessageBroker.getMessageBroker(null).getService (message-service); MessageDestination destination = (MessageDestination) ms.createDestination(dStr); if (ms.isStarted()) { System.out.println(Starting Destination + dStr); destination.start(); } ... return dStr; In Flex, this Java method is called through a RemoteObject and the handle on the result does the following: var consumer:Consumer = new Consumer(); if (event.result != null){ var destination:String = event.result as String; var myStreamingAMF:AMFChannel = new StreamingAMFChannel(my- streaming-amf, ../messagebroker/streamingamf); var myPollingAMF:AMFChannel = new AMFChannel(my-polling- amf, ../messagebroker/amfpolling); myPollingAMF.pollingEnabled = true; myPollingAMF.pollingInterval = 2000; var channelSet:ChannelSet = new ChannelSet(); channelSet.addChannel(myStreamingAMF); channelSet.addChannel(myPollingAMF); consumer.channelSet = channelSet; consumer.destination = destination; consumer.addEventListener(MessageEvent.MESSAGE, handleMessage); consumer.subscribe(); } Alert.show(Subscrided: + consumer.subscribed); The Alert box is showing the consumer is not subscribed. I've traced through and everything looks ok. Anyone know what I am doing wrong? Thanks Dom
[flexcoders] Re: How to update menubar dataprovider
I believe it is the CollectionChange event. --- In flexcoders@yahoogroups.com, lampei [EMAIL PROTECTED] wrote: Cool! That worked. I'm wondering what event is fired for the ArrayCollection that made it work...CollectionChange maybe? It'd be nice to know what would work/how to get it to work for the array too, but at least it works for the ArrayCollection. Thanks. --- In flexcoders@yahoogroups.com, Fotis Chatzinikos fotis.chatzinikos@ wrote: Did you try with a bindable ArrayCollection? This usually dispatches the correct events for UI components to update automatically. [Bindable] var myData:ArrayCollection = new ArrayCollection() ; On Sat, Nov 29, 2008 at 8:19 PM, lampei lampei@ wrote: I am trying to update the dataProvider of a MenuBar without resetting the menuBar dataprovider to the original array. e.g. private var menuData:Array = []; private function init():void { menuData.push( { label: test1, type: normal } ); menuData.push( { label: test2, type: normal } ); menuData.push( { label: test3, type: normal } ); } mx:MenuBar id=mb dataProvider={ menuData } / It works if I put everything in the initial property creation or if I do: mb.dataProvider = menuData; in the init function after I've done all of my array pushes, but I was hoping there was a better way of doing things, i.e. firing an event or calling a method. I have tried mb.validateNow() (in fact, I've tried all validate methods), but none seem to refresh the menuData dataProvider. Anyone have any other ideas, or can tell me what I'm doing wrong? Thanks. -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation Fotis.Chatzinikos@,
[flexcoders] DateFormatter Problem
I have an advanceddatagrid where I inspect some column metadata and create appropriate formatters. When my column is a DATE (not a DATE TIME), I attempt to create the formatter like so: var fmtDate:DateFormatter = new DateFormatter; fmtDate.formatString = DD MMM ; column.formatter = fmtDate; When I try to run this I get TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.formatters::DateBase$/get http://www.adobe.com/2006/flex/mx/internal::defaultStringKey() [E:\dev\3.0.x\frameworks\projects\framework\src\mx\formatters\DateBase .as:173] at mx.formatters::DateFormatter$/parseDateString() [E:\dev\3.0.x\frameworks\projects\framework\src\mx\formatters\DateForm atter.as:151] at mx.formatters::DateFormatter/format() [E:\dev\3.0.x\frameworks\projects\framework\src\mx\formatters\DateForm atter.as:539] at mx.controls.advancedDataGridClasses::AdvancedDataGridColumn/applyForma tting() [C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\control s\advancedDataGridClasses\AdvancedDataGridColumn.as:1335] I am not sure why parseDateString() is getting called. The field on the data is of type Date. Any help would be greatly appreciated.
[flexcoders] More DateFormatter Shinanagans
I cannot seem to get the proper year out of a DateFormatter. Can someone tell me what I am doing wrong: I have a component: mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% creationComplete=init() mx:Script ![CDATA[ import mx.collections.ArrayCollection; [Bindable] private var date:Date = new Date(); [Bindable] private var ac:ArrayCollection = new ArrayCollection(); private function init():void{ var obj:Object = new Object; obj.date = date; obj.datetime = date; ac.addItem(obj); } ]] /mx:Script mx:DateFormatter id=fmtDate formatString=MM-DD-/ mx:AdvancedDataGrid dataProvider={ac} height=100% width=100% mx:columns mx:AdvancedDataGridColumn dataField=date formatter={fmtDate}/ mx:AdvancedDataGridColumn dataField=datetime/ /mx:columns /mx:AdvancedDataGrid /mx:Canvas The Date column resolves to 07-16-400. The Datetime column to Wed Jul 16 19:08:39 GMT-0400 2008. Why does my year show up as 400???
[flexcoders] Re: DateFormatter Problem
I did something in my fiddling that made this work. What, I don't know. However, as I posted in http://tech.groups.yahoo.com/group/flexcoders/message/119549 , my year is now being displayed as the positive of my GMT offset... --- In flexcoders@yahoogroups.com, Dominic Pazula [EMAIL PROTECTED] wrote: I have an advanceddatagrid where I inspect some column metadata and create appropriate formatters. When my column is a DATE (not a DATE TIME), I attempt to create the formatter like so: var fmtDate:DateFormatter = new DateFormatter; fmtDate.formatString = DD MMM ; column.formatter = fmtDate; When I try to run this I get TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.formatters::DateBase$/get http://www.adobe.com/2006/flex/mx/internal::defaultStringKey() [E:\dev\3.0.x\frameworks\projects\framework\src\mx\formatters\DateBase .as:173] at mx.formatters::DateFormatter$/parseDateString() [E:\dev\3.0.x\frameworks\projects\framework\src\mx\formatters\DateForm atter.as:151] at mx.formatters::DateFormatter/format() [E:\dev\3.0.x\frameworks\projects\framework\src\mx\formatters\DateForm atter.as:539] at mx.controls.advancedDataGridClasses::AdvancedDataGridColumn/applyForma tting() [C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\control s\advancedDataGridClasses\AdvancedDataGridColumn.as:1335] I am not sure why parseDateString() is getting called. The field on the data is of type Date. Any help would be greatly appreciated.
[flexcoders] Re: DateFormatter Problem
Obrigado, João! --- In flexcoders@yahoogroups.com, João Fernandes [EMAIL PROTECTED] wrote: Dominic, I guess your problem is the one I reported here http://bugs.adobe.com/jira/browse/SDK-13650 It has been fixed in revision 2306 so if you use Flex 3.1 (NB 2312) I guess you won't have that problem anymore. -- João Fernandes http://www.onflexwithcf.org http://www.riapt.org Portugal Adobe User Group (http://aug.riapt.org)
[flexcoders] Re: How do I find a row in a datagrid, then cause it to be clicked?
Greg, Are the items in your list box the same objects that are in the datagrid? If so and your dataprovider is an ArrayCollection, then use myDataGrid.dataProvider.getItemIndex(obj:Object). If not, then you have to come up with a way to efficiently search the dataProvider. As for the programatic click; why not just call the event handler directly? If you must have the click event, you will have to build it yourself and use myDataGrid.dispatchEvent(evt:Event). Hope that helps. Dom --- In flexcoders@yahoogroups.com, gbkpicasso [EMAIL PROTECTED] wrote: I have a list box of items that can be found in a datagrid. When a user clicks on an item in the list box I would like to find the row in the datagrid that contains that same data. Then I would like to scroll to that row in the datagrid so it is visible to the user - myDataGrid.scrollToIndex(rowNumFoundAbove) Then cause that row to be clicked programmatically so the current code for the click event of the datagrid is triggered. Do I need to search every row of the datagrid to look for the row I need? How do I force a row in a datagrid to be clicked programattically? Thanks Greg
[flexcoders] OLAP
Has anyone seen or done an integration of with a MDX compliant OLAP server? If so, would you be willing to share your experience? Thanks Dom
[flexcoders] DataGrid and exporting values
Like a lot of people, I've been wanting to export values out of a data grid and into a file. I decided that I didn't want to go with the round trip to the server. Instead, I use the ExternalInterface to call a js function that opens a new window and writes the values into a HTML table (uses js and the DOM). I have a copy all button that selects the table and copies it to the clip board. The user has to just then open Excel and hit paste. Slick, or so I thought. I'm having performance issues -- any table of decent size takes forever to write to the window. The js that is doing the heavy lifting is: for (i=0; i data.length; i++){ j = 0; var newRow = winTable.insertRow(-1); for (j; j data[i].length; j++){ var newCell = newRow.insertCell(j); var newText = win.document.createTextNode(data[i][j]); newCell.appendChild(newText); } } Does anyone have suggestions on what I can do to speed this up? Thanks Dominic PS Once I have this in decent working order, I will be happy post all the code.
[flexcoders] Re: DataGrid and exporting values
That is a good idea. Actually pushing the data across didn't seem to be the problem. That loop is what was taking forever. I could literally watch the individual cells get added. A couple hundred rows took 10 seconds. Of course I could always be missing something... Thanks --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: There was a thread sometime ago about performance problems with large data sets and ExtenalInterface. Why not skip that part. You could generate the HTML in Flex and put it on the clipboard directly using System.setClipboard(sHTML); Tracy
[flexcoders] Re: Collapsible controls
I don't have any ideas, but I am very interested in something like this. I was contemplating something very similar earlier today. --- In flexcoders@yahoogroups.com, Richard Rodseth [EMAIL PROTECTED] wrote: It seems to me that it's pretty common to need some UI that is modeless (i.e. not in a pop-up) but easy to get out of the way to save real estate. I've seen the FlexStore (haven't studied the code in a while) , the WindowShade in flexlib, and examples of programmatically dividing a DividedBox. I like the latter, because when the collapsible UI is expanded, the ability to resize is still valuable. Is it possible to skin or otherwise customize the HDividedBox so that additional buttons could be placed with the thumb? Any other approaches that have worked well for any of you?
[flexcoders] Re: PHP Mailer with Flex
What are you looking to do with it? If you are just looking for a contact us type of form, AMFPHP might be over kill. --- In flexcoders@yahoogroups.com, ghus32 [EMAIL PROTECTED] wrote: Hello Everyone, Does anyone here have any good suggestions for a PHP mailer to use with Flex?? Thanks
[flexcoders] BindingUtils question
I have a List Component whose dataProvider is an ArrayCollection of generic objects. I have another object I would like to bind a property of to a property to the selectedItem of the List. I have: BindingUtils.bindProperty (currentOp,type,this.columnList.selectedItem,TYPE); No go... I see that the binding util cannot work with the property TYPE on the generic object, does not implement IEventDispatcher, etc. I get why it doesn't work. So if I add mx:Text id=selectedType text={this.columnList.selectedItem.TYPE} visable=false/ and BindingUtils.bindProperty(currentOp,type,this.selectedType,text); it works. I would prefer NOT to have a bunch of invisible text fields running around. How can I accomplish this in AS? Thanks Dom
[flexcoders] Re: Converting App to Flex 3
Errors like that usually mean you are trying to declare a variable that Flex has defined elsewhere. Try 'textDecoration1' or something like it. --- In flexcoders@yahoogroups.com, greggiec [EMAIL PROTECTED] wrote: I keep getting this error. Declaration of style 'textDecoration' conflicts with previous declaration in C:\Program Files\Adobe\Flex Builder 3 Plug-in\sdks\3.0.0\frameworks\libs\framework.swc(mx/controls/ToolTip). Anyone know what this is?
[flexcoders] Re: BindingUtils question
Daniel, Thanks for the reply. You are correct, the text trick works because of the change on the selected item. This is what I am trying to programatically define. The List contains static items. I need a property on an object bound to a property of the selectedItem. I will look into the ChangeWatcher class. I'm still trying to learn and understand how Binding works. If you know of a good tutorial or explanation, could you please let me know. Thanks Dominic --- In flexcoders@yahoogroups.com, Daniel Gold [EMAIL PROTECTED] wrote: Binding will not work with dynamic objects, which it sounds like you're using. I have a feeling your invisible text field trick is only working when you switch selectedItem. Seems like if you kept the same item selected and the TYPE property changed on that item, the binding would not fire, but since selectedItem was in your MXML binding chain, a binding will fire anytime you select a different item in the list, then it will pull out the TYPE property and update your text field. If you don't really need binding and just need to update when a selection changes, you could always listen for the itemClicked property or add a ChangeWatcher for the list.selectedItem property and call a function that pulls out the TYPE property and updates your currentOp object. On Tue, Apr 15, 2008 at 8:55 AM, Dominic Pazula [EMAIL PROTECTED] wrote: I have a List Component whose dataProvider is an ArrayCollection of generic objects. I have another object I would like to bind a property of to a property to the selectedItem of the List. I have: BindingUtils.bindProperty (currentOp,type,this.columnList.selectedItem,TYPE); No go... I see that the binding util cannot work with the property TYPE on the generic object, does not implement IEventDispatcher, etc. I get why it doesn't work. So if I add mx:Text id=selectedType text={this.columnList.selectedItem.TYPE} visable=false/ and BindingUtils.bindProperty (currentOp,type,this.selectedType,text); it works. I would prefer NOT to have a bunch of invisible text fields running around. How can I accomplish this in AS? Thanks Dom
[flexcoders] Re: BindingUtils question
Thanks for the information. I am in the process of moving what I can to typed classes. Unfortunately that data comes from our server component and it will take a while before our Java guy can get to it on his end. One last question. I have a custom class, extends EventDispatcher, declared as [Bindable]. It has a read-only status property. I have tried binding things to it like: mx:Text text={myCustomObj.status}/ In the case above, I cannot get the text to update when the object updates. Do I need the class to dispatch a specific event to trigger the binding to update? Thanks Dominic --- In flexcoders@yahoogroups.com, Daniel Gold [EMAIL PROTECTED] wrote: Binding will not work with dynamic objects, which it sounds like you're using. I have a feeling your invisible text field trick is only working when you switch selectedItem. Seems like if you kept the same item selected and the TYPE property changed on that item, the binding would not fire, but since selectedItem was in your MXML binding chain, a binding will fire anytime you select a different item in the list, then it will pull out the TYPE property and update your text field. If you don't really need binding and just need to update when a selection changes, you could always listen for the itemClicked property or add a ChangeWatcher for the list.selectedItem property and call a function that pulls out the TYPE property and updates your currentOp object. On Tue, Apr 15, 2008 at 8:55 AM, Dominic Pazula [EMAIL PROTECTED] wrote: I have a List Component whose dataProvider is an ArrayCollection of generic objects. I have another object I would like to bind a property of to a property to the selectedItem of the List. I have: BindingUtils.bindProperty (currentOp,type,this.columnList.selectedItem,TYPE); No go... I see that the binding util cannot work with the property TYPE on the generic object, does not implement IEventDispatcher, etc. I get why it doesn't work. So if I add mx:Text id=selectedType text={this.columnList.selectedItem.TYPE} visable=false/ and BindingUtils.bindProperty (currentOp,type,this.selectedType,text); it works. I would prefer NOT to have a bunch of invisible text fields running around. How can I accomplish this in AS? Thanks Dom
[flexcoders] Re: BindingUtils question
Got it! Thanks again for the help. --- In flexcoders@yahoogroups.com, Daniel Gold [EMAIL PROTECTED] wrote: so I'm guessing your constructor is setting these properties from XML? If you bind to a read only property of an Object, the binding will fire when object reference changes, so if it was null and then you created the object the binding would fire once. If you have a method on the object that updates its properties via XML or some other mechanism, you will have to trigger the Binding yourself from that method. For example, you would declare your getter Bindable with a custom event like [Bindable(event=myPropUpdated)] public function get myProp():String { return _myProp; } public function updateProps(xml:XML):void { _myProp = [EMAIL PROTECTED]; dispatchEvent(new Event(myPropUpdated)); } On Tue, Apr 15, 2008 at 1:20 PM, Dominic Pazula [EMAIL PROTECTED] wrote: Thanks for the information. I am in the process of moving what I can to typed classes. Unfortunately that data comes from our server component and it will take a while before our Java guy can get to it on his end. One last question. I have a custom class, extends EventDispatcher, declared as [Bindable]. It has a read-only status property. I have tried binding things to it like: mx:Text text={myCustomObj.status}/ In the case above, I cannot get the text to update when the object updates. Do I need the class to dispatch a specific event to trigger the binding to update? Thanks Dominic --- In flexcoders@yahoogroups.com flexcoders% 40yahoogroups.com, Daniel Gold danielggold@ wrote: Binding will not work with dynamic objects, which it sounds like you're using. I have a feeling your invisible text field trick is only working when you switch selectedItem. Seems like if you kept the same item selected and the TYPE property changed on that item, the binding would not fire, but since selectedItem was in your MXML binding chain, a binding will fire anytime you select a different item in the list, then it will pull out the TYPE property and update your text field. If you don't really need binding and just need to update when a selection changes, you could always listen for the itemClicked property or add a ChangeWatcher for the list.selectedItem property and call a function that pulls out the TYPE property and updates your currentOp object. On Tue, Apr 15, 2008 at 8:55 AM, Dominic Pazula dompazz@ wrote: I have a List Component whose dataProvider is an ArrayCollection of generic objects. I have another object I would like to bind a property of to a property to the selectedItem of the List. I have: BindingUtils.bindProperty (currentOp,type,this.columnList.selectedItem,TYPE); No go... I see that the binding util cannot work with the property TYPE on the generic object, does not implement IEventDispatcher, etc. I get why it doesn't work. So if I add mx:Text id=selectedType text={this.columnList.selectedItem.TYPE} visable=false/ and BindingUtils.bindProperty (currentOp,type,this.selectedType,text); it works. I would prefer NOT to have a bunch of invisible text fields running around. How can I accomplish this in AS? Thanks Dom
[flexcoders] Error from ComboBox while drawing component...
I have a programatically defined ComboBox with a bound dataProvider. The dataProvider starts out as an empty ArrayCollection. A RPC returns values and populates the ArrayCollection on the bound object. In this case, there is 1 element in the ArrayCollection which is a string. When the bound object is populated, I get this error: ArgumentError: Error #2004: One of the parameters is invalid. at flash.display::Graphics/drawRoundRect() at mx.skins::ProgrammaticSkin/drawRoundRect() [E:\dev\3.0.x\frameworks\projects\framework\src\mx\skins\ProgrammaticS kin.as:745] at mx.skins.halo::ButtonSkin/updateDisplayList() [E:\dev\3.0.x\frameworks\projects\framework\src\mx\skins\halo\ButtonSk in.as:217] ... Debuging, I find that ProgrammaticSkin is trying to call: drawRoundRect(x=0,y=0,width=NaN,height=24,ellipseSize=8,ellipseSize=8) Any ideas on what is going on here? For the record, my code defining the ComboBox and the binding is: textSelect = new ComboBox(); textSelect.percentWidth = 50; textSelect.dataProvider = param.possibleValues; BindingUtils.bindProperty (textSelect,dataProvider,param,possibleValues); BindingUtils.bindProperty(param,value,textSelect,selectedItem); paramJob = new SASGetPVJob(paramJob,null,param,null); paramJob.run(); //Makes the RPC call to get possible values for the param item.addChild(textSelect); //item is the FormItem tForm.addChild(item); //tForm is the Form
[flexcoders] Re: Copying View of an ArrayCollection
Are you looking for the two ArrayCollections to always have the same filter and sort, or only occasionally? --- In flexcoders@yahoogroups.com, m.ar80 [EMAIL PROTECTED] wrote: How can view be copied from one array collection to another where both array collections share the same source? Apparently the only way to achieve this to call refresh on the destination array collection (with the same filter function and sort applied as that of the source array collection). But this is inefficient because the destination array collection need not be filtered and sorted since the filter status and sort position is already known in the source array collection. Thanks.
[flexcoders] Re: Copying View of an ArrayCollection
I am not aware of a way to do what you want. I agree resorting/filtering is inefficient. Could you programmatically check for when that condition occurs and when it does just set the destination equal to the source? If you want to keep the destination around, then maybe set whatever is using the destination to use the source instead? --- In flexcoders@yahoogroups.com, m.ar80 [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com, Dominic Pazula dompazz@ wrote: Are you looking for the two ArrayCollections to always have the same filter and sort, or only occasionally? Hi Dominic. Thank you for your response. The two array collections will share the same source but not necessarily have the same filter and sort throughout their lifetimes. Only occasionally, and this is when I would like to copy source collection's view directly rather than re-filter and re-sort items in the destination collection.
[flexcoders] Re: Error from ComboBox while drawing component...
Alex, Thanks for the reply. I'm not sure how that is possible. The ComboBox is set: textSelect.percentWidth = 50; That is in FormItem set: item.percentWidth = 75; Which is in mx:VBox height=100% width=100% verticalAlign=middle mx:Form id=tForm height=100% width=100%/ /mx:VBox Which is in: mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% creationComplete=init() If that was the case, I would expect my other items declared like this to also cause issues. But I get all of the form displayed. As soon as the RPC returns values to the ComboBox, it blows up. Is there logic somewhere in updating the dataProvider of ComboBox that would set the width to NaN? Thanks Dom --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Probably means that the CB's width is also NaN and got that way due to some funky layout logic somewhere.
[flexcoders] Flex and HTML
I have a server process that sometimes returns HTML to my Flex app. I would like to display this HTML. I don't think I can actually do it inside of Flex. Is there a way that I can take the HTML text and have their browser display it? I realize I could create a server-side repeater that I could send the text to and it would echo it back. I could use HTTPRequest to open a new window for the results. I would prefer NOT to make this HTML make 3 trips (Server - Flex, Flex - Server, Server - Web Browser). Thanks Dominic
[flexcoders] Re: Flex and HTML
That looks like it might do what I need. Thanks for that! --- In flexcoders@yahoogroups.com, Blake Barrett [EMAIL PROTECTED] wrote: Flex can display HTML in a very limited way via the .HTMLtext property of TextAreas, but the closest thing to replicating what you are looking for is creating an iFrame outside of flex, but controlling it through JavaScript from Flex. Maybe this link can help: http://www.themidnightcoders.com/blog/2006/12/mixing-html-and-flex- using -iframe.html Do a google search for Flex iFrame and it should point you to some helpful sites. Blake From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dominic Pazula Sent: Friday, April 04, 2008 12:07 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex and HTML I have a server process that sometimes returns HTML to my Flex app. I would like to display this HTML. I don't think I can actually do it inside of Flex. Is there a way that I can take the HTML text and have their browser display it? I realize I could create a server-side repeater that I could send the text to and it would echo it back. I could use HTTPRequest to open a new window for the results. I would prefer NOT to make this HTML make 3 trips (Server - Flex, Flex - Server, Server - Web Browser). Thanks Dominic
[flexcoders] Re: Recursing Up a Tree
Hi Steven, If you are using XML, then by all means use Tracey's example. I am building something similar, but I am using objects in an ArrayCollection instead of XML. What I have done is add an id and parent field to my object. When I am building my ArrayCollection of objects, I make sure to assign the parent field to the correct id value. Walking up the tree from a low level is simple. Just recursively (or in a while loop) find the next parent until the parent field is null. Cheers, Dom --- In flexcoders@yahoogroups.com, Carpenter, Steven [EMAIL PROTECTED] wrote: Hi all, I'm still learning with Flex, and I'm stuck on this problem: I have a Tree component and for any given selectedItem, I need to get a list of parent nodes for that item - I'm not concerned with the children of each parent, I just need to get a list or path of parent nodes for an item, back up to the root node. I got as far as creating a method that will take the selected item and get its parent node using Tree.getParentItem(node) and ITreeDataDescriptor.isBranch() but I'm struggling with building a recursive function that will let me walk back up the tree. I've seen a great example of walking down a tree's DataDescriptor using IViewCursor but not I'm stuck on creating something that works in the other direction. Does anyone have any pointers/advice? Thanks in advance!
[flexcoders] Re: Events and .dispatchEvent();
Hi Gordon, Thanks for the reply. Alex's post cleared it up for me. The custom events both had identical type strings. I modified the fault event's static const type to have '_faut' at the end and presto, everything worked as I expected. Cheers, Dom --- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote: The key thing here seems to be that code that is expecting a (custom) fault event is getting a (custom) result event instead. You need to figure out how that can happen in your code. Gordon Smith Adobe Flex SDK Team
[flexcoders] BlazeDS configuration
I am getting the following error in BlazeDS: MessageBrokerServlet failed to initialize due to runtime exception: flex.messaging.license.InvalidLicenseException: Beta expired. I have a fully licensed profession copy of FB3. This BlazeDS installation is brand new. I just downloaded and installed it. This is really getting old. How do I make this error go away? Besides dumping Flex and going to .NET like my colleagues keep telling me I should.
[flexcoders] Re: BlazeDS configuration
Posted there first. There seems to be very little activity there so I keep bringing it back here. --- In flexcoders@yahoogroups.com, shaun [EMAIL PROTECTED] wrote: Dominic Pazula wrote: I am getting the following error in BlazeDS: MessageBrokerServlet failed to initialize due to runtime exception: flex.messaging.license.InvalidLicenseException: Beta expired. I have a fully licensed profession copy of FB3. This BlazeDS installation is brand new. I just downloaded and installed it. This is really getting old. How do I make this error go away? Besides dumping Flex and going to .NET like my colleagues keep telling me I should. Perhaps try posting here. http://opensource.adobe.com/wiki/display/blazeds/Forums - shaun
[flexcoders] Re: BlazeDS configuration
I will download it again and let you know. Thanks Dominic --- In flexcoders@yahoogroups.com, meteatamel [EMAIL PROTECTED] wrote: FlexBuilder licensing has nothing to do with BlazeDS licensing. Actually, the official BlazeDS release does not even have license checks. BlazeDS had beta expiration checks when it was still in beta and this is the error you're running into. I know you mentioned that you have a fresh copy of BlazeDS but can you double check to make sure it is the latest release build? http://opensource.adobe.com/wiki/display/blazeds/Release+Builds thanks, Mete --- In flexcoders@yahoogroups.com, Dominic Pazula dompazz@ wrote: I am getting the following error in BlazeDS: MessageBrokerServlet failed to initialize due to runtime exception: flex.messaging.license.InvalidLicenseException: Beta expired. I have a fully licensed profession copy of FB3. This BlazeDS installation is brand new. I just downloaded and installed it. This is really getting old. How do I make this error go away? Besides dumping Flex and going to .NET like my colleagues keep telling me I should.
[flexcoders] Re: BlazeDS configuration
That's what I did yesterday. It worked until I shut down Tomcat. Then it wouldn't restart. --- In flexcoders@yahoogroups.com, cyrill.zadra [EMAIL PROTECTED] wrote: Hi, (1) Try to update your flex-*. librares in your WEB-INF/lib folder with the newest, which you'll find in blazeds.war. (2) Try to re-enter a the license key in Flexbuilder. --- In flexcoders@yahoogroups.com, Dominic Pazula dompazz@ wrote: I will download it again and let you know. Thanks Dominic --- In flexcoders@yahoogroups.com, meteatamel meteatamel@ wrote: FlexBuilder licensing has nothing to do with BlazeDS licensing. Actually, the official BlazeDS release does not even have license checks. BlazeDS had beta expiration checks when it was still in beta and this is the error you're running into. I know you mentioned that you have a fresh copy of BlazeDS but can you double check to make sure it is the latest release build? http://opensource.adobe.com/wiki/display/blazeds/Release+Builds thanks, Mete --- In flexcoders@yahoogroups.com, Dominic Pazula dompazz@ wrote: I am getting the following error in BlazeDS: MessageBrokerServlet failed to initialize due to runtime exception: flex.messaging.license.InvalidLicenseException: Beta expired. I have a fully licensed profession copy of FB3. This BlazeDS installation is brand new. I just downloaded and installed it. This is really getting old. How do I make this error go away? Besides dumping Flex and going to .NET like my colleagues keep telling me I should.
[flexcoders] Re: BlazeDS configuration
No, just the webapps that come with it. So, yes to blazeds, etc. I'm making some progress. Redownloaded BlazeDS (same file name I had before (blazeds_turnkey_3-0-0-544.zip). Again, deleted the old folder and unzipped Blaze. This time Tomcat starts without the error. I'm sure there was some file, somewhere that didn't get refreshed. I have recompiled all of my class files. I am slowly adding them back into the path and I'll see what breaks it. --- In flexcoders@yahoogroups.com, cyrill.zadra [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com, Dominic Pazula dompazz@ wrote: That's what I did yesterday. It worked until I shut down Tomcat. Then it wouldn't restart. Mhh even you have no webapps like blazeds, ds-console and samples you still get the error?
[flexcoders] Re: BlazeDS configuration
I redownloaded the file. The file name was identical to what I had on my file system (blazeds_turnkey_3-0-0-544.zip). I deleted the old version. After re-unzipping, tomcat seems to start OK. I'm going to slowly add things to it until I find what is breaking it. Thanks for the help! --- In flexcoders@yahoogroups.com, meteatamel [EMAIL PROTECTED] wrote: FlexBuilder licensing has nothing to do with BlazeDS licensing. Actually, the official BlazeDS release does not even have license checks. BlazeDS had beta expiration checks when it was still in beta and this is the error you're running into. I know you mentioned that you have a fresh copy of BlazeDS but can you double check to make sure it is the latest release build? http://opensource.adobe.com/wiki/display/blazeds/Release+Builds thanks, Mete --- In flexcoders@yahoogroups.com, Dominic Pazula dompazz@ wrote: I am getting the following error in BlazeDS: MessageBrokerServlet failed to initialize due to runtime exception: flex.messaging.license.InvalidLicenseException: Beta expired. I have a fully licensed profession copy of FB3. This BlazeDS installation is brand new. I just downloaded and installed it. This is really getting old. How do I make this error go away? Besides dumping Flex and going to .NET like my colleagues keep telling me I should.
[flexcoders] Events and .dispatchEvent();
This is probably a real easy one. I have a manager for my RPC processes that extends EventDispatcher. I have 2 custom events (fault and result) that extend the RPC ResultEvent and FaultEvent. I have listeners in the manager that catch the rpc events, use them to create my events, stopPropagation() on the RPC event, and then use this.dispatchEvent(myevent) to send my event along. Sometimes this works. Sometimes it doesn't. I often get errors like the following: TypeError: Error #1034: Type Coercion failed: cannot convert talonlib.events::[EMAIL PROTECTED] to mx.rpc.events.MyFaultEvent. I'm sure I'm missing something somewhere? Can anyone see this off the top of their head, or know of a good resource to look into to learn more about this topic? Thanks Dominic
[flexcoders] Re: Events and .dispatchEvent();
I see. I didn't realize it was something downstream causing the problem. That actually clears up a number of problems I was having! Thanks --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Nothing wrong in principle. These problems are hard to diagnose because the call stack doesn't tell you who was about to receive the event. Go look at your listeners to make sure they are defined with the correct type. Log all events you wrap and dispatch so you can see the name of the event that caused the failure, then see who's listening and what kind of event they expect.
[flexcoders] Re: Events and .dispatchEvent();
Nope, I didn't. I will probably need to down the road, however. --- In flexcoders@yahoogroups.com, iilsley [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com, Dominic Pazula dompazz@ wrote: This is probably a real easy one. I have a manager for my RPC processes that extends EventDispatcher. I have 2 custom events (fault and result) that extend the RPC ResultEvent and FaultEvent. I have listeners in the manager that catch the rpc events, use them to create my events, stopPropagation() on the RPC event, and then use this.dispatchEvent(myevent) to send my event along. Sometimes this works. Sometimes it doesn't. I often get errors like the following: TypeError: Error #1034: Type Coercion failed: cannot convert talonlib.events::[EMAIL PROTECTED] to mx.rpc.events.MyFaultEvent. I'm sure I'm missing something somewhere? Can anyone see this off the top of their head, or know of a good resource to look into to learn more about this topic? Thanks Dominic Not sure if its applicable but did you override the clone method in your customer event ? http://www.adobe.com/livedocs/flex/3/langref/flash/events/Event.html#c lone()
[flexcoders] Re: BlazeDS License Error
I get this error when I start Tomcat. This is a new install from the turnkey zip file. There are no projects in the webapps folder (besides the samples). --- In flexcoders@yahoogroups.com, cyrill.zadra [EMAIL PROTECTED] wrote: Hi, Try to treplace the jar files in your flex-builder project with the jwar files from the new BlazeDS. You will find them in the blazeds.war file. regards Cyrill --- In flexcoders@yahoogroups.com, Dominic Pazula dompazz@ wrote: Deleted the old version of BlazeDS (including the Tomcat install). Downloaded the new BlazeDS from the website (Turnkey download). Expanded the folder in the location of my old install. Started Tomcat. The error persists: MessageBrokerServlet failed to initialize due to runtime exception: flex.messaging.license.InvalidLicenseException: Beta expired. Now what? Thanks Dominic --- In flexcoders@yahoogroups.com, João Fernandes joaopedromartinsfernandes@ wrote: Dominic, it's BlazeDS that has expired, not Flex Builder. BlazeDS does have a new version available at http://opensource.adobe.com/wiki/display/blazeds/BlazeDS -- João Fernandes http://www.onflexwithcf.org http://www.riapt.org
[flexcoders] Re: BlazeDS License Error
I started Tomcat from the startup.bat in the bin/ location. There are flex jars in the blazeds webapp (as well as the other samples that ship with it). I'm still confused WHY blazeDS is checking for a license for Fleb Builder. There is nothing in the BlazeDS location that is not open source. I haven't configured any destinations, etc. Thanks Dominic --- In flexcoders@yahoogroups.com, cyrill.zadra [EMAIL PROTECTED] wrote: Do you start Tomcat through Flex Builder or the startup.bat script? Do you have any flex jar (flex-bootstrap.jar,flex-messaging.jar ..) files in your tomcat/lib folder? --- In flexcoders@yahoogroups.com, Dominic Pazula dompazz@ wrote: I get this error when I start Tomcat. This is a new install from the turnkey zip file. There are no projects in the webapps folder (besides the samples). --- In flexcoders@yahoogroups.com, cyrill.zadra cyrill.zadra@ wrote: Hi, Try to treplace the jar files in your flex-builder project with the jwar files from the new BlazeDS. You will find them in the blazeds.war file. regards Cyrill --- In flexcoders@yahoogroups.com, Dominic Pazula dompazz@ wrote: Deleted the old version of BlazeDS (including the Tomcat install). Downloaded the new BlazeDS from the website (Turnkey download). Expanded the folder in the location of my old install. Started Tomcat. The error persists: MessageBrokerServlet failed to initialize due to runtime exception: flex.messaging.license.InvalidLicenseException: Beta expired. Now what? Thanks Dominic --- In flexcoders@yahoogroups.com, João Fernandes joaopedromartinsfernandes@ wrote: Dominic, it's BlazeDS that has expired, not Flex Builder. BlazeDS does have a new version available at http://opensource.adobe.com/wiki/display/blazeds/BlazeDS -- João Fernandes http://www.onflexwithcf.org http://www.riapt.org
[flexcoders] Re: BlazeDS License Error
I got the error to go away. I re-entered my license key in Flex Builder. My question remains: Why does BlazeDS, which is open source, care about the license of FB? There were no FB projects being built in there. It was just the standalone free server download... --- In flexcoders@yahoogroups.com, Dominic Pazula [EMAIL PROTECTED] wrote: I started Tomcat from the startup.bat in the bin/ location. There are flex jars in the blazeds webapp (as well as the other samples that ship with it). I'm still confused WHY blazeDS is checking for a license for Fleb Builder. There is nothing in the BlazeDS location that is not open source. I haven't configured any destinations, etc. Thanks Dominic --- In flexcoders@yahoogroups.com, cyrill.zadra cyrill.zadra@ wrote: Do you start Tomcat through Flex Builder or the startup.bat script? Do you have any flex jar (flex-bootstrap.jar,flex- messaging.jar ..) files in your tomcat/lib folder? --- In flexcoders@yahoogroups.com, Dominic Pazula dompazz@ wrote: I get this error when I start Tomcat. This is a new install from the turnkey zip file. There are no projects in the webapps folder (besides the samples). --- In flexcoders@yahoogroups.com, cyrill.zadra cyrill.zadra@ wrote: Hi, Try to treplace the jar files in your flex-builder project with the jwar files from the new BlazeDS. You will find them in the blazeds.war file. regards Cyrill --- In flexcoders@yahoogroups.com, Dominic Pazula dompazz@ wrote: Deleted the old version of BlazeDS (including the Tomcat install). Downloaded the new BlazeDS from the website (Turnkey download). Expanded the folder in the location of my old install. Started Tomcat. The error persists: MessageBrokerServlet failed to initialize due to runtime exception: flex.messaging.license.InvalidLicenseException: Beta expired. Now what? Thanks Dominic --- In flexcoders@yahoogroups.com, João Fernandes joaopedromartinsfernandes@ wrote: Dominic, it's BlazeDS that has expired, not Flex Builder. BlazeDS does have a new version available at http://opensource.adobe.com/wiki/display/blazeds/BlazeDS -- João Fernandes http://www.onflexwithcf.org http://www.riapt.org
[flexcoders] Re: RPC FaultEvent with BlazeDS
I realize I posted this on a holiday and it probably didn't get a lot of attention. I'm hoping bumping it up will bring it to the attention of someone that has seen this before. Thanks Dom --- In flexcoders@yahoogroups.com, Dominic Pazula [EMAIL PROTECTED] wrote: I recently took the plunge and bucked up the $$$ for Flex Builder Pro. Today I uninstalled my Beta version and installed the new one. I imported my projects and recompiled. When running one that uses a RemoteObject and BlazeDS, I started getting the following RPC FaultError: The Fault String is Send Failed The Fault Detail is: Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404: url: 'http://localhost:8400/Components/messagebroker/amfpolling' I haven't changed anything server side. The compile options all look good (i.e. -services points to the correct XML file). Ideas? Thanks, Dominic
[flexcoders] Re: RPC FaultEvent with BlazeDS
Thanks Joao (I can't get the 'a' + '~'). Unfortunately that didn't work either. Here is the error that is now returned. Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404: url: 'http://localhost:8400/messagebroker/amfpolling' Thanks Dominic --- In flexcoders@yahoogroups.com, João Fernandes [EMAIL PROTECTED] wrote: is BlazeDS installed under 'Components' folder??? I guess it's your context-root that's wrong. Try to set it as '/' and do a clean on your project then your calls should try to connect to http://localhost:8400/messagebroker/amfpolling -- João Fernandes http://www.onflexwithcf.org http://www.riapt.org
[flexcoders] Re: RPC FaultEvent with BlazeDS
Ok getting closer. I'm now seeing a new error message in the Tomcat log. MessageBrokerServlet failed to initialize due to runtime exception: flex.messaging.license.InvalidLicenseException: Beta expired. I uninstalled my Beta and reinstalled the full version I bought. BlazeDS seems to be confused. How do I point it to the new license? Thanks Dominic --- In flexcoders@yahoogroups.com, João Fernandes [EMAIL PROTECTED] wrote: Dominic check the BlazeDS context-root is running from. If you deployed it under a blazeds folder, you should try to to set that as the context-root for your application. -- João Fernandes http://www.onflexwithcf.org http://www.riapt.org
[flexcoders] BlazeDS License Error
I recently upgraded from the Beta to the full version of Flex Builder. I've been having some problems with BlazeDS and I'm seeing this error in the Tomcat log: MessageBrokerServlet failed to initialize due to runtime exception: flex.messaging.license.InvalidLicenseException: Beta expired. A) How do I go about pointing BlazeDS to the new license? B) Why is this required if BlazeDS does not use Flex Builder and is a free download? Thanks Dominic
[flexcoders] Re: BlazeDS License Error
Deleted the old version of BlazeDS (including the Tomcat install). Downloaded the new BlazeDS from the website (Turnkey download). Expanded the folder in the location of my old install. Started Tomcat. The error persists: MessageBrokerServlet failed to initialize due to runtime exception: flex.messaging.license.InvalidLicenseException: Beta expired. Now what? Thanks Dominic --- In flexcoders@yahoogroups.com, João Fernandes [EMAIL PROTECTED] wrote: Dominic, it's BlazeDS that has expired, not Flex Builder. BlazeDS does have a new version available at http://opensource.adobe.com/wiki/display/blazeds/BlazeDS -- João Fernandes http://www.onflexwithcf.org http://www.riapt.org
[flexcoders] RPC FaultEvent with BlazeDS
I recently took the plunge and bucked up the $$$ for Flex Builder Pro. Today I uninstalled my Beta version and installed the new one. I imported my projects and recompiled. When running one that uses a RemoteObject and BlazeDS, I started getting the following RPC FaultError: The Fault String is Send Failed The Fault Detail is: Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404: url: 'http://localhost:8400/Components/messagebroker/amfpolling' I haven't changed anything server side. The compile options all look good (i.e. -services points to the correct XML file). Ideas? Thanks, Dominic
[flexcoders] Re: RPC FaultEvent with BlazeDS
Thanks Nayan. The endpoint url=.../ are just like they were before. http://{server.name}:{server.port}/{context.root}/... I actually do have debugging statement printing to the terminal currently. But since the Flex RPC calls are not making it to my classes, nothing is printed. --- In flexcoders@yahoogroups.com, Nayan Savla [EMAIL PROTECTED] wrote: Hi Dominic, I had this problem when i replaced the {server}:{port} in the config files make sure you don't do that. The best thing would be to use the blazeds sample directory and add you classes in there to debug the application. Another useful thing i have found that if you run blazeds in terminal using Catalina command then you can use System.out.println in your java code and see the messages you want in the terminal. hope this helps. Nayan On Fri, Mar 21, 2008 at 7:10 AM, Dominic Pazula [EMAIL PROTECTED] wrote: I recently took the plunge and bucked up the $$$ for Flex Builder Pro. Today I uninstalled my Beta version and installed the new one. I imported my projects and recompiled. When running one that uses a RemoteObject and BlazeDS, I started getting the following RPC FaultError: The Fault String is Send Failed The Fault Detail is: Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404: url: 'http://localhost:8400/Components/messagebroker/amfpolling' I haven't changed anything server side. The compile options all look good (i.e. -services points to the correct XML file). Ideas? Thanks, Dominic
[flexcoders] Singletons - Best Practices
I'm attempting to write singleton manager for my application. I've seen numerous ways for this to be done. I traced through how the BrowserManager and the PopUpManager are implemented. (For the record, I tried, and failed, to copy how BrowserManager is implemented). Does anyone know what the best practices are on creating this type of class? Any gotchas to look out for? Thanks Dominic
[flexcoders] referencing a private function
I have a component extending MenuBar whose data provider provides the internal handler for the itemClick. I have a generic function that checks the MenuEvent for the needed property and then trys to call the function it specifies. Specifically mx:MenuBar xmlns:mx=http://www.adobe.com/2006/mxml; itemClick=internalClick(event) mx:Script ![CDATA[ private function internalClick(event:MenuEvent):void{ if (event.item.hasOwnProperty(internalEvt)){ try{ this[event.item.internalEvt]() } catch(e:Error){ } } } ... Now this works well as long as the specified function is public. However, I don't want all of these functions to be public. How can I reference and call a private function dynamically? Thanks Dominic
[flexcoders] Re: referencing a private function
I understand the public/private nature of referencing the function from outside the component. However, this is inside the same component. The function resides one line down from the function I posted. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: You have to make a reference to the function public. Private means just that: can't be called from the outside. I would recommend having the renderers attach listeners to the MenuBar instead. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dominic Pazula Sent: Tuesday, February 26, 2008 9:32 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] referencing a private function I have a component extending MenuBar whose data provider provides the internal handler for the itemClick. I have a generic function that checks the MenuEvent for the needed property and then trys to call the function it specifies. Specifically mx:MenuBar xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml itemClick=internalClick(event) mx:Script ![CDATA[ private function internalClick(event:MenuEvent):void{ if (event.item.hasOwnProperty(internalEvt)){ try{ this[event.item.internalEvt]() } catch(e:Error){ } } } ... Now this works well as long as the specified function is public. However, I don't want all of these functions to be public. How can I reference and call a private function dynamically? Thanks Dominic
[flexcoders] Re: Padding on a MenuBar
That got it, thanks! --- In flexcoders@yahoogroups.com, Joan Lafferty [EMAIL PROTECTED] wrote: Can you use verticalGap on the VBox? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dominic Pazula Sent: Thursday, February 21, 2008 6:40 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Padding on a MenuBar I have a MenuBar above a DataGrid in a VBox. I would like the two to meet without any padding between them. It seems MenuBar doesn't implement padding styles. Aside from extending MenuBar and implementing paddingTop and paddingBottom, is there another way to do this? If extending is the only option, does anyone have an example of this already done? thanks!
[flexcoders] Using a Library Project
Maybe it's just too early and I haven't had enough coffee, but I can't make this work. I took a number of components I have been building and decided to move them into a library project. I created the new library project, added the source files, and built the SWC with no problem. I then took my old project, copied the application file, deleted the project (deleted from Eclipse and the file system) and recreated it. I copied the script, HTTPService, and layout tags from my old application file (nothing referencing the components in the library). I added the Library project (properties - flex build path - library path - Add Project). I made the link type External. When I try to add a component from the library FB finds the class and allows me to add it (creates a local namespace as xmlns:local=*). When I try to run, I get a string of errors starting with: VerifyError: Error #1014: Class mx.core::Application could not be found. at flash.display::MovieClip/nextFrame() at mx.managers::SystemManager/deferredNextFrame() [E:\dev\flex_3_beta3 \sdk\frameworks\projects\framework\src\mx\managers\SystemManager.as:29 7] at mx.managers::SystemManager/preloader_initProgressHandler() [E:\dev\flex_3_beta3 \sdk\frameworks\projects\framework\src\mx\managers\SystemManager.as:22 09] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.preloaders::Preloader/timerHandler()[E:\dev\flex_3_beta3 \sdk\frameworks\projects\framework\src\mx\preloaders\Preloader.as:396] at flash.utils::Timer/_timerDispatch() at flash.utils::Timer/tick() If I change the link type Merge into code everything runs fine. Any help would be greatly appreciated!
[flexcoders] Re: Using a Library Project
Still looking for help on this. Thanks
[flexcoders] Re: AdvancedDataGrid - Changing the background color on a row.
Awesome! Thanks. I had put this on the back burner and was working on the lower hanging fruit for my project. --- In flexcoders@yahoogroups.com, sreeni_r [EMAIL PROTECTED] wrote: I have posted a working sample here which I think you can tweak it work your scenario. http://flexpearls.blogspot.com/2008/02/row-background-color-in.html -Sreenivas --- In flexcoders@yahoogroups.com, Dominic Pazula dompazz@ wrote: I thought this would be easy to do, but I have been banging my head on it for a while. I'm wanting to let the user mark rows as they scroll through the ADG. I created a function myRowStyle and set styleFunction=myRowStyle. What I cannot figure out is how to change the background color on the row. I've figured out how to change just about everything else. Here is the myRowStyle function. I am just setting a static set of rows to the style to help me figure this out. private function myRowStyle(data:Object, col:AdvancedDataGridColumn):Object{ var vals:Array = [0, 2, 4, 6]; var i:int = dg.dataProvider.getItemIndex(data); if (vals.indexOf(i) = 0){ var o:Object = new Object; o.color = 0x00; o.fontWeight = bold; o.backgroundColor = 0xFF; return o; } else return null; } o.backgroundColor is just my latest attempt. I've tried everything I can think of, but obviously have not thought of everything. Does anyone know the trick to doing this? Thanks Dominic
[flexcoders] Padding on a MenuBar
I have a MenuBar above a DataGrid in a VBox. I would like the two to meet without any padding between them. It seems MenuBar doesn't implement padding styles. Aside from extending MenuBar and implementing paddingTop and paddingBottom, is there another way to do this? If extending is the only option, does anyone have an example of this already done? thanks!
[flexcoders] AdvancedDataGrid - Changing the background color on a row.
I thought this would be easy to do, but I have been banging my head on it for a while. I'm wanting to let the user mark rows as they scroll through the ADG. I created a function myRowStyle and set styleFunction=myRowStyle. What I cannot figure out is how to change the background color on the row. I've figured out how to change just about everything else. Here is the myRowStyle function. I am just setting a static set of rows to the style to help me figure this out. private function myRowStyle(data:Object, col:AdvancedDataGridColumn):Object{ var vals:Array = [0, 2, 4, 6]; var i:int = dg.dataProvider.getItemIndex(data); if (vals.indexOf(i) = 0){ var o:Object = new Object; o.color = 0x00; o.fontWeight = bold; o.backgroundColor = 0xFF; return o; } else return null; } o.backgroundColor is just my latest attempt. I've tried everything I can think of, but obviously have not thought of everything. Does anyone know the trick to doing this? Thanks Dominic
[flexcoders] Re: AdvancedDataGrid - Changing the background color on a row.
Many thanks! --- In flexcoders@yahoogroups.com, Sherif Abdou [EMAIL PROTECTED] wrote: http://www.mikenimer.com/index.cfm/2006/10/3/BackgroundRowColor- DataGrid-component - Original Message From: Dominic Pazula [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, February 12, 2008 7:08:20 AM Subject: [flexcoders] AdvancedDataGrid - Changing the background color on a row. I thought this would be easy to do, but I have been banging my head on it for a while. I'm wanting to let the user mark rows as they scroll through the ADG. I created a function myRowStyle and set styleFunction= myRowStyle . What I cannot figure out is how to change the background color on the row. I've figured out how to change just about everything else. Here is the myRowStyle function. I am just setting a static set of rows to the style to help me figure this out. private function myRowStyle(data: Object, col:AdvancedDataGri dColumn): Object{ var vals:Array = [0, 2, 4, 6]; var i:int = dg.dataProvider. getItemIndex( data); if (vals.indexOf( i) = 0){ var o:Object = new Object; o.color = 0x00; o.fontWeight = bold; o.backgroundColor = 0xFF; return o; } else return null; } o.backgroundColor is just my latest attempt. I've tried everything I can think of, but obviously have not thought of everything. Does anyone know the trick to doing this? Thanks Dominic __ __ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
[flexcoders] Re: How can I FORCE a REDRAW of a DATAGRID
Try setting a new ArrayCollection with all the values from the changed ArrayCollection. Null the DataGrid dataProvider and then set the dataProvider to the new ArrayCollection. --- In flexcoders@yahoogroups.com, mr_j_harris [EMAIL PROTECTED] wrote: Hi Sharif, and thanks, I tried that, it provides the same results as I'm used to, which is a 95% refreshment of the on-screen visual aspect of the DataGrid. Does it force a redraw of all updated cells on my DataGrid... answer is NO. Do I need a redraw of all updated cells on my DataGrid... answer is YES. Many other poor sods (i.e. Flex Coders) have this problem. I digress, but Look: if Adobe was actually so clever, wouldn't they already have parsed all stylesheet names in any .css file in the project to provide to the Content Assistant? Oh I get it, perhaps it's called the Metered Release of Features to make money for the company Adobe. I just need to be able to FORCE a REDRAW of my DataGrid content. rendererChanged = true? Can't access that supposed property. But that would probably do it. However, it seems I need a 100% refreshment of all modified cells on the grid, and this is not happening for me via any on datagrid.validateNow() DataProviderArrayCollection.refresh() datagrid.invalidateList() datagrid.invalidateDisplayList() --- In flexcoders@yahoogroups.com, Sherif Abdou sherif626@ wrote: what do you mean by redraw? you can try validateNow() on the Grid - Original Message From: mr_j_harris mr_j_harris@ To: flexcoders@yahoogroups.com Sent: Monday, February 11, 2008 2:33:47 PM Subject: [flexcoders] How can I FORCE a REDRAW of a DATAGRID I need to force a redraw of a datagrid. Adobe's or whoever's Cleverness is not working for me. I just want to have my computer redraw the DataGrid from 0,0 to the bottom right corner. My computer has nothing better to do than that for me or my users. Because elsewise it is show stale data.. See, I recomputer some values in thoe objects in the ArrayCollection dataProvider of the dataGrid. Please tell me the one, two or three lines of ActionScript that will do this. Oh yeah, without causing that TypeError #1009 thing ever. Alternatively, how can I force a redraw of a particular cell? I know the cell coordinates. ... -- John Harris __ __ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
[flexcoders] Re: Keyboard navigation to objects within components
I'm looking to: I have an AdvancedDataGrid and I want track the user paging up, down, and across the grid with the arrow keys. I don't want the data to be editable, which means I cannot use the itemFocusIn event (throw, as you say, by the item editor). So I would like to know when the user scrolls through a datagrid (preferably an ADG) using the arrow keys. I do NOT want the data to be editable. The itemFocusIn event does not fire, and the change event does not produce acceptable results. I think the answer to the question, is No this is NOT possible out of the box. You have to write a renderer that implements IFocusManager and use the itemFocusIn event Thanks Dominic --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: I'm not clear what you want. You want arrow keys and pageup/dn to navigate to various cells and then edit those cells?
[flexcoders] Re: How can I FORCE a REDRAW of a DATAGRID
Oh, I know. He seemed to want a way to do it no matter what. This seems a likely way to get his new data into the grid, no matter what... I'm still learning Flex myself and the itemUpdated() is going into my ever expanding bag of tricks. Thanks! --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Yes that always works, re-assigning the dataProvider, but it does refresh the entire DG, which is usually not necessary unless the entire dataprovider is replaced. The OP has not told us how he is updating the dataProvider, nor what the ArrayCollection contains. If one uses the the dataProvider API (on a collection or xml) the UI updates automatically. If one manually updates a property in an item object, then often one needs to call itemUpdated() Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dominic Pazula Sent: Monday, February 11, 2008 5:15 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: How can I FORCE a REDRAW of a DATAGRID Try setting a new ArrayCollection with all the values from the changed ArrayCollection. Null the DataGrid dataProvider and then set the dataProvider to the new ArrayCollection. --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , mr_j_harris mr_j_harris@ wrote: Hi Sharif, and thanks, I tried that, it provides the same results as I'm used to, which is a 95% refreshment of the on-screen visual aspect of the DataGrid. Does it force a redraw of all updated cells on my DataGrid... answer is NO. Do I need a redraw of all updated cells on my DataGrid... answer is YES. Many other poor sods (i.e. Flex Coders) have this problem. I digress, but Look: if Adobe was actually so clever, wouldn't they already have parsed all stylesheet names in any .css file in the project to provide to the Content Assistant? Oh I get it, perhaps it's called the Metered Release of Features to make money for the company Adobe. I just need to be able to FORCE a REDRAW of my DataGrid content. rendererChanged = true? Can't access that supposed property. But that would probably do it. However, it seems I need a 100% refreshment of all modified cells on the grid, and this is not happening for me via any on datagrid.validateNow() DataProviderArrayCollection.refresh() datagrid.invalidateList() datagrid.invalidateDisplayList() --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Sherif Abdou sherif626@ wrote: what do you mean by redraw? you can try validateNow() on the Grid - Original Message From: mr_j_harris mr_j_harris@ To: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com Sent: Monday, February 11, 2008 2:33:47 PM Subject: [flexcoders] How can I FORCE a REDRAW of a DATAGRID I need to force a redraw of a datagrid. Adobe's or whoever's Cleverness is not working for me. I just want to have my computer redraw the DataGrid from 0,0 to the bottom right corner. My computer has nothing better to do than that for me or my users. Because elsewise it is show stale data.. See, I recomputer some values in thoe objects in the ArrayCollection dataProvider of the dataGrid. Please tell me the one, two or three lines of ActionScript that will do this. Oh yeah, without causing that TypeError #1009 thing ever. Alternatively, how can I force a redraw of a particular cell? I know the cell coordinates. ... -- John Harris __ __ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
[flexcoders] Re: Keyboard navigation to objects within components
Hi Alex, If it were only that simple... As I said earlier, the change event is not fired (in the ADG) when a user arrows off the header. If I am tracing the movement of the selected cell around the ADG, I miss a cell when the user arrows up too far, i.e. to the header, and then arrows down. Give the case below to see what I mean (xml file at http://www.talonrisk.com/apps/test/data.xml ). Should the change event be fired here? Is this a bug? If not, is there an event that IS fired in this case? Thanks Dominic ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import mx.events.ScrollEvent; import mx.collections.ArrayCollection; import mx.rpc.events.ResultEvent; import mx.events.ListEvent; private var sRow:int; private var sCol:int; private function selectCell(event:ListEvent):void{ sCol = event.columnIndex; sRow = event.rowIndex; sRowText.text = Selected Row: + sRow.toString(); sColText.text = Selected Column: +sCol.toString(); } private function resHandler(event:ResultEvent):void{ dg.dataProvider = event.result.TABLE.X; } ]] /mx:Script mx:HTTPService url=data.xml result=resHandler(event) id=data/ mx:VBox height=100% width=100% creationComplete=data.send() mx:HBox width=100% mx:Text id=sColText/ mx:Text id=sRowText/ /mx:HBox mx:AdvancedDataGrid id=dg height=100% width=100% itemClick=selectCell(event) change=selectCell(event) selectionMode=singleCell mx:columns mx:AdvancedDataGridColumn dataField=date / mx:AdvancedDataGridColumn dataField=char / mx:AdvancedDataGridColumn dataField=num / /mx:columns /mx:AdvancedDataGrid /mx:VBox /mx:Application --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: I'm confused as to why you want focus on those renderers if you can't edit them. If focus doesn't matter, the scroll and change events should be firing as you arrow around. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dominic Pazula Sent: Monday, February 11, 2008 9:57 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Keyboard navigation to objects within components I'm looking to: I have an AdvancedDataGrid and I want track the user paging up, down, and across the grid with the arrow keys. I don't want the data to be editable, which means I cannot use the itemFocusIn event (throw, as you say, by the item editor). So I would like to know when the user scrolls through a datagrid (preferably an ADG) using the arrow keys. I do NOT want the data to be editable. The itemFocusIn event does not fire, and the change event does not produce acceptable results. I think the answer to the question, is No this is NOT possible out of the box. You have to write a renderer that implements IFocusManager and use the itemFocusIn event Thanks Dominic --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Alex Harui aharui@ wrote: I'm not clear what you want. You want arrow keys and pageup/dn to navigate to various cells and then edit those cells?
[flexcoders] Re: Keyboard navigation to objects within components
Yeah, I still can't get it to work. I've simplified the test down to a basic DG. Adding editable=true on the DG disables the up and down arrow. Here's the test project. The data file can be found at http://www.talonrisk.com/apps/test/data.xml ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import mx.rpc.events.ResultEvent; import mx.events.DataGridEvent; import mx.events.ListEvent; private var sRow:int; private var sCol:int; private function selectCell(event:ListEvent):void{ sCol = event.columnIndex; sRow = event.rowIndex; sRowText.text = Selected Row: + sRow.toString(); sColText.text = Selected Column: +sCol.toString(); } private function focusHandler (event:DataGridEvent):void{ sRow = event.rowIndex; sCol = event.columnIndex; sRowText.text = Selected Row: + sRow.toString(); sColText.text = Selected Column: + sCol.toString(); } private function resHandler(event:ResultEvent):void{ dg.dataProvider = event.result.TABLE.X; } ]] /mx:Script mx:HTTPService url=data.xml result=resHandler(event) id=data/ mx:VBox height=100% width=100% creationComplete=data.send() mx:HBox width=100% mx:Text id=sColText/ mx:Text id=sRowText/ /mx:HBox mx:DataGrid id=dg height=100% width=100% itemClick=selectCell(event) itemFocusIn=focusHandler(event) editable=true mx:columns mx:DataGridColumn dataField=date editable=true rendererIsEditor=true/ mx:DataGridColumn dataField=char editable=true rendererIsEditor=true/ mx:DataGridColumn dataField=num editable=true rendererIsEditor=true/ /mx:columns /mx:DataGrid /mx:VBox /mx:Application --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: The dataGrid also has editable=true? Try a test with a simple DG to see how it behaves before going back to ADG. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dominic Pazula Sent: Sunday, February 10, 2008 3:46 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Keyboard navigation to objects within components I finally got around to trying this. It doesn't work. Setting the column to editable=true and rendererIsEditor=true still does not fire the itemFocusIn event. The change event ALMOST allows me to track which cell is highlighted with keyboard navigation. However, if the user scrolls onto the header, the change event is not fired when the user scolls off the header. So, original question: I have an AdvancedDataGrid and I want track the user paging up, down, and across the grid with the arrow keys. I don't want the data to be editable, which means I cannot use the itemFocusIn event (thrown, as you say, by the item editor). Is there an easy way to do this without rewriting the item renderer? Thanks Dom
[flexcoders] Re: Keyboard navigation to objects within components
I finally got around to trying this. It doesn't work. Setting the column to editable=true and rendererIsEditor=true still does not fire the itemFocusIn event. The change event ALMOST allows me to track which cell is highlighted with keyboard navigation. However, if the user scrolls onto the header, the change event is not fired when the user scolls off the header. So, original question: I have an AdvancedDataGrid and I want track the user paging up, down, and across the grid with the arrow keys. I don't want the data to be editable, which means I cannot use the itemFocusIn event (thrown, as you say, by the item editor). Is there an easy way to do this without rewriting the item renderer? Thanks Dom
[flexcoders] Re: Keyboard navigation to objects within components
Is there anyway to do this out-of-the box? I have an AdvancedDataGrid and I want track the user paging up, down, and across the grid with the arrow keys. I don't want the data to be editable, which means I cannot use the itemFocusIn event (throw, as you say, by the item editor). Is there an easy way to do this without rewriting the item renderer? --- In flexcoders@yahoogroups.com, Dave [EMAIL PROTECTED] wrote: Try having your renderer for the cell implement IFocusManager. Get the focus event and set your desired component focus. --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote: Editable=true? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of simonjpalmer Sent: Monday, February 04, 2008 4:25 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Keyboard navigation to objects within components seems like you want to tab through the columns of the selected row, I have not seen any way of doing that an somewhat inelegant brute force method would be to define shortcuts to the buttons in your columns and trap those shortcuts as key presses in the component, check which row is selected, get the link and spoof a button press performing whatever action was under the original button. --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , dannytab69 dannytab69@ wrote: I'm having a number of issues in my application regarding keyboard navigation and selection of objects within other components. For example, in a datagrid I have, two of the columns' are displayed as link buttosn, each of which is contained in a vbox within an item renderer. The problem is that the application will allow me to tab to the data grid in question, and then use the up/down arrows to select particular rows, but there seems to be no way that I can think of that will allow me to select the individual link buttons within each row. Has anybody any ideas? Any help would be greatly appreciated. Thanks Danny
[flexcoders] Custom Renderer problem in a List Control
I wrote a simple renderer to display a concatination of two fields on the object item in a list. MXML code is below: ?xml version=1.0 encoding=utf-8? mx:Text xmlns:mx=http://www.adobe.com/2006/mxml; text={StringUtil.trim(data.NAME)} - {StringUtil.trim(data.LABEL)} textAlign=left selectable=false height=100% mx:Script ![CDATA[ import mx.utils.StringUtil; ]] /mx:Script /mx:Text Because of the length of the Text, I enabled word wrap on the List box. I have two list boxes. A user selects items out of the populated box by draging the item to the other box. The problem is when a single item is drug to the second box, only the top portion of the text (and not even the full first line -- about the top 3/4 of the first line) is displayed. When I use a button to move all the objects to the second box, the items are displayed correctly. I am handling the drag and drop by the default methods in the List control (dragEnabled, dragMoveEnable, and dropEnabled are all set to true). I added a button to add a selected item to the second box, this seems to work OK. If I move 1 item over this way, and then drag a second item, both items are displayed correctly. This would seem to be a problem with the default drag and drop initializing the height of the item field in the List box. Has anyone seen this before? Does anyone have ideas on how to work around this? Thanks Dominic
[flexcoders] Re: Custom Renderer problem in a List Control
Since I posted this last night, I worked on it a little more and figured a few things out. My button works because at the end of its click code, it resets the dataprovider for the second list (list2.dataProvider = blah). If I don't do this, then the button gives the same visual results as the drag and drop. I also wrote my own dragDrop methods, adding the reset of the dataProvider. This gives the good visual result. So I have my work around, but my question remains. Is there a way to get the List component to properly display the renderer without having to reset the dataProvider? For small lists this wouldn't be an issue, but I imagine doing this with a large list could add a fair amount of overhead.
[flexcoders] Re: Custom Renderer problem in a List Control
Bumping this up the list. Can anyone provide some insight into this problem? Thanks Dominic
[flexcoders] Re: Custom Renderer problem in a List Control
Many thanks!
[flexcoders] Re: flex Outlook integration
Try this. It pops up a new blank explorer window, but it does what you are looking for. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ private function sendEmail():void{ var mailto:String = mailto:+toEmail.text; navigateToURL(new URLRequest(mailto)); } ]] /mx:Script mx:Button x=10 y=69 label=Send Email click=sendEmail ()/ mx:TextInput x=10 y=39 id=toEmail/ /mx:Application --- In flexcoders@yahoogroups.com, Mohammad, Rafi [EMAIL PROTECTED] wrote: hi, I have developed a flex application.Now there is a button Email , which , when clicked , has to open a new outlook email window with to pointing to specific fields... does any one have a solution for this... appreciate your help.. regards, Rafi
[flexcoders] Re: Web Hosting
Try www.iceweb.com. I have some friends that use it and are very happy with the service. --- In flexcoders@yahoogroups.com, Joe [EMAIL PROTECTED] wrote: Same Question, but I must ask about Windows hosting. Does anyone have suggestions for Windows hosting? Anyone know if they have a 3.0 or 3.5runtime? -Joe
[flexcoders] Dynamically Generating Column Attributes for a Data Grid
I tried to search for this but got a server busy error. I figured I would go ahead and post it. I appologize if this has been covered before. I'm trying to dynamically generate columns for my datagrid. I don't have prior knowledge of the column attributes before receiving the data. I get two ArrayCollection objects, one with the data (gridData) and one with the metadata about the columns (called columnData from here on). Here is the function I am trying to write: public function updateGridData():void{ var column:DataGridColumn; var headers:String = new String(); for (var i:int =0; icolumnData.length; i++){ column = new DataGridColumn(columnData[i].name); //column.dataField = columnData.name; column.headerText = getheaderText(columnData[i]); //headers = headers + getheaderText(columnData[i]) + , ; dGrid.columns.push(column); } dGrid.dataProvider = gridData; //mx.controls.Alert.show(Updated the DataGrid. Headers SHOULD be: + headers); } The getheaderText() function returns the header text value based on a user selection (description or name). What am I doing wrong here? Thanks Dominic
[flexcoders] Re: Dynamically Generating Column Attributes for a Data Grid
Thanks, Made a couple of modifications based on your example and got it to work. Here is the function for the record (headers String and Alert commented out): public function updateGridData():void{ var newColumns:Array = new Array(); //var headers:String = new String(); var i:int; for (i = 0; icolumnData.length; i++) { var column:DataGridColumn = new DataGridColumn(); column.dataField = columnData[i].name; column.headerText = getheaderText(columnData[i]); //headers = headers + column.headerText + , ; newColumns.push(column); } dGrid.dataProvider = gridData; dGrid.columns = newColumns; //mx.controls.Alert.show(Updated the DataGrid. Headers SHOULD be: + headers); } --- In flexcoders@yahoogroups.com, Sebastian Zarzycki [EMAIL PROTECTED] wrote: But what result you get? Make sure that data are already there (gridData and columnData are filled with values) when you launch this method. I would fix the code with the following : var headers:String = new String(); var newColumns:Array = new Array(); // flex loops are generally done this way (see http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhel p.htm? context=LiveDocs_Partsfile=1831.html) var i:int; for (i = 0; icolumnData.length; i++) { var column:DataGridColumn = new DataGridColumn(columnData [i].name); column.dataField = columnData[i].name; // there wasn't [i] index here column.headerText = getheaderText(columnData[i]); // aren't you setting name/header in constructor? //headers = headers + getheaderText(columnData[i]) + , ; // what is this for? newColumns.push(column); } dGrid.dataProvider = gridData; dGrid.columns = newColumns; // it's better to assign at the end, to avoid datagrid invalidations on every column added. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dominic Pazula Sent: Monday, January 21, 2008 9:04 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Dynamically Generating Column Attributes for a Data Grid I tried to search for this but got a server busy error. I figured I would go ahead and post it. I appologize if this has been covered before. I'm trying to dynamically generate columns for my datagrid. I don't have prior knowledge of the column attributes before receiving the data. I get two ArrayCollection objects, one with the data (gridData) and one with the metadata about the columns (called columnData from here on). Here is the function I am trying to write: public function updateGridData():void{ var column:DataGridColumn; var headers:String = new String(); for (var i:int =0; icolumnData.length; i++){ column = new DataGridColumn(columnData[i].name); //column.dataField = columnData.name; column.headerText = getheaderText(columnData[i]); //headers = headers + getheaderText(columnData[i]) + , ; dGrid.columns.push(column); } dGrid.dataProvider = gridData; //mx.controls.Alert.show(Updated the DataGrid. Headers SHOULD be: + headers); } The getheaderText() function returns the header text value based on a user selection (description or name). What am I doing wrong here? Thanks Dominic -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.com Yahoo! Groups Links