Spark Datagrid on a mobile application, problem handling scrolling

I  have a spark datagrid on a mobile application, I set the
interactionMode="touch"
and the dataGrid scrolling is good, I got some problems adding a selectionChange eventListener to it, because scrolling the dataGrid will automatically change the selection and instead simply scrolling it, the function binded will start...
How can I prevent that?
<s:DataGrid id="lista"  top="350" bottom="50" right="0" left="0"
dataProvider="{listaPdv}"
verticalScrollPolicy="auto"
rowHeight="100"
selectionColor="#b64947"
skinClass="skins.dataGridSkin"
itemRenderer="components.dataGridItemRendererText"
fontFamily="Verdana"
fontSize="30"
interactionMode="touch"
horizontalScrollPolicy="auto"
selectionChange="datagrid_select(event)">
Help... It's really annoying and I cannot scroll the datagrid...

I solved using a workaround... instead of binding the selectionChange event, I binded the mouseDown and mouseUp then check the time between the two actions and if the time is less then a defined value the selectionChange event is dispatched...
<s:DataGrid id="grigliaData"
   sortableColumns="false"
   rowHeight="100"
   interactionMode="touch"
   mouseDown="grigliaData_mouseDownHandler(event)"
   mouseUp="grigliaData_mouseUpHandler(event)"
   top="230" left="5" right="5" bottom="50"
   dataProvider="{listaEventi}" width="100%" height="100%">
  //AS Code
        private var _lastClickEvent:int;
        protected function grigliaData_mouseDownHandler(event:MouseEvent):void
            _lastClickEvent = getTimer();
        protected function grigliaData_mouseUpHandler(event:MouseEvent):void
            if (getTimer() < _lastClickEvent + 200) // 200 = Dalay
                               // return selectedIndex

