What's the right way to add a swipe handler to a DataGrid?

H All:
What’s the right way to add a swipe handler to a DataGrid?
(Target = Android, AIR using Flash IDE)
Adding a handler to the DataGrid works; but (as expected) it only works on  the datagrid itself. Like if you swipe on the background before rows are fully  added. Adding columns over the datagrid, prevents the datagrids’ swipe handler  from firing.
Trying to add a swipe hander to the columns themselves, results in the  below error.
//  Below code fails with
//  1061: Call to a possibly undefined method addEventListener through a reference with static type
//   fl.controls.dataGridClasses:DataGridColumn.  So ... DataGridColumn doesn’t support addEventListener...
There must be a better way(?).
Thanks
            import fl.controls.DataGrid;
            import fl.controls.dataGridClasses.DataGridColumn;
           // Works, but only on the grid itself; as when the rows do not  fill the space tor the datagrid.
            myDataGrid.addEventListener  (TransformGestureEvent.GESTURE_SWIPE, swipeGridHandler);
            var c1:DataGridColumn = new DataGridColumn("Notes"); 
            c1.width = 90;
            c1.cellRenderer = CenterAlignCell;
            c1.addEventListener (TransformGestureEvent.GESTURE_SWIPE,  swipeGridHandler);

Adobe list of properties and methods:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/dataGridCla sses/DataGridColumn.html

