[flexcoders] Question about 'copyLocale'
Usage: copylocale srcLocale dstLocale copyLocale is a command to generate framework resource for each locale. I wonder whether srcLocale should be a default locale for dstLocale. In other words, should srcLocale be a locale that is as close as possible to dstLocale. For example, would the following two commands generate the same results? 1 - copylocale en_US de 2 - copylocale de_DE de de_DE is closer to de and it can be a default locale for de - instead of en_US. Would 'copylocale en_US de' cause any error? The following document does not not mention anything about that: http://livedocs.adobe.com/flex/3/html/help.html?content=l10n_3.html Any advice is greatly apprecidated, Tung Chau
[flexcoders] Compiling Resource Modules-Is there any way to avoid running 'copylocale'
Is there anyway to automate the process of running 'copylocale' so that new developer does not have to manually run the command in their $FLEX_HOME? Any advice is greatly appreciated, Tung Chau
[flexcoders] Equivalent ant command for copylocale en_US fr_FR
I tried the following ant command, but it did not work mkdir dir=${FLEX_HOME}/frameworks/locale/$...@{locale}}/ java jar=${FLEX_HOME}/lib/copylocale.jar fork=true maxmemory=512m failonerror=true !-- arg value=-src_locale=${default.locale}/ arg value=-dst_locale...@{locale}}/ -- arg line=-src_locale=${default.locale} -dst_locale...@{locale}}/ /java I keep getting the following error: [echo] running copylocale en_US da [java] Exception in thread main java.lang.NullPointerException [java] at java.io.File.init(File.java:222) [java] at flex2.tools.CopyLocale.checkArguments(CopyLocale.java:126) [java] at flex2.tools.CopyLocale.run(CopyLocale.java:94) [java] at flex2.tools.CopyLocale.main(CopyLocale.java:46) Is there anyway to make the ant call work? Tung Chau
[flexcoders] Re: Equivalent ant command for copylocale en_US fr_FR
Nevermind, I was missing the jvmarg. Here is the solution: mkdir dir=${FLEX_HOME}/frameworks/locale/$...@{locale}}/ java jar=${FLEX_HOME}/lib/copylocale.jar fork=true maxmemory=512m failonerror=true jvmarg value=-Dapplication.home=${FLEX_HOME}/ arg value=${default.locale}/ !-- which can be en_US -- arg value=$...@{locale}}/ !-- which can be vi_VN -- /java --- In flexcoders@yahoogroups.com, tungchau81 tungcha...@... wrote: I tried the following ant command, but it did not work mkdir dir=${FLEX_HOME}/frameworks/locale/$...@{locale}}/ java jar=${FLEX_HOME}/lib/copylocale.jar fork=true maxmemory=512m failonerror=true !-- arg value=-src_locale=${default.locale}/ arg value=-dst_locale...@{locale}}/ -- arg line=-src_locale=${default.locale} -dst_locale...@{locale}}/ /java I keep getting the following error: [echo] running copylocale en_US da [java] Exception in thread main java.lang.NullPointerException [java] at java.io.File.init(File.java:222) [java] at flex2.tools.CopyLocale.checkArguments(CopyLocale.java:126) [java] at flex2.tools.CopyLocale.run(CopyLocale.java:94) [java] at flex2.tools.CopyLocale.main(CopyLocale.java:46) Is there anyway to make the ant call work? Tung Chau
[flexcoders] Re: Is there any way to update Resource bundle dynamically?
About my question#2, since ResourceManger API does not provide a way to update resource bundle, is there anyway I can modify .properties files on the fly and then recompile the Resource Module .swf for the log-in user after he/she modifies the UI configuration? Any advice is appreciated, Tung Chau --- In flexcoders@yahoogroups.com, tungchau81 tungcha...@... wrote: Hi, In a new project, I am required to create customizable UI using Flex. The application should allow each log-in user or customer to configure their own labels, messages and icons. I have two questions: 1) I plan to load different ResourceModule for each log-in user. For example, user1 will have user1Resource.swf loaded everytime he logs in into the applicatio. user2 will have user2Resource.swf. Is this a good approach? Is there any better way? 2) At run time, when a login user configures (through a UI) his/her own label for a FormItem and hits save, I need to update the UI immediately with the new label he/she entered. What would be a good solution for this? I looked at ResourceManger API, but could not find any way to update Resource bundle dynamically. Is there any way to update Resource bundle dynamically or is there a different way to do the task? Thanks in advance, Tung Chau
[flexcoders] Is there any way to update Resource bundle dynamically?
Hi, In a new project, I am required to create customizable UI using Flex. The application should allow each log-in user or customer to configure their own labels, messages and icons. I have two questions: 1) I plan to load different ResourceModule for each log-in user. For example, user1 will have user1Resource.swf loaded everytime he logs in into the applicatio. user2 will have user2Resource.swf. Is this a good approach? Is there any better way? 2) At run time, when a login user configures (through a UI) his/her own label for a FormItem and hits save, I need to update the UI immediately with the new label he/she entered. What would be a good solution for this? I looked at ResourceManger API, but could not find any way to update Resource bundle dynamically. Is there any way to update Resource bundle dynamically or is there a different way to do the task? Thanks in advance, Tung Chau
[flexcoders] Re: How to implement right click drill down for either PieChart or ColumnChart
I am not writing things in AIR, therefore, I cannot rely on rightclick event. I assigned contextMenu of each PieSeries and ColumnSeries to my custom ContextMenu. Therefore, I was able to solve problem #1 as you said. When a user clicks on any item of my custom ContextMenu, I catch an event called ContextMenuEvent.MENU_ITEM_SELECT. However, this event.mouseTarget does not tell me the specific data of a dataprovider that belongs to the column or the pie wedge underneath the right mouse click. Any help is greatly appreciated, Tung Chau --- In flexcoders@yahoogroups.com, sunild99 sunilbd...@... wrote: --- In flexcoders@yahoogroups.com, tungchau81 tungchau81@ wrote: I have two problems: Problem#1: I know how to create right-click menu using ContextMenu and ContextMenuItem. However, I do not know how to make the right- click menu to show up **if and only if** a user clicks on a wedge of a PieChart or a column of a ColumnChart, not anywhere else. I did this with an AreaChart by adding an event listener for mouse clicks to each AreaSeries object. I imagine you could do the same thing with PieSeries or ColumnSeries. I'm not sure what to say about your second problem, I did the above in an AIR application :) Regards, Sunil
[flexcoders] Re: How to implement right click drill down for either PieChart or ColumnChart
Anyway, overriding mouseClickHandler function in ChartBase is not a right solution since right click is not handled by this function. --- In flexcoders@yahoogroups.com, tungchau81 tungcha...@... wrote: I want to override the following function in ChartBase class, but it is private. I wonder if there is any other alternative solution. private function mouseClickHandler(event:MouseEvent):void Thanks in advance, Tung Chau --- In flexcoders@yahoogroups.com, tungchau81 tungchau81@ wrote: Any help out there? I am really stuck on this... --- In flexcoders@yahoogroups.com, tungchau81 tungchau81@ wrote: Hi, When a user **right-click on a wedge in a PieChart or a column in a ColumnChart control, I need to drill down into the data for that wedge or column and display new charts based on the selected menu item on the right-click menu. This should work similar to a normal left-click drill down available in Flex Chart using HitData. I have two problems: Problem#1: I know how to create right-click menu using ContextMenu and ContextMenuItem. However, I do not know how to make the right- click menu to show up **if and only if** a user clicks on a wedge of a PieChart or a column of a ColumnChart, not anywhere else. Problem#2: I cannot use the rightClick event available in ColumnChart API because the event is only available in AIR runtime. Also, rightClick event is not associated with ChartItemEvent as itemClick event does and therefore, no hitData is available for me to figure what data was underneath the mouse when the right-click event was triggered. Any help or suggestion is greatly appreciated. Thank you Tung Chau
[flexcoders] Re: How to implement right click drill down for either PieChart or ColumnChart
Any help out there? I am really stuck on this... --- In flexcoders@yahoogroups.com, tungchau81 tungcha...@... wrote: Hi, When a user **right-click on a wedge in a PieChart or a column in a ColumnChart control, I need to drill down into the data for that wedge or column and display new charts based on the selected menu item on the right-click menu. This should work similar to a normal left-click drill down available in Flex Chart using HitData. I have two problems: Problem#1: I know how to create right-click menu using ContextMenu and ContextMenuItem. However, I do not know how to make the right-click menu to show up **if and only if** a user clicks on a wedge of a PieChart or a column of a ColumnChart, not anywhere else. Problem#2: I cannot use the rightClick event available in ColumnChart API because the event is only available in AIR runtime. Also, rightClick event is not associated with ChartItemEvent as itemClick event does and therefore, no hitData is available for me to figure what data was underneath the mouse when the right-click event was triggered. Any help or suggestion is greatly appreciated. Thank you Tung Chau
[flexcoders] Re: How to implement right click drill down for either PieChart or ColumnChart
I want to override the following function in ChartBase class, but it is private. I wonder if there is any other alternative solution. private function mouseClickHandler(event:MouseEvent):void Thanks in advance, Tung Chau --- In flexcoders@yahoogroups.com, tungchau81 tungcha...@... wrote: Any help out there? I am really stuck on this... --- In flexcoders@yahoogroups.com, tungchau81 tungchau81@ wrote: Hi, When a user **right-click on a wedge in a PieChart or a column in a ColumnChart control, I need to drill down into the data for that wedge or column and display new charts based on the selected menu item on the right-click menu. This should work similar to a normal left-click drill down available in Flex Chart using HitData. I have two problems: Problem#1: I know how to create right-click menu using ContextMenu and ContextMenuItem. However, I do not know how to make the right- click menu to show up **if and only if** a user clicks on a wedge of a PieChart or a column of a ColumnChart, not anywhere else. Problem#2: I cannot use the rightClick event available in ColumnChart API because the event is only available in AIR runtime. Also, rightClick event is not associated with ChartItemEvent as itemClick event does and therefore, no hitData is available for me to figure what data was underneath the mouse when the right-click event was triggered. Any help or suggestion is greatly appreciated. Thank you Tung Chau
[flexcoders] How to implement right click drill down for either PieChart or ColumnChart
Hi, When a user **right-click on a wedge in a PieChart or a column in a ColumnChart control, I need to drill down into the data for that wedge or column and display new charts based on the selected menu item on the right-click menu. This should work similar to a normal left-click drill down available in Flex Chart using HitData. I have two problems: Problem#1: I know how to create right-click menu using ContextMenu and ContextMenuItem. However, I do not know how to make the right-click menu to show up **if and only if** a user clicks on a wedge of a PieChart or a column of a ColumnChart, not anywhere else. Problem#2: I cannot use the rightClick event available in ColumnChart API because the event is only available in AIR runtime. Also, rightClick event is not associated with ChartItemEvent as itemClick event does and therefore, no hitData is available for me to figure what data was underneath the mouse when the right-click event was triggered. Any help or suggestion is greatly appreciated. Thank you Tung Chau
[flexcoders] Re: Custom CheckBox icon?
Do you have an answer for this yet? I am running into the same problem. Regards, Tung Chau --- In flexcoders@yahoogroups.com, Jason [EMAIL PROTECTED] wrote: Does anyone know how to set the default 'check' icon of a CheckBox to a different image? I would like to use an 'x' instead of the 'check'. The class definition shows that it inherits the 'icon' style from the Button class, but I cannot seem to be able to set the icon attribute like I can with a button. --jason
[flexcoders] How to tell AdvancedDataGrid to not display child nodes
Hi, I have an ArrayCollection its members might have children property set to a list of child members. I want to use AdvancedDataGrid for a convenient filtering capability, but I want to display data as a list without child nodes. Is there anyway I can tell my AdvancedDataGrid to display top parent elements only without displaying child nodes. I don't want to set the children property to null since I need to use it for a different AdvancedDataGrid. I tried to set dataProvider to my ArrayCollection, but the child nodes still show up. I also tried to overwrite HierarchicalData class and overrride the getChildren as well as hasChildren methods, but this does not help. Any advice is greatly appreciated. Tung Chau
[flexcoders] Re: How to tell AdvancedDataGrid to not display child nodes
Please ignore my question. It should work. --- In flexcoders@yahoogroups.com, tungchau81 [EMAIL PROTECTED] wrote: Hi, I have an ArrayCollection its members might have children property set to a list of child members. I want to use AdvancedDataGrid for a convenient filtering capability, but I want to display data as a list without child nodes. Is there anyway I can tell my AdvancedDataGrid to display top parent elements only without displaying child nodes. I don't want to set the children property to null since I need to use it for a different AdvancedDataGrid. I tried to set dataProvider to my ArrayCollection, but the child nodes still show up. I also tried to overwrite HierarchicalData class and overrride the getChildren as well as hasChildren methods, but this does not help. Any advice is greatly appreciated. Tung Chau
[flexcoders] Re: How to make only certain rows in an AdvancedDataGrid selectable?
Hi Amy, event.preventDefault() was the very first solution I tried, but it did not help in this case. I tried Marcelo's approach to using drawSelectionIndicator and it worked. Thanks alot, Tung Chau --- In flexcoders@yahoogroups.com, Amy [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com, tungchau81 tungchau81@ wrote: Thanks, Amy. I tried setting mouseChildren to false for parent nodes and it worked, but I no longer was able to click on the default arrow icon to expand and collapse a node... I did not state my question clearly earlier. I still want users to be able to collapse and expand a node, but the containing row of the node should not selectable. This means no highlighting color shows up when users attempt to select those rows in a table. Maybe you could use a preventDefault in the itemClick handler. HTH; -Amy
[flexcoders] Re: How to make only certain rows in an AdvancedDataGrid selectable?
Thanks, Amy. I tried setting mouseChildren to false for parent nodes and it worked, but I no longer was able to click on the default arrow icon to expand and collapse a node... I did not state my question clearly earlier. I still want users to be able to collapse and expand a node, but the containing row of the node should not selectable. This means no highlighting color shows up when users attempt to select those rows in a table. Regards, Tung Chau --- In flexcoders@yahoogroups.com, Amy [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com, tungchau81 tungchau81@ wrote: Hi, I have an AdvancedDataGrid and I only want to me rows of leaf nodes selectable. Rows of parent nodes should not be selectable. However, AdvancedDataGrid only has a global selectable property. Any advice on how to do this is greatly appreciated. Try extending AdvancedDataGridGroupItemRenderer and set MouseChildren on it to false. HTH; Amy
[flexcoders] Re: What Flex method can I use to close the main window of a Flex application?
Yeah, but I want to move away from JavaScript since I do not want to depend on browser version. --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Or use navigateToURL() to load an ordinary html error page? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Sherif Abdou Sent: Thursday, September 18, 2008 4:52 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] What Flex method can I use to close the main window of a Flex application? Why close it? Can't you just use Javascript to reload the Flex Application again or Do you just want them to close and not to come back for a while? -- Sherif Abdou http://VadexFX.com http://VadexFX.com http://Sherifabdou.com http://Sherifabdou.com - Original Message - From: tungchau81 mailto:[EMAIL PROTECTED] To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Sent: Thursday, September 18, 2008 12:29 PM Subject: [flexcoders] What Flex method can I use to close the main window of a Flex application? Hi, I have a J2EE application using Flex on the client side. Whenever there is a severe system error such as unable to establish connection with the server or session timed out, I need to pop up a dialog with a Close Browser button which allows users to close the Flex application. In my original solution, I had a callback to ExternalInterface to invoke the following JavaScript function: window.close() The above JavaScript function works fine in IE and FF 3.0, but not in FF 2.0. The browser window in my FF 2.0 simply did not close when the function got called. This is a known bug in FF 2.0 in which a non- script-owned window (window opened by a URL) cannot be closed by calling window.close(). Question: Is there any Flex method that can help me accomplish the same task without doing any browser callback or JavaScript? My purpose is trying to move away from being depedent on browser versions. Any help is greatly appreciated. Tung Chau
[flexcoders] How to make only certain rows in an AdvancedDataGrid selectable?
Hi, I have an AdvancedDataGrid and I only want to me rows of leaf nodes selectable. Rows of parent nodes should not be selectable. However, AdvancedDataGrid only has a global selectable property. Any advice on how to do this is greatly appreciated. Regards, Tung Chau
[flexcoders] What Flex method can I use to close the main window of a Flex application?
Hi, I have a J2EE application using Flex on the client side. Whenever there is a severe system error such as unable to establish connection with the server or session timed out, I need to pop up a dialog with a Close Browser button which allows users to close the Flex application. In my original solution, I had a callback to ExternalInterface to invoke the following JavaScript function: window.close() The above JavaScript function works fine in IE and FF 3.0, but not in FF 2.0. The browser window in my FF 2.0 simply did not close when the function got called. This is a known bug in FF 2.0 in which a non- script-owned window (window opened by a URL) cannot be closed by calling window.close(). Question: Is there any Flex method that can help me accomplish the same task without doing any browser callback or JavaScript? My purpose is trying to move away from being depedent on browser versions. Any help is greatly appreciated. Tung Chau
[flexcoders] AdvancedDataGrid::showRoot=false does not when the root node has no children
Hi everybody, I found out that setting HierarchicalCollectionView.showRoot = false does not work when my root node has not child node. I used AdvancedDataGrid. Does any body know how to work around this? Any help is greatly appreciated. Regards, Tung Chau
[flexcoders] Re: Flex 3.0 ADG : vertical scroll bar does not scroll up when dragging
In summary, I meant it was impossible to scroll while dragging an item upward or downward in an AdvancedDataGrid component.
[flexcoders] Re: Flex 3.0 ADG : vertical scroll bar does not scroll up when dragging
My simple ADGTest.mxml ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Script ![CDATA[ import mx.collections.ArrayCollection; [Bindable] private var dpFlat:ArrayCollection = new ArrayCollection([ {Region:Southwest, Territory:Arizona, Territory_Rep:Barbara Jennings, Actual:38865, Estimate:4}, {Region:Southwest, Territory:Arizona, Territory_Rep:Dana Binn, Actual:29885, Estimate:3}, {Region:Southwest, Territory:Central California, Territory_Rep:Joe Smith, Actual:29134, Estimate:3}, {Region:Southwest, Territory:Nevada, Territory_Rep:Bethany Pittman, Actual:52888, Estimate:45000}, {Region:Southwest, Territory:Northern California, Territory_Rep:Lauren Ipsum, Actual:38805, Estimate:4}, {Region:Southwest, Territory:Northern California, Territory_Rep:T.R. Smith, Actual:55498, Estimate:4}, {Region:Southwest, Territory:Southern California, Territory_Rep:Alice Treu, Actual:44985, Estimate:45000}, {Region:Southwest, Territory:Southern California, Territory_Rep:Jane Grove, Actual:44913, Estimate:45000} ]); ]] /mx:Script mx:Panel title=AdvancedDataGrid Control Example height=50% width=50% layout=horizontal paddingTop=10 paddingBottom=10 paddingLeft=10 paddingRight=10 mx:AdvancedDataGrid id=myADG width=100% height=100% initialize=gc.refresh(); dragMoveEnabled=true dropEnabled=true dragEnabled=true mx:dataProvider mx:GroupingCollection id=gc source={dpFlat} mx:grouping mx:Grouping mx:GroupingField name=Region/ mx:GroupingField name=Territory/ /mx:Grouping /mx:grouping /mx:GroupingCollection /mx:dataProvider mx:columns mx:AdvancedDataGridColumn dataField=Region/ mx:AdvancedDataGridColumn dataField=Territory/ mx:AdvancedDataGridColumn dataField=Territory_Rep headerText=Territory Rep/ mx:AdvancedDataGridColumn dataField=Actual/ mx:AdvancedDataGridColumn dataField=Estimate/ /mx:columns /mx:AdvancedDataGrid /mx:Panel /mx:Application
[flexcoders] Re: Flex 3.0 ADG : vertical scroll bar does not scroll up when dragging
I found out that AdvancedListBase.dragScrollingInterval is always 0 when dragEnabled=true. Therefore AdvancedListBase.dragScroll() function always returns early since it has the following condition: // sometimes, we'll get called even if interval has been cleared if (dragScrollingInterval == 0) return;
[flexcoders] Re: Flex 3.0 ADG : vertical scroll bar does not scroll up when dragging
Still, I don't know how to work around this error since dragScrollingInterval is a private variable.
[flexcoders] Re: Flex 3.0 ADG : vertical scroll bar does not scroll up when dragging
In case you are interested, somebody else in this group encountered the same not scrolling when dragging an item issue at the following thread: http://tech.groups.yahoo.com/group/flexcomponents/message/3076
[flexcoders] Flex 3.0 ADG : vertical scroll bar does not scroll up when dragging
Hi, I remember this worked in Flex 3 beta 3. Is this a possible bug in Flex 3 release or is there any configuration that I am missing? In my AdvancedDataGrid (ADG), dragMoveEnabled=true and verticalScrollBar appears since the data tree in my ADG is too long. I tried to drag and drop an item from the bottom of a tree into the top level of the tree. However, the vertical scroll bar did not continue moving up. There is no way I could scroll to the root of the tree while dragging an item. I tried to drag an item from the top of the tree to the bottom and I could not scroll to the bottom part of the tree either. I searched at https://bugs.adobe.com and did not find any bug log for this problem. Please help. Is there any extra configuration that I was missing in order to make scrolling work with dragging? If not, any suggestion about working around this issue is greatly appreciated. Regards, Tung Chau
[flexcoders] Re: How to associate a double click with item editting in AdvancedDataGrid
I tried to override the mouseUpHandler function to remove the code section that dispatches itemEditBeginning event. However, there were many private variables in mouseUpHandler function; therefore, I could not successfully overwrite this function. Basically, I need to disable item editting session for a single mouse click, but enable the edit session for a double click. I have been thinking about this issue for one week already and still have not been able to come up with a solution. Any advice or idea is greatly appreciated. Tung Chau --- In flexcoders@yahoogroups.com, tungchau81 [EMAIL PROTECTED] wrote: Hi everybody, In my AdvancedDataGrid which has grouping, I set editable property to be either true or item in order to make it editable. I also set editable property to be true for the first column, and false for the rest of the columns. A single click of the mouse on any item in the first column will make the item editable. The Text Input editor will appear. I looked at the source code and realized that Flex developers handled this case in a mouseUpHandler function. I wonder if there is anyway I can associate a doubleClick with item editting capability. I do not want item editing to happen with a single click. Should I listen to the doubleClick event or overwrite mouseUpHandler function? Thanks in advance. Any advice is greatly appriciated. Tung Chau
[flexcoders] Re: How to associate a double click with item editting in AdvancedDataGrid
override protected function mouseUpHandler(event:MouseEvent):void { if (!tween) { if (!collection || !collection.length) return; var advancedDataGridEvent:AdvancedDataGridEvent; var r:IListItemRenderer; var s:Sprite; var n:int; var i:int; r = mouseEventToItemRenderer(event); if (enabled (sortableColumns || draggableColumns) collection this.mx_internal::headerVisible hasHeaderItemsCreated()) { n = orderedHeadersList.length; for (i = 0; i n; i++) { if (r == orderedHeadersList [i].headerItem r) { var c:AdvancedDataGridColumn = orderedHeadersList[i].column; if (sortableColumns c.sortable lastItemDown == r) { lastItemDown = null; advancedDataGridEvent= new AdvancedDataGridEvent( AdvancedDataGridEvent.HEADER_RELEASE, false, true); // HEADER_RELEASE event is cancelable if(c.colNum == -1 || isNaN (c.colNum)) advancedDataGridEvent.columnIndex = -1; else advancedDataGridEvent.columnIndex = c.colNum; advancedDataGridEvent.dataField = c.dataField; advancedDataGridEvent.itemRenderer = r; advancedDataGridEvent.triggerEvent = event; if (Object(r).hasOwnProperty (mouseEventToHeaderPart)) advancedDataGridEvent.headerPart = Object(r).mouseEventToHeaderPart (event); dispatchEvent (advancedDataGridEvent); } isPressed = false; return; } } } if (movingColumn) return; super.mouseUpHandler(event); lastItemDown = null; } } = lastItemDown variable was private inside AdvancedDataGridBaseEx.as. There is no way I could override mouseUpHandler function to remove the code sectio that dispatches AdvancedDataGridEvent.ITEM_EDIT_BEGINNING event.
[flexcoders] Re: How to associate a double click with item editting in AdvancedDataGrid
Thanks a lot. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: This blog article may help: http://blogs.adobe.com/aharui/2008/03/datagrid_doubleclick_to_edit.htm l From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of tungchau81 Sent: Thursday, March 13, 2008 11:21 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: How to associate a double click with item editting in AdvancedDataGrid I tried to override the mouseUpHandler function to remove the code section that dispatches itemEditBeginning event. However, there were many private variables in mouseUpHandler function; therefore, I could not successfully overwrite this function. Basically, I need to disable item editting session for a single mouse click, but enable the edit session for a double click. I have been thinking about this issue for one week already and still have not been able to come up with a solution. Any advice or idea is greatly appreciated. Tung Chau --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , tungchau81 tungchau81@ wrote: Hi everybody, In my AdvancedDataGrid which has grouping, I set editable property to be either true or item in order to make it editable. I also set editable property to be true for the first column, and false for the rest of the columns. A single click of the mouse on any item in the first column will make the item editable. The Text Input editor will appear. I looked at the source code and realized that Flex developers handled this case in a mouseUpHandler function. I wonder if there is anyway I can associate a doubleClick with item editting capability. I do not want item editing to happen with a single click. Should I listen to the doubleClick event or overwrite mouseUpHandler function? Thanks in advance. Any advice is greatly appriciated. Tung Chau
[flexcoders] Limitation in AdvancedDataGridItemRenderer
Hi, In the first column of my custom AdvancedDataGrid, I want to display two 16x16 images right before the name of the item. However, extending AdvancedDataGridItemRenderer class does not allow me to do that since this class's API does not expose any method called createChildren. The class simply extends TextField class. If I use an in-place itemRenderer, the indentation on the life side of all leaf nodes is messed up. The indentation on the left side of each tree node is needed in order to show a clear hierarchical structure. mx:AdvancedDataGridColumn headerText=Name dataField=name sortable=false width=300 minWidth=160 mx:itemRenderer mx:Component mx:HBox horizontalScrollPolicy=off verticalScrollPolicy=off horizontalGap=1 mx:Image source={outerDocument.itemToIcon(data)}/ mx:Image source={(outerDocument.isDevice(data)==true)? outerDocument.getStatusIcon(data) : null}/ mx:Label text={data.name}/ /mx:HBox /mx:Component /mx:itemRenderer Is there any suggestion out there? Any advice is greatly appreciated. Regards, Tung Chau
[flexcoders] Re: dataTipFunction position in datagrid
In the API for AdvancedDataGridItemRenderer, there was no tooltipshow event defined. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Listen to renderer not control From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of tungchau81 Sent: Wednesday, December 05, 2007 5:42 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: dataTipFunction position in datagrid Hi Alex, I tried to listen to the tooltipshow event in AdvancedDataGrid (Flex 3), but I was not able to catch the event at all. private function changeToolTipPosition(event:ToolTipEvent):void { trace(TungChau::x= + ToolTipManager.currentToolTip.x); trace(TungChau::y= + ToolTipManager.currentToolTip.y); trace(TungChau::y1= + ToolTipManager.currentTarget.y); } controls:AdvancedDataGrid id=reportTable groupIconFunction=reportArchiveGroupingIcon groupLabelFunction=reportArchiveGroupingLabel dataTipFunction=generateReportDataTip initialize=myGroupingCollection.refresh() toolTipShow=changeToolTipPosition(event) width=100% height=100% ... /controls:AdvancedDataGrid When debugging the problem, I set a breakpoint inside changeToolTipPosition function and I was never able to reach the breakpoint. My AdvancedDataGrid has grouping by default. Regards, Tung Chau --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Alex Harui aharui@ wrote: Try tooltipshow in a custom renderer From: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com ] On Behalf Of hammer995 Sent: Thursday, October 18, 2007 8:19 AM To: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] dataTipFunction position in datagrid I have the following: mx:DataGridColumn headerText=Acct dataField=acct width=50 showDataTips=true dataTipFunction=fullAcctName/ The fullAcctName returns a string. Unfortunately, the string is displayed right over the cell you are hovering over to get the tooltip. Is there a way to give it an offset so it doesn't block the cell? Thanks!
[flexcoders] Re: dataTipFunction position in datagrid
In the API for AdvancedDataGridItemRenderer, there was no tooltipshow event defined. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Listen to renderer not control From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of tungchau81 Sent: Wednesday, December 05, 2007 5:42 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: dataTipFunction position in datagrid Hi Alex, I tried to listen to the tooltipshow event in AdvancedDataGrid (Flex 3), but I was not able to catch the event at all. private function changeToolTipPosition(event:ToolTipEvent):void { trace(TungChau::x= + ToolTipManager.currentToolTip.x); trace(TungChau::y= + ToolTipManager.currentToolTip.y); trace(TungChau::y1= + ToolTipManager.currentTarget.y); } controls:AdvancedDataGrid id=reportTable groupIconFunction=reportArchiveGroupingIcon groupLabelFunction=reportArchiveGroupingLabel dataTipFunction=generateReportDataTip initialize=myGroupingCollection.refresh() toolTipShow=changeToolTipPosition(event) width=100% height=100% ... /controls:AdvancedDataGrid When debugging the problem, I set a breakpoint inside changeToolTipPosition function and I was never able to reach the breakpoint. My AdvancedDataGrid has grouping by default. Regards, Tung Chau --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Alex Harui aharui@ wrote: Try tooltipshow in a custom renderer From: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com ] On Behalf Of hammer995 Sent: Thursday, October 18, 2007 8:19 AM To: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] dataTipFunction position in datagrid I have the following: mx:DataGridColumn headerText=Acct dataField=acct width=50 showDataTips=true dataTipFunction=fullAcctName/ The fullAcctName returns a string. Unfortunately, the string is displayed right over the cell you are hovering over to get the tooltip. Is there a way to give it an offset so it doesn't block the cell? Thanks!
[flexcoders] Re: dataTipFunction position in datagrid
Nevermind, I found the toolTipShowHandler function in AdvancedDataGridItemRenderer. --- In flexcoders@yahoogroups.com, tungchau81 [EMAIL PROTECTED] wrote: In the API for AdvancedDataGridItemRenderer, there was no tooltipshow event defined. --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote: Listen to renderer not control From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of tungchau81 Sent: Wednesday, December 05, 2007 5:42 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: dataTipFunction position in datagrid Hi Alex, I tried to listen to the tooltipshow event in AdvancedDataGrid (Flex 3), but I was not able to catch the event at all. private function changeToolTipPosition(event:ToolTipEvent):void { trace(TungChau::x= + ToolTipManager.currentToolTip.x); trace(TungChau::y= + ToolTipManager.currentToolTip.y); trace(TungChau::y1= + ToolTipManager.currentTarget.y); } controls:AdvancedDataGrid id=reportTable groupIconFunction=reportArchiveGroupingIcon groupLabelFunction=reportArchiveGroupingLabel dataTipFunction=generateReportDataTip initialize=myGroupingCollection.refresh() toolTipShow=changeToolTipPosition(event) width=100% height=100% ... /controls:AdvancedDataGrid When debugging the problem, I set a breakpoint inside changeToolTipPosition function and I was never able to reach the breakpoint. My AdvancedDataGrid has grouping by default. Regards, Tung Chau --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Alex Harui aharui@ wrote: Try tooltipshow in a custom renderer From: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com ] On Behalf Of hammer995 Sent: Thursday, October 18, 2007 8:19 AM To: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] dataTipFunction position in datagrid I have the following: mx:DataGridColumn headerText=Acct dataField=acct width=50 showDataTips=true dataTipFunction=fullAcctName/ The fullAcctName returns a string. Unfortunately, the string is displayed right over the cell you are hovering over to get the tooltip. Is there a way to give it an offset so it doesn't block the cell? Thanks!
[flexcoders] Re: AdvancedDataGrid::toolTip formatting
The full code is : private function myDataTip(data:Object):String { return BTung Chau/B; } controls:AdvancedDataGrid id=reportTable groupIconFunction=reportArchiveGroupingIcon defaultLeafIcon={Icons.ReportArchiveIcon} dataTipFunction=myDataTip initialize=gc.refresh(); width=100% height=100% controls:columns mx:AdvancedDataGridColumn id=nameCol dataField=name headerText={getString('label.reportName')} showDataTips=true minWidth=300/ mx:AdvancedDataGridColumn id=sDateCol dataField=startDate labelFunction=formatStartDate headerText={getString ('label.reportStartDate')} showDataTips=true width=100/ mx:AdvancedDataGridColumn id=eDateCol dataField=endDate labelFunction=formatEndDate headerText={getString ('label.reportEndDate')} showDataTips=true width=100/ mx:AdvancedDataGridColumn id=createdOnCol dataField=createdOn labelFunction=formatCreatedOnDate headerText={getString ('label.createdOn')} showDataTips=true width=100/ /controls:columns /controls:AdvancedDataGrid Please help. --- In flexcoders@yahoogroups.com, tungchau81 [EMAIL PROTECTED] wrote: Hi, I wrote my own custom dataTipFunction that return an HTML formatted text, but it does not work. Please help! private function myDataTip(data:Object):String { return BTung Chau/B; } The result I saw was a raw BTung Chau/B instead of the bold text format I want. Please help. Tung Chau
[flexcoders] Re: AdvancedDataGrid::toolTip formatting
Thanks alot for your suggestion. I will check it out. Regards, Tung Chau. --- In flexcoders@yahoogroups.com, tungchau81 [EMAIL PROTECTED] wrote: The full code is : private function myDataTip(data:Object):String { return BTung Chau/B; } controls:AdvancedDataGrid id=reportTable groupIconFunction=reportArchiveGroupingIcon defaultLeafIcon={Icons.ReportArchiveIcon} dataTipFunction=myDataTip initialize=gc.refresh(); width=100% height=100% controls:columns mx:AdvancedDataGridColumn id=nameCol dataField=name headerText={getString('label.reportName')} showDataTips=true minWidth=300/ mx:AdvancedDataGridColumn id=sDateCol dataField=startDate labelFunction=formatStartDate headerText={getString ('label.reportStartDate')} showDataTips=true width=100/ mx:AdvancedDataGridColumn id=eDateCol dataField=endDate labelFunction=formatEndDate headerText={getString ('label.reportEndDate')} showDataTips=true width=100/ mx:AdvancedDataGridColumn id=createdOnCol dataField=createdOn labelFunction=formatCreatedOnDate headerText={getString ('label.createdOn')} showDataTips=true width=100/ /controls:columns /controls:AdvancedDataGrid Please help. --- In flexcoders@yahoogroups.com, tungchau81 tungchau81@ wrote: Hi, I wrote my own custom dataTipFunction that return an HTML formatted text, but it does not work. Please help! private function myDataTip(data:Object):String { return BTung Chau/B; } The result I saw was a raw BTung Chau/B instead of the bold text format I want. Please help. Tung Chau
[flexcoders] Re: AdvancedDataGrid::toolTip formatting
The same thing for groupLabelFunction. Returned HTML text is not accepted. --- In flexcoders@yahoogroups.com, sreeni_r [EMAIL PROTECTED] wrote: Hi Tung, you can use the trick mentioned here http://www.flex-flex.net/blog/article.asp?id=18 to display html formatted strings as toolTips. -Sreenivas --- In flexcoders@yahoogroups.com, tungchau81 tungchau81@ wrote: Hi, I wrote my own custom dataTipFunction that return an HTML formatted text, but it does not work. Please help! private function myDataTip(data:Object):String { return BTung Chau/B; } The result I saw was a raw BTung Chau/B instead of the bold text format I want. Please help. Tung Chau
[flexcoders] Re: dataTipFunction position in datagrid
Hi Alex, I tried to listen to the tooltipshow event in AdvancedDataGrid(Flex 3), but I was not able to catch the event at all. private function changeToolTipPosition(event:ToolTipEvent):void { trace(TungChau::x= + ToolTipManager.currentToolTip.x); trace(TungChau::y= + ToolTipManager.currentToolTip.y); trace(TungChau::y1= + ToolTipManager.currentTarget.y); } controls:AdvancedDataGrid id=reportTable groupIconFunction=reportArchiveGroupingIcon groupLabelFunction=reportArchiveGroupingLabel dataTipFunction=generateReportDataTip initialize=myGroupingCollection.refresh() toolTipShow=changeToolTipPosition(event) width=100% height=100% ... /controls:AdvancedDataGrid When debugging the problem, I set a breakpoint inside changeToolTipPosition function and I was never able to reach the breakpoint. My AdvancedDataGrid has grouping by default. Regards, Tung Chau --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Try tooltipshow in a custom renderer From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of hammer995 Sent: Thursday, October 18, 2007 8:19 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] dataTipFunction position in datagrid I have the following: mx:DataGridColumn headerText=Acct dataField=acct width=50 showDataTips=true dataTipFunction=fullAcctName/ The fullAcctName returns a string. Unfortunately, the string is displayed right over the cell you are hovering over to get the tooltip. Is there a way to give it an offset so it doesn't block the cell? Thanks!
[flexcoders] Flex 3::AdvancedDataGrid::groupItemRenderer is for group or branch node only?
Hi, My AdvancedDataGrid has grouping collection set up during intialization.I tried to change the label's color of all group or branch nodes, but the color got applied to the labels of child nodes also. Is this a bug? controls:AdvancedDataGrid id=reportTable defaultLeafIcon={myLeftIcon} groupIconFunction=reportArchiveGroupingIcon dataTipFunction=generateReportDataTip initialize=gc.refresh(); width=100% height=100% controls:groupItemRenderer mx:Component mx:AdvancedDataGridGroupItemRenderer color=0xAAB3B3 / /mx:Component /controls:groupItemRenderer controls:dataProvider mx:GroupingCollection id=gc source={reportArchives} mx:grouping mx:Grouping id=grouping mx:GroupingField name={arrangeBySelection.selectedItem.data}/ /mx:Grouping /mx:grouping /mx:GroupingCollection /controls:dataProvider controls:columns mx:AdvancedDataGridColumn id=nameCol dataField=name headerText={getString('label.reportName')} showDataTips=true minWidth=300/ mx:AdvancedDataGridColumn id=sDateCol dataField=startDate labelFunction=formatStartDate headerText={getString('label.reportStartDate')} showDataTips=true width=100/ mx:AdvancedDataGridColumn id=eDateCol dataField=endDate labelFunction=formatEndDate headerText={getString ('label.reportEndDate')} showDataTips=true width=100/ mx:AdvancedDataGridColumn id=createdOnCol dataField=createdOn labelFunction=formatCreatedOnDate headerText={getString('label.createdOn')} showDataTips=true width=100/ ... /controls:AdvancedDataGrid Note: 0xAAB3B3 is a light grey color.
[flexcoders] Grouping in AdvancedDataGrid and MS OutLook's Arrange By Date
Hi, I need to use Grouping in AdvancedDataGrid to group data based on Date. However, the result showed the grouping in terms of day, hour, minute, second and this is not what I need. How do I group data that will appear exactly how MS OutLook does for Arrange By Date feature ? Any advice is greatly appreciated. All the emails in OutLook are organized into the following categories: Today, Yesterday, Last Week, Two Weeks Ago,etc. Thanks in advance, Tung Chau
[flexcoders] Flex 3 : : showDataTips in AdvancedDataGrid does not work any more after groupin
Hi, I set showDataTips = true in one of an AdvancedDataGridColumn and it works without grouping. As long as I use grouping and call refresh() function on a GroupingCollection instance, showDataTips does not work any more. I tried to set showDataTips = true after calling refresh() on a GroupingCollection instance, but this does not work. I really need to use showDataTips since my Name column' values are too long to be fully displayed in the table. Any help is greatly appreciated. Tung Chau
[flexcoders] Re: Grouping in AdvancedDataGrid and MS OutLook's Arrange By Date
Never mind. I think I found a solution. I simply need to create an additional field in my data model which returns a String of either Today, Yesterday, Last Week based on a result from Date comparison. Regards, Tung Chau --- In flexcoders@yahoogroups.com, tungchau81 [EMAIL PROTECTED] wrote: Hi, I need to use Grouping in AdvancedDataGrid to group data based on Date. However, the result showed the grouping in terms of day, hour, minute, second and this is not what I need. How do I group data that will appear exactly how MS OutLook does for Arrange By Date feature ? Any advice is greatly appreciated. All the emails in OutLook are organized into the following categories: Today, Yesterday, Last Week, Two Weeks Ago,etc. Thanks in advance, Tung Chau
[flexcoders] AdvancedDataGrid::toolTip formatting
Hi, I wrote my own custom dataTipFunction that return an HTML formatted text, but it does not work. Please help! private function myDataTip(data:Object):String { return BTung Chau/B; } The result I saw was a raw BTung Chau/B instead of the bold text format I want. Please help. Tung Chau
[flexcoders] Converting AS3 class into XML
Hi, I need to convert an AS3 class into XML based on all the public/private properties that the AS3 class has. However, I have not been able to find a way or any API that allow me traverse through all properties that a class has. This should be a generic way that can be applied to any AS3 class. I did look at the XMLTools.as file written by Michael J. Prichard. However, it seems to work with AS2 only. Any advice is greatly appreciated. Regards, Tung Chau
[flexcoders] HSlider and in-line Item Editor(Renderer)
Hi everybody, I wonder if it is possible to extend HSlider class and make it work as in-line Item Editor(Renderer). I love to use DataGrid and HSlider together, but currently HSlider does not implement IDataRenderer, IListItemRenderer, and IDropInListItemRenderer interfaces. It seems to me that making my CustomHSlider extend HSlider and implement the above 3 interfaces is not enough. There must be some more work to do in the background. Am I right? I simply want to know if anybody here has ever tried to do the same thing and whether it is possible at all to covert an HSlider to an in- line Item Renderer. Any advice is greatly appreciated, Tung Chau