Similar Messages

  • Flex 4.5 problem using image in Mobile Application (Android)

    I have a problem using flex and mobile application...
    I have an image with path = "/mnt/sdcard/images/20120202172020990.jpg"
    Simply using
         <s:Image id="image" source="/mnt/sdcard/images/20120202172020990.jpg" />
    Get me an empty image on device, still using it on computer (desktop build / debug) it works fine...
    I have enabled every kind of permission in the app.xml
    Why I got this error?

    I actually solved the problem using:
    image.source = File.desktopDirectory.resolvePath(file_name).url;
    using instead this one it will work only under windows...
    image.source = File.desktopDirectory.resolvePath(file_name).nativePath;
    I don't know if it's a bug or whatelse, but I think that the source property of Image passing a filename that start with / (/ is root for unix based OS, android, linux, ios, etc), will take is as a relative path instead of complete path...

  • How to set a background image to fill the entire screen on any device in a spark mobile application

    Hi,
    I started developing a mobile application with Flex.
    I'm trying to set a background image to fill the whole screen. I've been stucked at this point for days now. I tried everything and no solution seems to work for me.
    I'm using a TabbedViewNavigatorApplication and i need to set some background images on views.
    I need my image to fill the entire screen on any device. i don't need to mantain image aspect ratio,  just need it to be fullscreen. This seemed to work when setting a custom skin on the TabbedViewNavigatorApplication, however this blocked all my views for some reason and all components contained in view became invisible.
    Can you please tell me how can i achieve this?
    Kind regards,
    Dan

    Basically you need a larger image which can accommodate any device. The trick is to show only what each device can display, so therefore some clipping will occur based on device. Have something centered and towards margins have a  gradient or just plane colors that way the stuff in the middle will be visible on every device while nobody will care if you are clipping from the color fill.
    C

  • Uninstalled itunes and tried to reinstall and the program gets to the services part and then tells me there is a problem with mobile application

    uninstalled itunes and when trying to re-install i get an error messages during the starting services part

    When I installed the Apple programs, mobile device application did not uninstall by itself. I had to go to c://program files/common files/apple/mobile device application (or something like that) and manually delete the contents and the folders. I have a 64 bit version so I also had to visit c://program files (x86)/common files/apple/mobile application device (or similar) and also manually delete the files and folders. I had to delete the files before I could delete the folders. This manual part is probably tripping everyone up, because it's not as easy as simply hitting uninstall in the control panel. But the instructions are there. I hope this helps you.

  • Problem handling popup is created on datagrid

    hi ~!
    I've been in trouble for a few days because of popup on
    datagrid.
    I made a grid in parent App and when clicking any row, the
    popup show.
    if i open and close once, it goes well however I open again
    and ERROR: #1010 occurs while closing popup.
    does anyone have any idea???
    Please make me escape from that Error message......

    error #1010
    at mx.controls::DataGrid/::commitEditedItemPosition()
    at
    mx.controls::DataGrid/mx.controls:DataGrid::updateDisplayList()
    at mx.core::UIComponent/validateDisplayList()
    at mx.managers::LayoutManager/::validateDisplayList()
    at mx.managers::LayoutManager/::doPhasedInstantiation()
    at Function/
    http://adobe.com/AS3/2006/builtin::apply()
    at mx.core::UIComponent/::callLaterDispatcher2()
    at mx.core::UIComponent/::callLaterDispatcher()
    this is parent Codes
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.managers.PopUpManager;
    import mx.core.IFlexDisplayObject;
    [Bindable]
    public var resultList:ArrayCollection = new ArrayCollection
    {jipockUnionResultNo:"sss",lineName:"aa",selectYN:"aaa"},
    {jipockUnionResultNo:"sss",lineName:"aa",selectYN:"aaa"},
    {jipockUnionResultNo:"sss",lineName:"aa",selectYN:"aaa"},
    {jipockUnionResultNo:"sss",lineName:"aa",selectYN:"aaa"},
    {jipockUnionResultNo:"sss",lineName:"aa",selectYN:"aaa"},
    {jipockUnionResultNo:"sss",lineName:"aa",selectYN:"aaa"},
    {jipockUnionResultNo:"sss",lineName:"aa",selectYN:"aaa"},
    {jipockUnionResultNo:"sss",lineName:"aa",selectYN:"aaa"}
    private function showLogin():void {
    var mf:MyLoginForm =
    MyLoginForm(PopUpManager.createPopUp(this, MyLoginForm,
    true));
    mf.selectedIdx = dgHeaderResult.selectedIndex;
    mf.mainApp = this;
    ]]>
    </mx:Script>
    <mx:VBox width="300" height="300">
    <mx:Button click="showLogin();" label="Login"/>
    <mx:DataGrid id="dgHeaderResult" width="40%"
    height="100%" editable="true"
    dataProvider="{resultList}" change="showLogin();">
    <mx:columns>
    <mx:DataGridColumn headerText="jipockUnionResultNo"
    dataField="jipockUnionResultNo" editable="false"/>
    <mx:DataGridColumn headerText="lineName"
    dataField="lineName" editable="false"/>
    <mx:DataGridColumn headerText="selectYN"
    dataField="selectYN" editable="false"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:VBox>
    </mx:Application>
    this is popup codes
    <?xml version="1.0" encoding="utf-8"?>
    <mx:TitleWindow xmlns:mx="
    http://www.adobe.com/2006/mxml"
    x="20" y="20" width="900" height="600"
    showCloseButton="true" close="removePop();" alpha="100">
    <mx:Script>
    <![CDATA[
    import mx.core.Application;
    import mx.events.CloseEvent;
    import mx.managers.PopUpManager;
    import mx.controls.Alert;
    [Bindable]
    public var selectedIdx:int;
    [Bindable]
    public var mainApp:Object;
    private function removePop():void {
    PopUpManager.removePopUp(this);
    ]]>
    </mx:Script>
    <mx:HBox width="100%">
    <mx:Button id="btnTest" click="{Alert.show('gg');}"
    label="test"/>
    </mx:HBox>
    </mx:TitleWindow>
    thanx for your intention ......

  • Air Launchpad 2.6 - mobile application - activate bug

    Hi,
    With AIR Launchpad 2.6 and a mobile application, when the application is desactivated then activated,
    all the elements for the list for the home view are duplicated.
    The home view uses viewActivate and the handler uses viewsAC.addItem.
    When the views is activated for a second time, all the elements are duplicated (by addItem)
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark" title="Home" viewActivate="view1_viewActivateHandler(event)">
        <fx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                import spark.events.ViewNavigatorEvent;
               [Bindable]
                protected var viewsAC:ArrayCollection = new ArrayCollection();
                protected function view1_viewActivateHandler(event:ViewNavigatorEvent):void
                    viewsAC.addItem({label:"Raw Camera", icon:fbIcon});
                    viewsAC.addItem({label:"Camera", icon:fbIcon});
                    viewsAC.addItem({label:"Camera Roll", icon:fbIcon});
                    viewsAC.addItem({label:"Geolocation/GPS", icon:fbIcon});
    Philippe

    After searching on internet and have hands on this problem, finally found the solution.
    SAMSUNG Galaxy Y S5360 has CPU 830 MHz ARMv6 and minimum requirement of minimum system requirements for AIR 3.3 Beta on Android :
    CPU: ARMv7 processor with Vector FPU, Minimum 550MHz, OpenGL ES2.0, H.264 & AAC H/W Decoders OS: Android 2.2, 2.3, 3.0, 3.1, 3.2 & 4.0 RAM: 256MB RAM
    Later I used a Motorola mobile handset with higher version my .apk file worked well.
    Click here For Samsung Galaxy Y S5360 Phone Specification
    thanks to everyone for your efforts.

  • Spark DataGrid Embedded Font Quandary

    01.  In everything that follows, I am talking about the latest [21328] version of the SDK, not that I believe that my problems have anything to do with that release, just so anyone interested and willing to help will know the version.
    02.  My application happens to be rooted in AIR's WindowedApplication, but again, I do not think that has any impact on my problems; I believe the same results would obtain for a Flex Application.
    03.  I have a custom renderer for the Spark DataGrid which extends DefaultGridItemRenderer.  It works fine. Its primary job is to change the font characteristics of each row in the list as a visual clue to the user as to the specific nature of the content that is accessible.  Some entries are just in the Regular font, some in Bold, some in Italic, and some in Bold-Italic.
    04.  I have, for most of the project, embedded the necessary fonts like this:
        [Embed (source="C:/Windows/Fonts/ArnoPro-Caption.otf", fontName="ArnoPro_BI_4",
            fontStyle="italic",
            fontWeight="bold",
            mimeType="application/x-font",
            embedAsCFF="true",
            unicodeRange="U+0021-U+00ff, U+20ac-U+20ac")]
        private const ArnoPro_BI_4:Class;
    As I said, that all works just as advertized.  But, that method of embedding carries the somewhat painful burden of slower compilations, so for the last 24 hours I have unseccessfully been trying to replace that with:
    [Embed (source = "../resources/assets/ArnoPro_BI_4.swf", symbol="ArnoPro_BI_4")]
    private const ArnoPro_BI_4:Class;
    where the swf file was produced via fontswf, using this incantation:
    fontswf -4 -u U+0021-U+00ff,U+20ac-U+20ac -b -i -a ArnoPro_BI_4 -o ArnoPro_BI_4.swf C:/Windows/Fonts/ArnoPro-Caption.otf
    06.  By all that is holy, the two different means of embedding the font ought to yield the same result, but they do not.  I have debugging code inserted to print out the list of fonts upon initiation of the application, and they are identical.  Both means of embedding do succeed in getting the embedded fonts into the .swf, but the attempt to use the fonts fails using the second approach.
    There is, of course, no change being made to the code in the item renderer which merely uses setStyle() to effect the row-by-row result.  The result in the second case is that the only style of the embedded font that renders is 'regular'.
    07.  I have used the 'keep-generated' facility to look at the code being generated by the mxmlc compiler and can see that different code is emitted, but it does not help me find a fix to the problem.  Both forms of the meta-tag do something; both methods of embedding seem to correctly register themselves with the FontManager, but only the method of embedding which actually performs the transcoding during compilation seems to result in a set of registered fronts which can be found and correctly used to render output based on the runtime setting of the font style.

    Thank for the reply
    I hoped that my posting indicated how the fonts in the the .swf file were constructed.  The "-4", argument to the command-line tool, fontswf, as far as I can tell, is the precise analog to the "embedAsCFF" argument in the [Embed] syntax.  That is what makes it so perplexing.  Given all the external documentation that is available for each tool/methodology, I would have thought that the resultant bytecodes, classes, flags, whatever, would have been identical.  The only difference would be the timing of when the transcoding took place.
    Since it is clearly more efficient to only transcode whatever set of fonts an application needs once, not once per build/test turn-around, I would really like to make the fontswf workflow work.  For those of us outside the beneficial environment of your licensed tools, the kindly-provided alternative to the facilities built into Flash Professional and/or Flash Builder give us the greatest degree of productivity.
    Whoever has access to the source code for Font [I can only see the uninteresting FontAsset in the SDK] can probably determine what difference might result from mxmlc working with this intermediate output, when inline transcoding is 'tagged':
    package
    import mx.core.FontAsset;
    [ExcludeClass]
    [Embed(fontName="ArnoPro_IT_4", _resolvedSource="C:/WINDOWS/Fonts/ArnoPro-ItalicCaption.otf", fontStyle="italic", _line="1189", _pathsep="true", embedAsCFF="true", fontWeight="normal", unicodeRange="U+0021-U+00ff, U+20ac-U+20ac", source="C:/Windows/Fonts/ArnoPro-ItalicCaption.otf", _column="2", exportSymbol="AIRZoom_ArnoPro_IT_4", _file="G:/FP/AIRZoom/src/AIRZoom_AS.as", mimeType="application/x-font")]
    public class AIRZoom_ArnoPro_IT_4 extends mx.core.FontAsset
        public function AIRZoom_ArnoPro_IT_4()
            super();
    versus this, when swf extraction is 'tagged':
    package
    import mx.core.FontAsset;
    [ExcludeClass]
    [Embed(fontName="ArnoPro_IT_4", _resolvedSource="C:/WINDOWS/Fonts/ArnoPro-ItalicCaption.otf", fontStyle="italic", _line="1191", _pathsep="true", embedAsCFF="true", fontWeight="normal", unicodeRange="U+0021-U+00ff, U+20ac-U+20ac", source="C:/Windows/Fonts/ArnoPro-ItalicCaption.otf", _column="2", exportSymbol="AIRZoom_ArnoPro_IT_4", _file="G:/FP/AIRZoom/src/AIRZoom_AS.as", mimeType="application/x-font")]
    public class AIRZoom_ArnoPro_IT_4 extends mx.core.FontAsset
        public function AIRZoom_ArnoPro_IT_4()
            super();
    The only difference is that value for '_line' which probably only indicates that one of the two processes has a comment or empty line somewhere.

  • Column stretch event in spark datagrid

    Hi everybody,
    These days I'm converting our Flex application from Flex 3 SDK to Flex 4.5 SDK (Hero).
    I've a problem with the spark datagrid, and more specifically, the events listening on the columns.
    How can we know that the columns in the spark datagrid are stretched or shrinked?
    In Flex 3, there was a DataGridEvent.COLUMN_STRETCH event on the datagrid and I can't find the equivalent in Flex 4.5.
    If you have any tips.... thanks!!!!

    When a GridColumn is interactively resized "widthChanged" events are dispatched because the column's width property is set.   To track the entire column separator press-drag-release gesture you can listen for GridEvent.SEPARATOR_MOUSE_DOWN,SEPARATOR_MOUSE_DRAG, etc..events on the DataGrid's columnHeaderGroup skin part.   If you wanted to change the way the interactive column resizing works you'd have to subclass DataGrid and override protected methods like separator_mouseDownHandler(event:GridEvent), separator_mouseDragHandler(event:GridEvent).
    - Hans

  • Flex Spark DataGrid BUG skipping rows on refresh

    I have a small one file example that demonstrates this Flex DataGrid bug.
    I tried to report it to Flex bugs and the page timed out.
    I am filling a column in a spark datagrid with checkboxes to select that row.
    In the header of that column is a checkbox to select ALL the rows.
    However, the middle row is not getting refreshed so the display is wrong.
    The checkbox looks empty when the backing value is correct.
    I have added a print to the code that sets the values in the data and it is setting everyone.
    But when I print the isSelected code it is NOT being called on ONE (the middle) visible row.
    If I move away or scroll up and down the check box shows the check mark.
    So My only conclusion is that refresh has a bug.
    Here is the example that demonstrates the problem.
    Simply select the header checkbox and the 3rd checkbox does not get updated on refresh.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                                     xmlns:s="library://ns.adobe.com/flex/spark"
                                     xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
              <fx:Script>
                        <![CDATA[
                                  import mx.collections.ArrayCollection;
                                  private static var values:Array = [
                                            {selected: false, position: 1},
                                            {selected: false, position: 2},
                                            {selected: false, position: 3},
                                            {selected: false, position: 4},
                                            {selected: false, position: 5}
                                  [Bindable]
                                  public static var datalist:ArrayCollection = new ArrayCollection( values );
                                  public static function updateDataList( value:Boolean ):void
                                            for each( var item:Object in datalist ) {
                                                      trace( "updated: " + item.position );
                                                      item.selected = value;
                                            datalist.refresh();
                        ]]>
              </fx:Script>
              <s:DataGrid dataProvider="{datalist}">
                        <s:columns>
                                  <s:ArrayList>
                                            <s:GridColumn dataField="position" width="200"/>
                                            <s:GridColumn width="34" >
                                                      <s:itemRenderer>
                                                                <fx:Component>
                                                                          <s:GridItemRenderer textAlign="center">
                                                                                    <fx:Script>
                                                                                              <![CDATA[
                                                                                                        private function changeSelection( data:Object, event:MouseEvent ):void
                                                                                                                  data.selected = ! data.selected;
                                                                                                        private function isSelected( data:Object ):Boolean
                                                                                                                  trace( "isSelected: " + data.position );
                                                                                                                  return data.selected;
                                                                                              ]]>
                                                                                    </fx:Script>
                                                                                    <s:layout>
                                                                                              <s:HorizontalLayout horizontalAlign="center" verticalAlign="middle"/>
                                                                                    </s:layout>
                                                                                    <s:CheckBox id="selbox" label="" selected="{isSelected(data)}"
                                                                                                                  click="changeSelection(data, event)"/>
                                                                          </s:GridItemRenderer>
                                                                </fx:Component>
                                                      </s:itemRenderer>
                                                      <s:headerRenderer>
                                                                <fx:Component>
                                                                          <s:GridItemRenderer height="30">
                                                                                    <fx:Script>
                                                                                              <![CDATA[
                                                                                                        [Bindable]
                                                                                                        private static var selectAll:Boolean = false;
                                                                                                        private function changeAllSelection( event:MouseEvent ):void
                                                                                                                  selectAll = ! selectAll;
                                                                                                                  Main.updateDataList( selectAll );
                                                                                              ]]>
                                                                                    </fx:Script>
                                                                                    <s:layout>
                                                                                              <s:VerticalLayout horizontalAlign="center" verticalAlign="middle"/>
                                                                                    </s:layout>
                                                                                    <s:CheckBox label="" selected="{selectAll}"
                                                                                                                  click="changeAllSelection(event)"/ >
                                                                          </s:GridItemRenderer>
                                                                </fx:Component>
                                                      </s:headerRenderer>
                                            </s:GridColumn>
                                  </s:ArrayList>
                        </s:columns>
              </s:DataGrid>
    </s:Application>
    Here is an image of the failed result... after selecting the top checkbox.
    Below is an image of the output produced by the two traces.
    Notice that the refresh has not called isSelected on the 3rd element.

    I have a small one file example that demonstrates this Flex DataGrid bug.
    I tried to report it to Flex bugs and the page timed out.
    I am filling a column in a spark datagrid with checkboxes to select that row.
    In the header of that column is a checkbox to select ALL the rows.
    However, the middle row is not getting refreshed so the display is wrong.
    The checkbox looks empty when the backing value is correct.
    I have added a print to the code that sets the values in the data and it is setting everyone.
    But when I print the isSelected code it is NOT being called on ONE (the middle) visible row.
    If I move away or scroll up and down the check box shows the check mark.
    So My only conclusion is that refresh has a bug.
    Here is the example that demonstrates the problem.
    Simply select the header checkbox and the 3rd checkbox does not get updated on refresh.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                                     xmlns:s="library://ns.adobe.com/flex/spark"
                                     xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
              <fx:Script>
                        <![CDATA[
                                  import mx.collections.ArrayCollection;
                                  private static var values:Array = [
                                            {selected: false, position: 1},
                                            {selected: false, position: 2},
                                            {selected: false, position: 3},
                                            {selected: false, position: 4},
                                            {selected: false, position: 5}
                                  [Bindable]
                                  public static var datalist:ArrayCollection = new ArrayCollection( values );
                                  public static function updateDataList( value:Boolean ):void
                                            for each( var item:Object in datalist ) {
                                                      trace( "updated: " + item.position );
                                                      item.selected = value;
                                            datalist.refresh();
                        ]]>
              </fx:Script>
              <s:DataGrid dataProvider="{datalist}">
                        <s:columns>
                                  <s:ArrayList>
                                            <s:GridColumn dataField="position" width="200"/>
                                            <s:GridColumn width="34" >
                                                      <s:itemRenderer>
                                                                <fx:Component>
                                                                          <s:GridItemRenderer textAlign="center">
                                                                                    <fx:Script>
                                                                                              <![CDATA[
                                                                                                        private function changeSelection( data:Object, event:MouseEvent ):void
                                                                                                                  data.selected = ! data.selected;
                                                                                                        private function isSelected( data:Object ):Boolean
                                                                                                                  trace( "isSelected: " + data.position );
                                                                                                                  return data.selected;
                                                                                              ]]>
                                                                                    </fx:Script>
                                                                                    <s:layout>
                                                                                              <s:HorizontalLayout horizontalAlign="center" verticalAlign="middle"/>
                                                                                    </s:layout>
                                                                                    <s:CheckBox id="selbox" label="" selected="{isSelected(data)}"
                                                                                                                  click="changeSelection(data, event)"/>
                                                                          </s:GridItemRenderer>
                                                                </fx:Component>
                                                      </s:itemRenderer>
                                                      <s:headerRenderer>
                                                                <fx:Component>
                                                                          <s:GridItemRenderer height="30">
                                                                                    <fx:Script>
                                                                                              <![CDATA[
                                                                                                        [Bindable]
                                                                                                        private static var selectAll:Boolean = false;
                                                                                                        private function changeAllSelection( event:MouseEvent ):void
                                                                                                                  selectAll = ! selectAll;
                                                                                                                  Main.updateDataList( selectAll );
                                                                                              ]]>
                                                                                    </fx:Script>
                                                                                    <s:layout>
                                                                                              <s:VerticalLayout horizontalAlign="center" verticalAlign="middle"/>
                                                                                    </s:layout>
                                                                                    <s:CheckBox label="" selected="{selectAll}"
                                                                                                                  click="changeAllSelection(event)"/ >
                                                                          </s:GridItemRenderer>
                                                                </fx:Component>
                                                      </s:headerRenderer>
                                            </s:GridColumn>
                                  </s:ArrayList>
                        </s:columns>
              </s:DataGrid>
    </s:Application>
    Here is an image of the failed result... after selecting the top checkbox.
    Below is an image of the output produced by the two traces.
    Notice that the refresh has not called isSelected on the 3rd element.

  • Spark DataGrid Issue

    I'm working with the new Spark DataGrid, and I understand it's still a work in progress. I've also created a bug in the Adobe bug system. However, I want to be sure that I'm not overlooking something.
    Here is an example that illustrates the issue. If I create an itemRenderer for a column in a dDtaGrid, it takes 2 clicks to trigger the click event and 3 clicks to trigger the doubleClick event, if you click on the column with the itemRenderer. This happens about 95% of the time. Occasionally, it works as expected, but that's a rarity. So the question is, am I doing something wrong in the use of itemRenderers.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application 
    xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="
    library://ns.adobe.com/flex/spark" xmlns:mx="
    library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
    <fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <fx:Script>
    <![CDATA[
    import mx.controls.Alert; 
    ]]>
    </fx:Script>
    <s:DataGrid x="33" y="57" requestedRowCount="4" textAlign="center" click="Alert.show('Clicked')">
    <s:columns>
    <s:ArrayList>
    <s:GridColumn dataField="dataField1" headerText="Name" width="75">
     <s:itemRenderer>
     <fx:Component>
     <s:GridItemRenderer>
     <s:Label text="{data.dataField1}" left="5" paddingTop="10" paddingBottom="5"/>  
    </s:GridItemRenderer>
     </fx:Component>
     </s:itemRenderer>
     </s:GridColumn>
     <s:GridColumn dataField="dataField2" headerText="Column2" width="75"/>
     <s:GridColumn dataField="dataField3" headerText="Column3" width="75"/>
     </s:ArrayList>
     </s:columns>
     <s:ArrayList>
     <fx:Object dataField1="John" dataField2="data1" dataField3="data1"></fx:Object>
     <fx:Object dataField1="Ryan" dataField2="data2" dataField3="data2"></fx:Object>
     <fx:Object dataField1="Kyle" dataField2="data3" dataField3="data3"></fx:Object>
     <fx:Object dataField1="Edward" dataField2="data4" dataField3="data4"></fx:Object>
     </s:ArrayList>
     </s:DataGrid></s:Application>

    I have approximately the same problem : I want to listen double click (doubleClick or gridDoubleClick) on a spark datagrid.
    The double click event is always dispatched when I double-click on a column whose item renderer is a textArea (even with doubleClickEnabled=false).
    The double click event is SOMETIMES dispatched when I double-click on a column whose item renderer is an image or a label :
    1. When I double-click for the first time on the label renderer : it gives focus to datagrid and select item but does not dispatch doubleClick
    2. When I double-click on the textArea colum, then on the Label column of the same row, doubleClick is well dispatched
    3. When I double-click on the textArea colum, then on the Label column of a different row, doubleClick is not dispatched
    4. when I double-click on the label column after double-clicking on another row in the Label column, doubleClick is well dispatched
    I think it's the same behaviour with simple click event.
    Do you think spark datagrid is not stable enough and we should use mx datagrid instead ?
    Here is the code :
    <s:DataGrid dataProvider="{arrayCollection}" doubleClickEnabled="true" doubleClick="trace(event)" gridDoubleClick="trace(event)">
            <s:columns>
                <s:ArrayList>
                    <s:GridColumn>
                        <s:itemRenderer>
                            <fx:Component>
                                <s:GridItemRenderer>
                                    <s:Label text="{data.label}"/>
                                </s:GridItemRenderer>
                            </fx:Component>
                        </s:itemRenderer>
                    </s:GridColumn>
                    <s:GridColumn>
                        <s:itemRenderer>
                            <fx:Component>
                                <s:GridItemRenderer>
                                    <s:TextArea text="{data.label}"/>
                                </s:GridItemRenderer>
                            </fx:Component>
                        </s:itemRenderer>
                    </s:GridColumn>
                </s:ArrayList>
            </s:columns>
        </s:DataGrid>

  • Module in mobile application

    I'm new to Mobile development but not to Flex development. Here I wanted to know if the Modular approach is available in Flex Mobile application. If not what could be the best way to handle such scenario. We are about to start new mobile project. It will be a product and will be delivered as SAS and hence, it will have client specific features.
    Any help here is much appreciated.

    short answer:
    Android support Module, iOS does not
    here is how to handle modules on Android:
    http://stackoverflow.com/questions/5483376/problem-loading-a-module-in-android-air-app
    note that "you need to compile the module with static-rsls=true in order to make the module work on an emulator or device"

  • Spark Datagrid - Show all rows using requestedRowCount & variableRowHeight=true

    I have a Spark Datagrid that has variableRowHeight=true. I also have the requestedRowCount set to the length of the dataProvider. So, in theory the rows shown should be the same number in the dataprovider(Arraycollection). However, the problem is that due to having variableRowHeight=true and some rows being multiline,  in some instances, all of the rows are not getting shown. 
    Suggestions on how I can fix this issue?
    Thanks, in advance.

    Does anyone have a solution for this? I have exactly the same problem.
    Datagrid with requestedRowCount="-1" and variableRowHeight="true"
    No issue with autoexpanding the grid - and no issue with autoexpanding the row height with word-wrapped text.
    But when combined - a grid that has 5 elements in dataprovider will only show 3 - if one row has been expanded to handle the word-wrapped data.
    Is it possible to count the rowheights and override the measure function with minheight or measuredminheight?
    Or do I need to call something other than invalidateDisplayList after dataprovider changes?
    Any suggestions or sample code would be welcomed.

  • How to make spark datagrid columns to behave like mx datagrid columns

    Hello.
    I have a problem with spark datagrid component. I can't force spark datagrid columns behave like old mx datagrid columns. In mx datagrid columns fills 100% of datagrid regardles of resizing column or datagrid itself (it will not show horizontal scrolling bar). In spark datagrid last column (colC) will never word wrap, event after setting horizontalScrollPolicy=off. I would like to somehow constrain spark columns to behave like mx ones.
    App snippet (try to resize app and columns - especially colC - and you will see what I mean):
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx">
        <fx:Declarations>
            <s:ArrayCollection id="dp">
                <s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
                <s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
                <s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
                <s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
                <s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
                <s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
                <s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
                <s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
                <s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
            </s:ArrayCollection>
        </fx:Declarations>
        <s:layout>
            <s:HorizontalLayout/>
        </s:layout>
        <s:DataGrid id="grid" width="100%" height="100%" dataProvider="{dp}" variableRowHeight="true" horizontalScrollPolicy="off">
            <s:columns>
                <s:ArrayList>
                    <s:GridColumn headerText="Column A" dataField="colA"/>
                    <s:GridColumn headerText="Column B" dataField="colB"/>
                    <s:GridColumn headerText="Column C" dataField="colC"/>
                </s:ArrayList>
            </s:columns>
        </s:DataGrid>
        <mx:DataGrid id="grid2" width="100%" height="100%" dataProvider="{dp}" wordWrap="true" variableRowHeight="true">
            <mx:columns>
                <mx:DataGridColumn headerText="Column A" dataField="colA"/>
                <mx:DataGridColumn headerText="Column B" dataField="colB"/>
                <mx:DataGridColumn headerText="Column C" dataField="colC"/>
            </mx:columns>
        </mx:DataGrid>
    </s:Application>

    the datagrid has sortItems and sortItemsOn methods you can use.

  • How do mobile applications help to increase your business conversion?

    We are launching a series of interviews with our IT engineers on the most contemporary and engaging subjects from the IT world.Today we interviewed Alexander Bogdanovich, the head of the mobile applications development department, XIM Wireless. Alexander embellished on the benefits of mobile applications for business, shared somesecrets on how to succeed with a mobile application, and explained whyit is profitable to develop exactly the cross platform applications.Please, tell us a bit about your experience. Why have you decided to throw in your lot with mobile development?A. B.: It’s pretty simple. The story begins with Flash development and development for social networks. Afterwards, along with the growth of the mobile applications market and with new platforms being introduced I considered it to be interesting and lucrative to...
    This topic first appeared in the Spiceworks Community

    Hello Bob,
    I really appreciate your input.  I hope the correct department finds your post useful as well.  Since I handle printer support, one thing I noticed while reading over this is perhaps a problem with your fax setup.  Are you still having problems and is there anything I can help you learn in regards to your new Officejet 8600?
    Here are a few links to help you with your new system.
    --Learn Windows 8 in 8 minutes (video)--
    --60 Windows 8 Tips, Tricks and Secrets--
    --CNET's Complete guide to using Windows 8 (roundup)--
    Lastly, here is a link to HP Printer Support on Youtube regarding your Officejet 8600.  If you have a question, just type it in the search bar on this page and hopefully there will be a video on it.
    --Officejet 8600 Overview--
    I am not in the business of trying to make money but rather providing the best help I can so that consumers like you can easily enjoy your product for years to come.
    If you have any questions about any of your HP products, you are welcome to ask me anything and I will do my best to assist you.
    Although I work for HP I speak for myself as well when I say "Thank you."
    Kind Regards,
    --Cass--  
    Don't forgot to say thanks by giving "Kudos" if I helped solve your problem.
    When a solution is found please mark the post that solves your issue.
    Every problem has a solution!

  • Mobile Connectivity Problem

    Hi
    In flex mobile application if connection error occured once this error will continue till application not restarted 
    I am Testing my application ,which is internet connection dependent ,so i tried to disable connection when application is on,  connection error occured  till that it is ok but if i again start connection application is not able to detect connection it shows connection error
        after i restart application it shows connection available
    this coonection is display from the fau;lt handler of webservice operation
    so is it any flex bug or programming problem ???
    i am using Dell Streak --android 2.2.2

    Could be a number of things... The order of debugging for me is generally:
    Double check code in Flex app
    Check permissions on the server for the web service (if applicable)
    Check functionality of the web service outside of flex via the browser
    Check connectivity of the device to the net
    Check permissions is the app descriptor file (for android remember: <uses-permission android:name="android.permission.INTERNET"/> )
    Triple check code in Flex app

Maybe you are looking for

  • AVI to DVD

    Issue: No tool seems to convert the Tina avi-file in the right way. My goal is to soon cool down and burn that avi to a DVD and watch it smoothly on the telly. Yes, the Philips DVP5500S-player deals with MPEG2, MPEG1 and MPEG4. The footage is done in

  • Lightroom 2 Book(s) recommendations?

    I'm looking for one or two Lightroom 2 books. First I'm looking for a book (or even website) that provides a rock solid (fast, fast, fast) workflow. I'm reasonably proficient in Lightroom 1 - but am finding I have ever shrinking quantities of time to

  • Private access

    I have a abstract class Point with one field : xValue declared as private. I defined a getXvalue() method then I made a subclass of point with a new field yValue my getXvalue() methaod looks as follows: public double getXvalue() { return this.xValue;

  • Setup Proxy on Safari

    I am having problems setting up a proxy on my Mac. I use this proxy to get on secure pages. I know how to set this proxy up on my Windows machine. Here is how I do it on my Windows machine. First I open up internet options in control panel. Then I cl

  • No Adapter Metadata when trying to creating communication channel.

    Hi experts, I am using a new setup of Netweaver 2004S - PI 7.0. I created a communication channel (File Sender). When I tried to define the Adapter Type, there is no Adapter Metadata to pick from pop up window! I've read other threads and they sugges