Similar Messages

  • What is the easiest way to add a slide show to a dream weaver page?

    What is the easiest way to add a slide show to a dream weaver page?

    Copy & paste the following code into a new, blank document.  Change images to your own.  SaveAs test.html and preview in browsers. 
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5 with Cycle2</title>
    <!--help for older IE browsers-->
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <!--Latest jQuery Core Library-->
    <script src="http://code.jquery.com/jquery-latest.min.js">
    </script>
    <!--Cycle2 Slideshow Plugin-->
    <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery.cycle2/20130409/jquery.cycle2.min.js"></script>
    <style>
    /**Slideshow**/
    .cycle-slideshow {
        position: relative;
        z-index: 1;
        width: 400px; /**adjust width as required**/
        margin:75px auto;
        text-align: center;
    .cycle-slideshow img { max-width: 100% }
    /* prev / next links */
    .cycle-prev, .cycle-next {
        position: absolute;
        top: 0;
        width: 20%;
        opacity: 0;
        filter: alpha(opacity=0);
        z-index: 800;
        height: 100%;
        cursor: pointer;
    .cycle-prev {
        left: 0;
        background: url(http://malsup.github.com/images/left.png) 50% 50% no-repeat;
    .cycle-next {
        right: 0;
        background: url(http://malsup.github.com/images/right.png) 50% 50% no-repeat;
    .cycle-prev:hover, .cycle-next:hover {
        opacity: .7;
        filter: alpha(opacity=70)
    /**END SLIDESHOW STYLES**/
    </style>
    </head>
    <body>
    <h1><a href="http://jquery.malsup.com/cycle2/">JQuery Cycle2</a></h1>
    <!--begin slideshow-->
    <div class="cycle-slideshow"
        data-cycle-fx="fade"
        data-cycle-timeOut="2000"
        >
    <!-- prev/next links -->
    <div class="cycle-prev"></div>
    <div class="cycle-next"></div>
    <!--insert your images below-->
    <img src="http://jquery.malsup.com/cycle2/images/p1.jpg" alt="description">
    <img src="http://jquery.malsup.com/cycle2/images/p2.jpg" alt="description">
    <img src="http://jquery.malsup.com/cycle2/images/p3.jpg" alt="description">
    <img src="http://jquery.malsup.com/cycle2/images/p4.jpg" alt="description">
    <p>Mouse over image for previous / next links</p>
    </div>
    <!--end slideshow-->
    </body>
    </html>
    Nancy O.

  • What is the Best Way to add a shopping cart?

    What is the best way to add a shopping cart?
    Thanks.

    See that field at the top right that says "Search Forums"? Try Dreamweaver shopping cart. You'll get a lot of answers.

  • What is the correct way to add styling to drag-and-drop created calendars?

    I have a working instance of a rich client calendar. I generated the view with the required fields (start, stop, provider, ...), put it into the App Module, and dragged it onto a JSF page to create a calendar.
    Next I created an activityScope object in a class called CalendarBean (no inheritance)
    Class CalendarBean()
    private HashMap<Set<String>, InstanceStyles> activityColorMap;
    +..+
    +public CalendarBean() {+
    super();
    activityColorMap = new HashMap<Set<String>, InstanceStyles>();
    HashSet setEd = new HashSet<String>();
    HashSet setLen = new HashSet<String>();
    setEd.add("Work");
    setLen.add("Home");
    activityColorMap.put(setEd, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.ORANGE));
    activityColorMap.put(setLen, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.RED));
    +}+
    +}+
    Next, I linked this up as a backing bean and associated the ActivityStyles of CalendarBean to it:
    +#{backingBeanScope.calendarBean.activityColorMap}+
    I populated some records in the database with properties "Work" and "Ed', but they show default blue.
    As I understand it, I need to do something with the getTags() method of the underlying CalendarActivity class, but I'm not quite sure how to do that.
    Took a stab at creating a class, CalendarActivityBean, that extended CalendarActivity, and pointed all the CalendarActivity references I had to the new class, but it didn't seem to fire (in debug), and I got into trouble, when inserting records, with
    public void calendarActivityListener(CalendarActivityEvent calendarActivityEvent) {
    currActivity = (CalendarActivityBean) calendarActivityEvent.getCalendarActivity();
    being an illegal cast
    What is the correct way to add provider-based styling to drag-and-drop create calendars?
    Ed Schechter

    A colleague of mine was kind enough to solve this:
    The calendar has ActivityStyles property = #{calendarBean.activityStyles}
    CalendarBean looks something like this:
    package com.hub.appointmentscheduler.ui.schedule;
    import java.util.HashMap;
    import java.util.HashSet;
    import java.util.Set;
    import oracle.adf.view.rich.util.CalendarActivityRamp;
    import oracle.adf.view.rich.util.InstanceStyles;
    +public class CalendarBean {+
    private HashMap activityStyles;
    private String dummy;
    +public CalendarBean() {+
    +// Define colors+
    activityStyles = new HashMap<Set<String>, InstanceStyles>();
    HashSet setPending = new HashSet<String>();
    HashSet setArrived = new HashSet<String>();
    HashSet setApproved = new HashSet<String>();
    HashSet setCompleted = new HashSet<String>();
    setApproved.add("APPROVED");
    setPending.add("PENDING");
    setArrived.add("ARRIVED");
    setCompleted.add("COMPLETED");
    activityStyles.put(setApproved, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.GREEN));
    activityStyles.put(setPending, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.ORANGE));
    activityStyles.put(setArrived, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.PLUM));
    activityStyles.put(setCompleted, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.LAVENDAR));
    +}+
    +public void setactivityStyles(HashMap activityStyles) {+
    this.activityStyles = activityStyles;
    +}+
    +public HashMap getactivityStyles() {+
    return activityStyles;
    +}+
    +}+
    Now, go into the Bindings tab on the calendar page, double click the calendar binding, and specify the column you've defined as the calendar's Provider in the Tags dropdown.
    Should show colors.

  • What's the easiest way to add storage to a mac mini. (1TB hard drive but only 32G of real storage). External device, internal or partitioning?

    What's the easiest way to add storage to a mac mini. (1TB hard drive but only 32G of real storage). External device, internal or is there some way to partition? I tried doing so but received a message that there wasn't enough free space to partition. Seems like a 1TB drive should have more storage than my Ipad

    Its worth confirming what free space you have on your drive: 
    go to:   Apple Menu > About this Mac >  More Info > Storage
    The bar chart shows how much free space there is on the drive:
    Please realise that partitioning does not create extra space so this wont help you.
    If your free space is less than 20 % you should get extra storage with an external USB or Firewire drive, any make or model will work.

  • What's the right way to delete an entire backup ?

    I've had two Macs doing wireless Time Machine backups to one Time Capsule.
    Question: I got rid of one Mac, and want to delete its backup entirely (but leave the other computer's backups untouched). What's the right way to do it?

    Bob Timmons wrote:
    Jespes, welcome to the discussions!
    Open your hard drive. Your Time Capsule icon should appear under the SHARED heading.
    Click on the Time Capsule and a folder will appear to the right.
    Double click the folder and you should see a xxxxxx.sparsebundle file for each computer that has been backing up.
    Click on the xxxxx.sparsebundle file that you want to delete to highlight it and then click the gear shaped icon just above. Select Move to Trash. (Do not drag the file to the Trash as this will not work).
    Be careful, as the file will be deleted instantly and you will not be able to retrieve it.
    many thanks!

  • What is the right way to move a directory to another drive?

    When I move a directory to another location using drag and drop in the Elements 11 Organizer folder tree most, if not all, of the images become unlinked. What is the right way to move a directory and have the image paths updated in the Organizer database? Thanks.

    Bazsl wrote:
    When I move a directory to another location using drag and drop in the Elements 11 Organizer folder tree most, if not all, of the images become unlinked. What is the right way to move a directory and have the image paths updated in the Organizer database? Thanks.
    That's something I just did successfully one hour ago...
    I suppose your are in the 'folder' view with full folder tree, not in the 'My folder' view which only shows the lower subfolder level recorded in the database.
    Do you try to move a folder with its subfolders ?

  • What is the right  way to display a table in Java web dynpro using a node.

    Hi experts,
      I am trying to show a node of cardinality 0...n as a table in an adobe form in Java web dynpro. But its not showing it properly. Can anybody please tell me what is the right way to display a table on adobe form using a node of cardinality 0...n or 1...n in Java Webdynpro.  In ABAP webdynpro, we can drag and drop a node of cardianlity 0...n or 1...n to  show as a table and it works fine. Is the same possible in Java webdynpro also. Please help.
    Thanks and Regards.
    Vaibhav Tiwari.

    Please refer to my post.. you will get the answer
    Dynamic Table -  same data repeating in all rows
    Special care should be taken in designing the context for table attribute.
    The attribute type singletone also plays a important role. I have this doubt from the beginning when you have reported this problem for the first time but finally you marked it as solved so i thought there might be some other issues but again when you reported that again i did some analysis.
    Now coming to final solution :
    For designing a table in adobe interactive form you have consider following
    You have to design the view context upto three level, I am explaining you the properties
    PDFDataSource (Parent Level1) - Cardinality 1:1 - Signetone -True - This is assigned to datasource
    TableList (Parent Level2) - Cardinality (1:1) - Signetone -True
    TableWrapper(Parent Level3) - Cardinality (0:n) - Signetone -True
    TableData (Parent Level4) - Cardinality (0:1) - Signetone - false (This is the main point)
    Then under TableData value node, you have to put all your table attributes.
    This Value Node name can be anything but hierarchy should be same as I have mentioned above.
    Please try out these steps and get back to me if you have any doubt.

  • What is the right way to connect the adapter to my macbook when charging?

    what is the right way to connect the adapter to my macbook when charging.
    is it connect the magsafe connector first before plugging the adapter to the outlet? or the way around? or both ways will do?
    what if i'm using a surge protection with a on/off button, can I just turn the surge protector extension on and off without disconnecting the magsafe connector and adapter plug from my laptop when i'm not using it?
    thank you very much

    If there is any arcing it may be because the adapter is dirty. It is best to plug in the wall wart then attach the magsafe to the MacBook. As GfulDedFan mentioned this reduces the chance of power surging the MacBook. I have done mine this way since he day I bought it and have never had an arc. I keep it clean to reduce the chance of this happening. The following will help in the care of your supply.
    Apple: Use and cleaning of MagSafe power connector

  • What is the best way to add text to an image

    I used the draw ap div to add text to an image.  will that cause any problems?  If so, what is the best way to add text to an image?  Thanks!

    APDivs will kill your design unless you fully understand the css behind the scenes and plan accordingly. They really are completely unnecessary in the vast majority of situations.
    An easy way to add "web text over an image" would be to use the background-image attribute in css for a standard <div> tag, then just add the text within that same <div>.
    Something like this in the css (if you are using a 300x300 pixel image)...
    #yourdiv {
         background-image:url(yourpic.jpg);
         width:300px;
         height:300px;
    And then this in the html...
    <div id="yourdiv">Your text here</div>
    You would then position the <div> using css margins, floats and padding. Using position:absolute (APDivs) is typically something that will blow your design to pieces if the viewer changes their browser settings.

  • What is the best way to add hard disk space to macbook pro?

    I'm running out of disk space on my macbook pro. What is the best way to add disk space?

    another way of doing it is to replace your hard drive with a larger one.
    if you're technically capable, it takes 10 minutes for the swap and an hour minimum to clone your hard drive or do a data transfer.  all depends on how much data there is to trandfer or to clone.
    good luck.

  • What is the best way to add libraries to a project?

    What is the best way to add technologies to ADF? For example log4j. Or does the embedded logger have log4j features?

    HI,
    Hope helpful
    http://technology.amis.nl/blog/8380/manage-jdeveloper-external-libraries

  • What is the right way to handle events?

    What is the right way to handle events? If I start doing stuff in the AWT event thread (particulaly things that create their own events) should I be starting a new thread?
    A link to a good book or reference source will do
    thanks in advance

    http://java.sun.com/docs/books/tutorial/uiswing/events/

  • What is the proper way to add 16GB ram to the existing 8GB in my 27" Retina iMac?

    I've searched the web for the best answer to this question: What's the best way to add 16GB ram to the existing 8GB in my late 2014 Retina iMac (ending up with a total of 24GB ram)?
    I'm seeing conflicting and ultimately confusing advice. Most people are saying to just pop in the new 16GB (2X8GB) into the 2 open slots and you're done. Others are saying no, remove the 2 4GB sticks, replace those now empty slots with the 2 new 8GB sticks, and put the 4GB sticks in the remaining 2 slots, which viewed from the bottom would be 8,4,8,4.
    A third option (to make things even more confusing) seems to be keeping the 2X4GB and 2X8GB sticks together, side by side, so that viewed from the bottom you'll see 8,8,4,4 or 4,4,8,8.
    I have no idea which configuration is best: They all seem to "work" according to those advocating their method. I want to know what Apple recommends, if they indeed have a preferred method.

    Crucial. 16GB 2X8 204P SODIMM PC3-12800 MAC to be specific.
    The OEM RAM is in slots 2 + 4 from the top, at least in mine. BANK 0/DIMM0 and BANK 1/DIMM0.
    A little background: I installed new RAM in the slots last week when my new iMac arrived, in the open slots, 1 + 3 from the top. I then started up for the first time and installed my account from Time Machine. So far, so good. About 2 hours into my first day usage I started getting random crashes. By day 2 I'd had maybe 15 crashes and a dozen kernel panics. I removed the RAM and re-seated it. Same problem. I created a new user account, thinking maybe I had some corrupt data. Ran fine for a couple of hours then BOOM same problem, again. Removed the new RAM and presto, no more crashes, going on 4 days now. I returned the RAM to the vender, requesting a replacement in the hopes that I just had a bad stick (even though I ran TechTool 7 and found no problems... which struck me as weird).
    So now I'm a little bit concerned about using the best, most Apple-approved method for installing the replacement RAM when it arrives. I'm not exactly a newbie. I've read things in the past about it being important to install RAM in a specific order, but it's been a while since I've had a new Mac, and things change. I want to be careful, but it sounds like it doesn't matter a whole lot. My fingers are crossed, not that I'm superstitious.

  • What is the best way to add external C++ code to LabView 6.1?

    I have various C++ class-based DLL's written with Visual Studio 6.0 and wish
    to create instances of these C++ classes and call their methods in LabView
    6.1. What is the best way to do this?
    It seems based on the little reading I have done that there are two choices:
    1. Wrap the C++ class as a simple COM control and use LabView's COM based
    VIs to create a COM object and access the methods of various interfaces.
    2. Wrap the C++ class methods as C functions and a "constructor" and
    "destructor" C function to create and destroy an instance of the class. Then
    use LabView's DLL call support.
    Which is best? What direction is LabView going to take that better supports
    the notion of C++ class libraries?
    Thanks,
    Te
    rry

    You could also try using a CIN. This is a tool that LabVIEW provides for interfacing with external code.
    The CINTools libraries of LabVIEW allow you to embed compiled C code into a particular Virtual Instrument (VI) using a CIN.
    In order for LabVIEW to be capable of calling compiled functions of C from a running VI, the code must be loaded and unloaded into memory at the same time as the VI code itself. LabVIEW uses object code in the form of a .lsb file which is generated by the C compiler from the C source code using the ntlvsbm.mak file. This ntlvsbm.mak file is included in the CINtools directory in the LabVIEW folder. You also must create another .mak file which includes parameter definitions for the ntlvsbm.mak file and also includes a call to the LabVIEW .mak file.
    The generic documentation for CINs only explains how to use them to call C compiled code from a LabVIEW VI. It shows several development environments such as Visual C++, but in essence it only allows the user to create .lsb files out of plain C source code ( .c ) through C compilers on those environments.
    The question now is how can I create .lsb files from C++ native source code using a C++ compiler. Furthermore, how can I create a .lsb file from several C++ source code files (.cpp) and make calls to C++ functions from a VI using CINs? The following explains how to do this:
    1) Drop a Code Interface Node (from the Advanced Subpalette of the Functions Palette) into the LabVIEW VI. Make sure to wire the inputs.
    2) Right-click on the CIN and choose "Create.c File...", then in the file dialog box specify a "name.cpp" file name. (very important: use .cpp extension)
    3) Then create a name.mak makefile (text file) and add the following lines :
    name=name_of_cpp_file_without_the_extension
    type=CIN
    cinlibraries=Kernel32.lib
    CINTOOLSDIR=path_to_cintools_directory
    !include <$(CINTOOLSDIR)\ntlvsb.mak>
    4) Go into Visual C++ and File>Open and open the .mak file. You can even Add the name.cpp file to the project to make it easier to edit. Select that name.cpp or open it as a text file in NotePad or and edit the prototypes of the CIN MgErr functions as shown below, adding extern "C" at the beginning of the line. extern "C" CIN MgErr CINRun(float64 *INPUT);3) Select Build.exe to create the "name.lsb" file. To import the .lsb into LabVIEW, right-click on the CIN and choose "Load Code Resource...". Then, choose the name.lsb file and it is ready to run!
    If you want to use several C++ source code files with .cpp extensions, then compile them in Visual C++ and link them to name.cpp and create a .lsb by modifying the name.mak as follows:
    name=name_of_cpp_file_without_the_extension
    otherobj=other_cpp_files_BUT_USING_.obj_extension
    type=CIN
    cinlibraries=Kernel32.lib
    CINTOOLSDIR=path_to_cintools_directory
    !include <$(CINTOOLSDIR)\ntlvsbm.mak>
    It's worth a try? I have also heard of using clusters to represent classes, so you could check that out.
    J.R. Allen

Maybe you are looking for