Re: [flexcoders] Re: ItemDoubleClick ListEvent not fired even with doubleClickEnabled = true
have you set doubleclikenabled to true ??? --- Akshar Kaul --- On Tue, Sep 7, 2010 at 18:44, carnau...@ymail.com carnau...@ymail.comwrote: Hello, Does anyone know any work-arround for this ItemDoubleClick *not fired*... issue ? I've noticed a similar post, for the same issue, here : http://raghuonflex.wordpress.com/2007/08/10/assigning-different-behaviors-on-click-doubleclick/#comment-5350 Any help on this item being very appreciated, With thanks, Regards. --- In flexcoders@yahoogroups.com, carnau...@... carnau...@... wrote: Hello, I'm facing an issue with the itemDoubleClick event that is most of the time... not fired/received through my WindowedApplication. Please fing here-after my MXML code together with my AS listener : within the ListPressed constructor, the doubleClickEnabled property is set to TRUE ! I also tried the same by setting doubleClickEnabled within the MXML below with no success : doubleClickEnabled=true. Did anyone already met this Problem ? Is there maybe a Workarroud that we can apply ? With Thanks, Regards. // My List DOUBLE CLICL Listener private function handleDoubleClickZoneC(event:ListEvent):void { // THIS TRACE IS DUMPED ONLY SOMETIMES (~ once over 5...10 times) trace(ViewManager/handleDoubleClickZoneC()); } // My MXML AIR application ?xml version=1.0 encoding=utf-8? mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:component=component.* horizontalScrollPolicy=off verticalScrollPolicy=off showGripper=false showStatusBar=false showTitleBar=true width=346 height=170 explicitHeight=170 headerHeight=16 borderThickness=2 layout=absolute creationComplete=init() component:ListPressed id=zoneC_call x=0 y=130 width=342 height=10 select=handleLeftButtonPressed() change=handleClickZoneC(event) itemDoubleClick=handleDoubleClickZoneC(event) dataProvider={callModel.provider} component:itemRenderer mx:Component mx:VBox borderSides=bottom borderStyle=solid borderThickness=1 verticalGap=0 mx:Canvas width=100% mx:Label x=6 maxWidth=200 styleName=itemContact text={data.fullName}/ mx:Label x=210 styleName=itemLabel text={data.day}/ component:ImageDetails x=300/ /mx:Canvas mx:Canvas width=100% mx:Image x=6 width=90% height=90% source={data.type}/ mx:Label x=28 text={data.number}/ mx:Label x=210 text={data.duration}/ /mx:Canvas /mx:VBox /mx:Component /component:itemRenderer /component:ListPressed ... ...
Re: [flexcoders] Constraining one components location to another component
you can use states. or try using Hbox and Vbox.. --- Akshar Kaul --- On Fri, Aug 27, 2010 at 19:46, Haykel BEN JEMIA hayke...@gmail.com wrote: Hi, I think the best way is to create a new component that will hold the image and the floating components and handle visibility of these components through states. Example: ?xml version=1.0 encoding=utf-8? s:Group xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx s:states s:State name=normal / s:State name=loading / s:State name=error / /s:states fx:Script ![CDATA[ [Bindable] public var source:Object; ]] /fx:Script mx:Image id=image source={source} complete={currentState = 'normal'} progress={currentState = 'loading'} ioError={currentState = 'error'} / s:Label top=0 right=0 text=Loading... includeIn=loading / s:Label top=0 right=0 text=Error! includeIn=error / /s:Group Of course you can put any states you like and also set states from outside with : mainImage.currentState = . Hope this helps, Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Thu, Aug 26, 2010 at 9:50 PM, dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.com wrote: Is there a way to constrain one component to another component? I've looked at constraint rows and constrain columns in the past but I haven't got it to work myself. IE, Group id=imageContainer width=500 height=500 Image id=mainImage width=100 height=100 verticalCenter=0 horizontalCenter=0/ /Group Image source=download.jpg toolTip=Download this image right=[Right edge of main image] top=[Top edge of main image]/ In this example the download icon would float in the upper right corner of the image component as the image component floats in the middle of the container it is in. FYI In this project there are additional components that will float relative to the location and size of the image as well. JP
Re: [flexcoders] Push verse Poll in Flash Player
you can use any of the following two approaches:- 1) create a timer and set it to fire at required interval. when the timer fires then you can query the backend. 2) make the back end push data to client. in this case back end will know when the data has changed and it will push data only when necessary. however for this thing you will need to have blazeds or lcds at the backend. check the corresponding developer manuals for more details on how to do it. Akshar Kaul On Thu, Aug 12, 2010 at 13:57, dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.com wrote: correct On Wed, Aug 11, 2010 at 11:40 PM, Akshar Kaul akshar.k...@gmail.comwrote: what kind of notifictions do you want. i guess you want to query your backend every 30 or 60 seconds.. Akshar Kaul On Thu, Aug 12, 2010 at 05:46, dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.com wrote: Is there a way to get notifications on a regular interval for Flash applications? Any and all suggestions about push vs pull vs poll vs etc. We would be checking every 30 seconds to 60 seconds. JP
Re: [flexcoders] Push verse Poll in Flash Player
what kind of notifictions do you want. i guess you want to query your backend every 30 or 60 seconds.. Akshar Kaul On Thu, Aug 12, 2010 at 05:46, dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.com wrote: Is there a way to get notifications on a regular interval for Flash applications? Any and all suggestions about push vs pull vs poll vs etc. We would be checking every 30 seconds to 60 seconds. JP
Re: [flexcoders] After importing file using FileReference focus is lost
you can listen to the completion event of the filereference and then set the focus to whatever component you want. Akshar Kaul On Tue, Aug 10, 2010 at 11:13, chinaloveshisiling chinaloveshisil...@yahoo.com wrote: When using the keyboard to navigate the UI, focus is lost after importing file using FileReference. Who know how to deal with this issue? Thanks.
Re: [flexcoders] Re: After importing file using FileReference focus is lost
try importButton.setFocus(); Akshar Kaul On Tue, Aug 10, 2010 at 11:42, chinaloveshisiling chinaloveshisil...@yahoo.com wrote: Thanks Akshar, I had tried use the method you mentioned. Call focusManager.setFocus(importButton); in the function handle for the completion event. But there is no effect. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Akshar Kaul akshar.k...@... wrote: you can listen to the completion event of the filereference and then set the focus to whatever component you want. Akshar Kaul On Tue, Aug 10, 2010 at 11:13, chinaloveshisiling chinaloveshisil...@... wrote: When using the keyboard to navigate the UI, focus is lost after importing file using FileReference. Who know how to deal with this issue? Thanks.
Re: [flexcoders] Re: After importing file using FileReference focus is lost
can you share your code. Akshar Kaul On Tue, Aug 10, 2010 at 13:11, chinaloveshisiling chinaloveshisil...@yahoo.com wrote: Tried. Still no effect. And other ideas? :-) --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Akshar Kaul akshar.k...@... wrote: try importButton.setFocus(); Akshar Kaul On Tue, Aug 10, 2010 at 11:42, chinaloveshisiling chinaloveshisil...@... wrote: Thanks Akshar, I had tried use the method you mentioned. Call focusManager.setFocus(importButton); in the function handle for the completion event. But there is no effect. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.comflexcoders% 40yahoogroups.com, Akshar Kaul akshar.kaul@ wrote: you can listen to the completion event of the filereference and then set the focus to whatever component you want. Akshar Kaul On Tue, Aug 10, 2010 at 11:13, chinaloveshisiling chinaloveshisiling@ wrote: When using the keyboard to navigate the UI, focus is lost after importing file using FileReference. Who know how to deal with this issue? Thanks.
Re: [flexcoders] Reload an application
why do you want to reload the whole application. you can just write a method at the application level to reset the application to the initial state. Akshar Kaul On Fri, Jul 23, 2010 at 14:11, claudiu ursica the_bran...@yahoo.com wrote: Make a javascript call through external innterface telling the browser to reload the whole html page. That will include reloading the flex app also. C -- *From:* Christophe christophe_jacque...@yahoo.fr *To:* flexcoders@yahoogroups.com *Sent:* Fri, July 23, 2010 10:27:45 AM *Subject:* [flexcoders] Reload an application Hello, How to reload a flex application from a click on a button on the application interface ? Thank you, Christophe,
Re: [flexcoders] Re: datagrid checkbox selection
i guess using the folowing renderer you can achieve you thing. mx:itemRenderer mx:Component mx:HBox horizontalScrollPolicy=off horizontalAlign=center mx:RadioButton selected={data.m_bSelected}/ /mx:HBox /mx:Component /mx:itemRenderer Akshar Kaul On Thu, Jul 1, 2010 at 16:15, sunfast_kid em...@richardcraig.info wrote: Thanks Akshar, but don't I need a click event on the checkbox to update the dataprovider? The problem is adding a click event to a dynamic checkbox in the datagrid. Richard --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Akshar Kaul akshar.k...@... wrote: add a boolean field to the data provider and link it to the check box. when you want to find out which rows are selected you can iterate over the data provider and check this boolean field. Akshar Kaul On Wed, Jun 30, 2010 at 19:39, sunfast_kid em...@... wrote: Hi I have a flex/php program that gets report data from a database with php in xml format and the flex/air frontend displays the data in a datagrid. Different reports can return different columns which are passed to the frontend along with the results. I then use the xml list of columns to create the datagrid. I use this code to add the columns... var dgc:DataGridColumn; var cols:Array = new Array(); var cb:ClassFactory = new ClassFactory(mx.controls.CheckBox); cb.properties = {selected: true}; dgc = new DataGridColumn(); dgc.width = 10; dgc.itemRenderer = cb; cols.push(dgc); for (var i:int = 0; ievent.result.dataSet.columns.column.length; i++) { dgc = new DataGridColumn(event.result.dataSet.columns.column[i].display); dgc.dataField = event.result.dataSet.columns.column[i].field; dgc.width = event.result.dataSet.columns.column[i].width; cols.push(dgc); } resultGrid.columns = cols; I want to be able to choose rows using a checkbox. I can add a column with the checkbox fine, but the normal route would be to link the checkbox to the dataprovider. The problem is, I can't figure out how to add a click event to the dynamic checkbox, nor can I iterate through the datagrid itself to find the state of the checkbox. Can anybody help with any suggestions? TIA
Re: [flexcoders] datagrid checkbox selection
add a boolean field to the data provider and link it to the check box. when you want to find out which rows are selected you can iterate over the data provider and check this boolean field. Akshar Kaul On Wed, Jun 30, 2010 at 19:39, sunfast_kid em...@richardcraig.info wrote: Hi I have a flex/php program that gets report data from a database with php in xml format and the flex/air frontend displays the data in a datagrid. Different reports can return different columns which are passed to the frontend along with the results. I then use the xml list of columns to create the datagrid. I use this code to add the columns... var dgc:DataGridColumn; var cols:Array = new Array(); var cb:ClassFactory = new ClassFactory(mx.controls.CheckBox); cb.properties = {selected: true}; dgc = new DataGridColumn(); dgc.width = 10; dgc.itemRenderer = cb; cols.push(dgc); for (var i:int = 0; ievent.result.dataSet.columns.column.length; i++) { dgc = new DataGridColumn(event.result.dataSet.columns.column[i].display); dgc.dataField = event.result.dataSet.columns.column[i].field; dgc.width = event.result.dataSet.columns.column[i].width; cols.push(dgc); } resultGrid.columns = cols; I want to be able to choose rows using a checkbox. I can add a column with the checkbox fine, but the normal route would be to link the checkbox to the dataprovider. The problem is, I can't figure out how to add a click event to the dynamic checkbox, nor can I iterate through the datagrid itself to find the state of the checkbox. Can anybody help with any suggestions? TIA
Re: [flexcoders] RadioButton as DataGrid item editor
can you share the code. Akshar Kaul On Thu, Jun 24, 2010 at 01:26, Dave Glasser dglas...@pobox.com wrote: It seems like it should be simple, but it's a nightmare. I'm using Flex 3.3. The items in my dataProvider have a Boolean property. I want only 1 item to have this property set to true, and all others set to false. So I use a RadioButton as the renderer and editor. Although the items initially only have 1 with the property set to true, all of the radio buttons initially appear as false. When I select one, the currently selected one deselects, as you would expect, but the setter on my item is never called. When I use a CheckBox instead of a RadioButton, it works as expected, without the exclusivity. I would be happy if I could get the RadioButton to behave like a checkbox, and implement the exclusivity myself, but that's been an exercise in futility. Is what I'm trying to do possible? Am I missing something?
Re: [flexcoders] load CSV from Flex?
you want to read from local file system ??? Akshar Kaul On Mon, Jun 14, 2010 at 22:24, markflex2007 markflex2...@yahoo.com wrote: Hi, Do you think if it is possible I can read csv file from Flex without side server language? Using HttpServer or other? Thanks Mark
Re: [flexcoders] Re: Comobox/DataGrid does not display data
can you share the whole code or some sample code. Akshar Kaul On Tue, Jun 1, 2010 at 22:31, md_ars mdar...@gmail.com wrote: Thanks Ashkar for the reply, I had already tried but it didn't work --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Akshar Kaul akshar.k...@... wrote: try using formType.refresh() after you modify your array collection. Akshar Kaul On Sat, May 29, 2010 at 03:49, md_ars mdar...@... wrote: I have a Combobox and its dataprovide is an ArrayCollection(formType) which is being populate from XMLLIst(formXMLListB) as given below public function getForms(vForm:Object):void { formXMLListB = vForm.mtResult.tuples.item.tuple; // resultFormat=e4x var i:int = 0; formType.removeAll(); for(i=0; iformXMLListB.length(); i++) { if (formXMLListB[i].item..stringValue[2] == 'FORM_TYPE'){ formType.addItem({label:formXMLListB[i].item.stringValue[0].toString(), data:formXMLListB[i].item.stringValue[1].toString() } ); } } For some reason combobox is not populate eventhough I can see the data in dataprovider when run with debugger. The formType is [Bindable] variable. mx:ComboBox id=frmType x=258 y=124 dataProvider={formType} labelField=label width=281 / It works fine when I define a dataprovider with static values. Any suggestions? Thanks Arshad
Re: [flexcoders] Re: Showing tooltip on the line
i got a solution to this problem. Make few changes in the drawtheline component. Code : ?xml version=1.0 encoding=utf-8? mx:Box xmlns:mx=http://www.adobe.com/2006/mxmlhttp://www.google.com/url?sa=Dq=http://www.adobe.com/2006/mxmlusg=AFQjCNEtcLsIWFCjy8rhxFxIJ8W2RHUpyw width=400 height=300 creationComplete=createLine() borderColor=#00FF00 borderStyle=solid mouseMove=findTarget(event) mx:Script ![CDATA[ *import* mx.core.UIComponent; *import* mx.controls.Alert; *private* *function* findTarget(event:MouseEvent):*void*{ *if* (event.target.name == *uiTest*) *this*.toolTip=*this tooltip is coming only for the line*; *else * *this*.toolTip = **; } *private* *function* createLine():*void*{ *var* g:Shape = *new* Shape(); g.graphics.lineStyle(2, 0xFF, .75); g.graphics.moveTo(0,0); g.graphics.lineTo(400,300); g.name = *line*; *this*.uiComp.addChild(g); } ]] /mx:Script mx:UIComponent id=uiComp name=uiTest/ /mx:Box Noe you can see the tool tip only for the line, not for the component :) Akshar Kaul On Wed, Jun 2, 2010 at 12:23, Akshar Kaul akshar.k...@gmail.com wrote: i am creating the line using graphics methods. i dont think they support event listeners. Akshar Kaul On Tue, Jun 1, 2010 at 19:09, valdhor valdhorli...@embarqmail.com wrote: If it were me, I would create a custom tooltip; add a mouseover event listener to your line; check the color directly under the mouse pointer and show the tooltip. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, akshar akshar.k...@... wrote: i have a line in my application. i require that a tooltip should come only on the line. The line is in a custom component. when i add the tooltip to the component it shows the tooltip for whole of the component. is there a way to show the tooltip only for the line. here is a sample which i am trying :- main application file:- ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute width=100% height=100% xmlns:local=* local:drawtheline/ /mx:Application drawtheline component :- ?xml version=1.0 encoding=utf-8? mx:Box xmlns:mx=http://www.adobe.com/2006/mxml; width=400 height=300 creationComplete=createLine() toolTip=this tooltip should come only on the line borderColor=#00FF00 borderStyle=solid mx:Script ![CDATA[ import mx.core.UIComponent; private function createLine():void { var g:Shape = new Shape(); g.graphics.lineStyle(2, 0xFF, .75); g.graphics.moveTo(0,0); g.graphics.lineTo(400,300); this.rawChildren.addChild(g); } ]] /mx:Script /mx:Box
Re: [flexcoders] Re: Showing tooltip on the line
i am creating the line using graphics methods. i dont think they support event listeners. Akshar Kaul On Tue, Jun 1, 2010 at 19:09, valdhor valdhorli...@embarqmail.com wrote: If it were me, I would create a custom tooltip; add a mouseover event listener to your line; check the color directly under the mouse pointer and show the tooltip. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, akshar akshar.k...@... wrote: i have a line in my application. i require that a tooltip should come only on the line. The line is in a custom component. when i add the tooltip to the component it shows the tooltip for whole of the component. is there a way to show the tooltip only for the line. here is a sample which i am trying :- main application file:- ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute width=100% height=100% xmlns:local=* local:drawtheline/ /mx:Application drawtheline component :- ?xml version=1.0 encoding=utf-8? mx:Box xmlns:mx=http://www.adobe.com/2006/mxml; width=400 height=300 creationComplete=createLine() toolTip=this tooltip should come only on the line borderColor=#00FF00 borderStyle=solid mx:Script ![CDATA[ import mx.core.UIComponent; private function createLine():void { var g:Shape = new Shape(); g.graphics.lineStyle(2, 0xFF, .75); g.graphics.moveTo(0,0); g.graphics.lineTo(400,300); this.rawChildren.addChild(g); } ]] /mx:Script /mx:Box
Re: [flexcoders] Comobox/DataGrid does not display data
try using formType.refresh() after you modify your array collection. Akshar Kaul On Sat, May 29, 2010 at 03:49, md_ars mdar...@gmail.com wrote: I have a Combobox and its dataprovide is an ArrayCollection(formType) which is being populate from XMLLIst(formXMLListB) as given below public function getForms(vForm:Object):void { formXMLListB = vForm.mtResult.tuples.item.tuple; // resultFormat=e4x var i:int = 0; formType.removeAll(); for(i=0; iformXMLListB.length(); i++) { if (formXMLListB[i].item..stringValue[2] == 'FORM_TYPE'){ formType.addItem({label:formXMLListB[i].item.stringValue[0].toString(), data:formXMLListB[i].item.stringValue[1].toString() } ); } } For some reason combobox is not populate eventhough I can see the data in dataprovider when run with debugger. The formType is [Bindable] variable. mx:ComboBox id=frmType x=258 y=124 dataProvider={formType} labelField=label width=281 / It works fine when I define a dataprovider with static values. Any suggestions? Thanks Arshad
Re: [flexcoders] Changing the dataProvider for a ComboBox doesn't seem to work properly
use arraycollection as the dataprovider. also set [Bindable] tag before the variables. Akshar Kaul On Fri, May 28, 2010 at 15:18, Nick Middleweek n...@middleweek.co.ukwrote: Hi, I have a ComboBox with it's dataProvider set to an Array( =, , , ); If a TextInput is changed, I want to change (or update) the ComboBox dataProvider to use this Array( =, ); And if that TextInput is blank (), then I want to switch it back to Array( =, , , ); I've tried declaring two private var arrays and switching the ComboBox.dataProvider on the change event of the TextInput but strange things happening and it seems the dataProvider isn't refreshed properly until I clicked on the ComboBox and select an item. I've tried using validateNow. Is this a bug or am I doing something wrong? Thanks, Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, blog: http://blog.middleweek.co.uk } );
Re: [flexcoders] TileList Itemrenderer's TextInput focus problem on keyboard Tab key
use tabindex property to set the order in which you want to set the focus using tab key... Akshar Kaul On Fri, May 14, 2010 at 11:04, Nilesh pawarnil...@yahoo.com wrote: Hello Members, I am facing problem with textinput focus on keyboard Tab key. Is there any way to get focus on next fields through keyboard Tab key? Here is sample code of my example - /* test.mxml */ ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; initialize=init() layout=vertical mx:Script ![CDATA[ import myItemRenderer; private var tempSelArray:Array=[ {label: I am CommonText, inputType:CommonText}, {label: I am InputText 01, inputType:CommonText}, {label: I am TextArea 01, inputType:AreaText}, {label: I am InputText 02, inputType:CommonText}, {label: I am TextArea 02, inputType:AreaText}, {label: I am TextArea 03, inputType:AreaText}, {label: I am InputText 03, inputType:CommonText},{label: I am InputText 04, inputType:CommonText} ]; private function init():void{ addedFields.dataProvider = tempSelArray; addedFields.itemRenderer = new ClassFactory(myItemRenderer); } ]] /mx:Script mx:VBox width=100% height=100% mx:TileList id=addedFields height=400 verticalScrollPolicy=off rollOverColor=0xff selectionColor=0xff columnCount=1 columnWidth={this.width-100} rowHeight=50 width=100% / /mx:VBox /mx:Application /* myItemRenderer.mxml */ ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; implements=mx.managers.IFocusManagerComponent width=100% mx:Script ![CDATA[ import mx.containers.HBox; import mx.controls.Label; import mx.controls.TextArea; import mx.controls.TextInput; private var textField:TextInput = new TextInput(); private var textArea:TextArea = new TextArea(); private var textLabel:Label = new Label(); private var hb:HBox = new HBox(); override public function set data(value:Object):void { if(value != null) { super.data = value; textLabel.setStyle(color,0x00); textField.setStyle(color,0x00); textArea.setStyle(color,0x00); switch(data.inputType){ case(CommonText):{ textLabel.text = data.label + :; // Create inputtextField and add to this hb.addChild(textLabel); hb.addChild(textField); this.addChild(hb); } break; case(AreaText):{ textLabel.text = data.label + :; // Create inputtextArea and add to this hb.addChild(textLabel); hb.addChild(textArea); this.addChild(hb); } break; } } } ]] /mx:Script /mx:Canvas
Re: [flexcoders] Logout question
for capturing that you will need to use javascript. Akshar Kaul On Wed, May 12, 2010 at 14:58, Christophe christophe_jacque...@yahoo.frwrote: Hello, How to know if a user on a flex application is logout. Because the logout is not always made with the logout button, he can close the explorer. Thank you, Christophe,
Re: [flexcoders] What's your favorite automated testing tools?
try QTP(quick test pro). Akshar Kaul On Wed, May 5, 2010 at 02:09, ssekiguchi ssekigu...@comcast.net wrote: I've got a project where I need to build automated UI tests for the app we're building. Any suggestions on which tool is the best?