Drag from vbox to list??

Hey all,
I've been having a heck of a time trying to get this to work, basically I have a list of components on one panel in a vbox, and I want to drag them into a list on the right panel.
How do I tell the list to accept a drag drop action coming from a vbox? I've looked at dozens of examples online that display list-list, vbox-vbox, list-image but nothing that is vbox-list.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Script>
        <![CDATA[
        ]]>
    </mx:Script>
    <mx:HBox>
        <mx:VBox width="250">
            <mx:Canvas id="redSquare" width="25" height="25" backgroundColor="Red"/>
            <mx:Canvas id="blueSquare" width="25" height="25" backgroundColor="Blue"/>
            <mx:Canvas id="greenSquare" width="25" height="25" backgroundColor="Green"/>
            <mx:Canvas id="yellowSquare" width="25" height="25" backgroundColor="Yellow"/>
        </mx:VBox>
        <mx:List width="250" height="250"/>
    </mx:HBox>
</mx:Application>
In the example above I want the user to drag any number of red/blue/green/yellow squares into the list. They could re-order or remove those items as well. So, for a usecase the user should be able to drag in 5 instances of the red square, 3 instances of the blue square and so on.
Why not make it list to list?
The end result is much more complicated then this. There are dozens of different options and when they drag in an item it will prompt them for custom input depending on which item they dragged in from. I'm also confused as to why this has to be so difficult, what am I missing?
Any help would be appreciated

If you have a vbox-vbox example, then try adding an "items" format to the
DragSource where items is an array of objects that will match what gets
dropped into the destination List's dataprovider.

Similar Messages

  • Weird behaviour in dragging from tilelist to list

    Hi All,
    I am trying to drag an item from a tilelist into a list but I am encountering this error:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at components::TileListItem/set data()[C:\Documents and Settings\puneet\Adobe Flash Builder 4 Plug-in\LatestSeatBeltProject\src\components\TileListItem.mxml:35]
        at mx.controls.listClasses::ListItemDragProxy/createChildren()[C:\autobuild\3.5.0\frameworks \projects\framework\src\mx\controls\listClasses\ListItemDragProxy.as:90]
        at mx.core::UIComponent/initialize()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx \core\UIComponent.as:5381]
        at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:\autobuild\3.5.0\frameworks\pro jects\framework\src\mx\core\UIComponent.as:5278]
        at mx.core::UIComponent/addChild()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\c ore\UIComponent.as:4980]
        at mx.managers::DragManagerImpl/doDrag()[C:\autobuild\3.5.0\frameworks\projects\framework\sr c\mx\managers\DragManagerImpl.as:281]
        at mx.managers::DragManager$/doDrag()[C:\autobuild\3.5.0\frameworks\projects\framework\src\m x\managers\DragManager.as:243]
        at mx.controls.listClasses::ListBase/dragStartHandler()[C:\autobuild\3.5.0\frameworks\projec ts\framework\src\mx\controls\listClasses\ListBase.as:9190]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.5.0\frameworks\projects\framework\src \mx\core\UIComponent.as:9440]
        at mx.controls.listClasses::ListBase/mouseMoveHandler()[C:\autobuild\3.5.0\frameworks\projec ts\framework\src\mx\controls\listClasses\ListBase.as:8927]
    BACKGROUND INFORMATION:
    Source: (Tilelist) has a custom itemrenderer where I have overriden the set data function as:
    override public function set data(value:Object):void{
                    super.data = value;
    Destination: (List) on which I have defined a custom item renderer displaying an image and a label in each item.
    I have set dragenabled property of source and dropenabled property of destination to be true. It seems as if the set function is causing problems when the object chosen is null.
    Now, as soon as i drag an item from the tilelist into the list, the aforementioned error pops up but after dismissing all or clicking on the continue button, I am still able to copy the dragged content from source to the destination. Can anyone please explain what's happening ?
    Thanks,
    Puneet.

    Hmmm. Interesting.
    In SQLJ code we have been seeing similat behavior - the iterator (=result set) is still in scope, but when we try to close it, it has become null. It turned out that in this case we were using JDK 1.2.1. Switching to 1.2.2 solved the problem.
    Below is the corresponding section from the SQLJ README file.
    RUNTIME
    Under JDK 1.2.1 a NullPointerException may be experienced when close()ing an iterator instance. This might occur in code of the following form:
    NamedOrPositionalIterator iter;
    #sql iter = { SELECT .. };
    ... while loop to process iter ..
    iter.close(); // <== NullPointerException on iter!
    This problem is due to faulty garbage collection under JDK 1.2.1. You will have to run your SQLJ program under a different JDK version [Bug 1130431].

  • There is absolutely NO way to drag and drop newly purchased music from the Purchased list on the phone into my iTunes library?  I'm finding it hard to believe that something so simple cannot be done!

    I like to make MP3 CD's when I have people over, or when my friends have people over so I can just pop them into the CD player and let them play all night without having to worry about changing the CD or anything.  Well, Apple's music is in AAC format, so I have to convert the songs to MP3 files using the converter in iTunes.  So I'll convert them to MP3's and just delete the AAC file so I don't have doubles.  The problem is, the next time I plug the phone into my laptop to transfer new purchases, iTunes thinks that the songs I converted aren't there anymore because the phone has them as AAC files, and iTunes has them as MP3 files, so it doubles the music again...EVERY time!!  It's very frustrating!  So this is why instead of clicking Transfer Purchases, I would like to be able to just drag and drop the songs I want from the Purchased list on the phone into my iTunes library.  I hope I explained this right...lol.  Unfortunately, it doesn't seem like I'm able to do that.  I'm hoping maybe somebody here can help me out and give me some pointers on what to do about this.  Thanks!!

    That stinks!  I can actually do that at my house...I just plug my iPhone right into the wire that's plugged into my receiver in my living room...but some of my friends aren't "technology savvy"...lol...so they just have DVD players and I'll put the CD in there because it will read an MP3 disc.  What's funny, is I have the phone set to "Manually Manage Music", and when I plugged it into the laptop just now, the one song I downloaded last night on the phone, transferred over to the iTunesl library.  That NEVER happens.  And it only transferred the one song...it didn't double the other songs like it ususally does.  I swear, iTunes does what it wants, when it wants sometimes...lol.  Thank you for your quick response. 

  • Drag-and-drop tree list from files/folder

    Hello all. I'm new to Flex and I'm looking for some help or
    for someone to point me in the right direction. I want to write a
    simple AIR application to accept a multiple text files (or a folder
    full of text files) when the files/folder is dragged into a tree
    list. The file/folder name will be the node name. When selected,
    the contents of the file will be displayed in a text area. The text
    file will contain a 4 x 4 number matrix with each column separated
    by a tab and each row separated by a return. (I plan on plotting
    the numbers in the matrix in the future).
    What I'm most confused about is how to go about
    dragging-and-dropping files into a tree list and creating item
    names based on the file/folder name? And does the file content need
    to go into an array collection?
    Maybe I'm going about this in a difficult way. If there is an
    easier way, I'd appreciate it if someone could share. Thank you
    all.

    I have the same problema and I´m not able to find the reason.
    The solution to get the event raised has been to copy configurations from wd standard appl FPM_TEST_DND_FORM and use my own Z feeder class : all  seems to work perfectly , but , if I try to do it from scratch the event  FPM_DROP_COMPLETED it´s not raised .
    I´ve compared both configurations/class ( the one that I´ve done from scratch  that it doesn´t raise the event and the one that I´ve adapted copying from standard that it raises perfectly  the event) and I haven´t  seen any difference (maybe I haven´t found) .

  • How can I drag and drop a song from my "Purchased" list on to my i-Pod?

    I've recently updated the apple software on my PC and the new version of i-Tunes won't let me drag and drop songs from my "Purchased" list directly to my i-Pod.  I don't want to sync my i-Pod.  It will erase all the songs on my i-Pod and sync with the playlist from my PC.  I want to select just one song from my "Purchased" list and put that on my i-Pod.

    I got my own answer !!   I saw it on another post.  Select "View" and then toggle down to "View Sidebar".
    Now I can drag and drop like before. 

  • [svn:fx-trunk] 10943: Fix to dragging from List with multiple-selection

    Revision: 10943
    Author:   [email protected]
    Date:     2009-10-08 15:46:27 -0700 (Thu, 08 Oct 2009)
    Log Message:
    Fix to dragging from List with multiple-selection
    - The fix is to postpone the selection commit until we make sure the user has not started a drag gesture.
    - Exclude the dragEnabled, dropEnabled, dragMoveEnabled properties for DropDownList
    QE notes: None
    Doc notes: None
    Bugs: None
    Reviewer: Deepa
    Tests run: checkintests, mustella List, DropDownList
    Is noteworthy for integration: No
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as

  • I am trying to create a group in the address book.  When I drag over the contacts from the contact list they duplicate in the address book. I am using "Lion"

    When I try to create a group from the address book, when I drag over the names from the contact list, the names duplicate in the address book.

    Hi cavu10horses,
    Thanks for using Apple Support Communities.  This article has instructions for changing a contact's photo using a photo from iPhoto's Faces feature:
    Contacts: Add or change contact pictures
    http://support.apple.com/kb/PH11580
    Select a contact or your own card, and then double-click the picture well.
    Select a picture:
    Drag an image to the picture well.
    Click Camera to take a picture.
    If you have pictures in iPhoto, click the Faces button to use a face from iPhoto.
    If the contact is linked (it’s in multiple accounts, but displayed only once in Contacts) and has multiple account pictures, click Linked.
    Click Edit to edit the picture.
    To zoom in and out of the picture, drag the slider. Drag the picture to change which part of it is visible.
    To rotate the picture, hold down the Option key while you click and drag the picture.
    To apply special effects, click the Effects Gallery button and choose an effect.
    Click Done.
    Cheers,
    - Ari

  • How do i remove a file from my favorites list on my hard drive

    how do i remove a file from my favorites list on my hard drive.  i was trying to put a file in my documents, and it added it to my favorites.  i have tried to drag it off but it won't disappear and it won't go into the trash either.  any suggestions.  i think it is simple because i have done it before, but can't remember what i did to correct it.  thanks

    Try Holding the CMD Key as you drag it off...

  • Lacking true native "Deferred" or "Promised" file drag from JAVA

    Hello all,
    I have been playing around with the drag and drop APIs for quite some time (about 1.5+ years) and I am having a problem producing functionality similar to dragging network-based files in "Windows Explorer". I am not sure if I have overlooked something or if DnD with the native OS is lacking a huge piece of functionality. I would appreciate hearing people's feedback or experience with similar problems.
    First, some background. My company's applications provide remote access to a central storage of digital assets (read "files"). Our client provides a view of the files on the server. We have C++-based applications running on both Windows and the Macintosh are able to drag from our application to the desktops and Explorer windows. However, in these drag operations, they each employ a mechanism to hold-off providing the native OS file data until the drop has successfully completed. The OS in each case provides a "callback" to notify our application that the drop succeeded and that we should go and transfer the files. In this way, we can pay the price of transferring the files locally ONLY when the drop occurs (same thing can be applied to the Clipboard).
    However, from what I can tell, the AWT/SWING DnD APIs provide no mechanism to do this type of operation. In order to drag files to the native OS, you must explicitly provide the files BEFORE you initiate the drag operation (or place them on the clipboard). This places doing viable native drag and drop from our JAVA applications in serious jeopardy and is causing a great deal of displeasure from our management who are questioning the "readiness" of JAVA.
    Since I can't seem to find a way to accomplish this, I have tried entering enhancement requests (about 8 to date), but I have failed to hear back about a single one. I think that either Sun does not monitor some of their enhancement lists or they do not want to address this heavily-desktop oriented issue (I am not sure if this scenario is even possible on a UNIX machine where most things must be "mounted" locally before they can be viewed -- SMB browsing may be the only exception that comes to mind but I do not know if anyone has done this).
    In the meantime, we have attempted to change the workflow of our application. We have provided a JAVA window that mimics the filesystem so that we can get the drop event and provide the illusion of a "deferred" drag. In addition, we have provided and "export" feature that places the file locally afterwhich they may grad anywhere they desire. Both of these solutions are hacks and leave a very bad taste in our user's mouths. We can try to write JNI pieces, however, there are just too many UI locking issues to contend with to ensure a timely release of our software.
    Has anyone else run into this before? Can anyone provide a more useful workaround? Is it possible to get this issue looked at from SUN? If SUN is looking at it already, what kind of timeframe are we looking at until a potential solution?
    Thank you for your time.
    Michael Macaluso

    I am curious about the verdict for "deferred" file transfers. I have hit the same wall. I have a JAVA client window that allows the user to browse a network file repository. Most of our clients use a Windows platform, so that is my primary interest. I was hoping to: 1)capture the drop event, 2) request the data from the server, and 3) stream it to a temp file/ or to the destination directory, and 4)allow the file system to transfer the temp file. However, I cannot find any documentation regarding this issue.
    So I wanted to swtich tracks and set my transferrable data to represent a file on the central server, but that would require a URL object, and I have failed to set the MIME types correctly for NTFS to recongize the transfer. Sorry I don't have any answers. Any suggestions?

  • 12.0.1 Upgrade - Sidebar not apparent in order to use the "drag" from iTunes and "drop" to connected device

    I found a workaround but I am opening a new discussion for my specific issue as noted in my subject. Search "iTunes 12 sidebar missing".
    Per denali_uk on Oct 21, 2014 12:29 AM:
    "Actually this feature is still available but it's not very obvious. If you grab a bunch of tunes from one of the Music lists and drag them to the left, a temporary sidebar appears with your attached devices and playlists. You can drag the songs into an existing playlist, or to an empty space where it will create a new one. The sidebar will then disappear, and you'll have to click on one of the Playlist tabs if you want to edit anything. Awful design".
    I apologize to those readers who use this site "correctly" but I did not know how else to accomplish this.

    Argh... Found that I cannot drag new playlists to the device icon that appears on the taskbar of itunes. If I display the playlists in itunes I can select 1 then scroll up to the my ipod where it appears further up the list and then drop the item into the ipod. This appears to be a great step forward for Itunes but you must drag and scroll the list to find your device one at a time as selecting items with the shift or ctrl buttons pressed has no effect.
    Itunes at version 12+ you would think it would be easier not harder to load content.

  • HT1451 how do I create playlists now of my downloaded music.  Used to drag from "recently dowloaded" to playlist.  Can't even find the dang songs!!!!!

    how do I create playlists now of my downloaded music.  Used to drag from "recently dowloaded" to playlist.  Can't even find the dang songs!!!!!

    However, my troubleshooting issue is that I also want the songs in my concert playlists to go in order of how they were performed at the concerts.
    Give them a track number.
    Each time I number them within the playlists the song's number also changes within the Library Music list.
    And?  I'm not seeing the problem.
    However, I can not figure out how to make true copy. I've already tried dragging the song to my desktop, then dragging the new copy back into iTunes. I've even tried renaming the duplicate copy and dragging it into iTunes. Why won't my iTunes make an individual duplicate copy of a song?
    How do you have iTunes manage your music?  If you drag a song to the desktop it may just be moving the file to the desktop.
    Command+R to reveal the file in Finder.  Command+D to duplicate the file in Finder. Drag the duplicate to iTunes to add the second copy.  Not that I totally understand where the issues lie and feel this is likely not the best remedy...

  • Disapperance of Book from iPhoto Source List

    After restarting my Power Mac G5 following a software update, my Book and its duplicate disappeared from the source list in iPhoto. The 82 page Book contained over 200 photos with a file size of about 52 MB. Where did the Book and its duplicate go?

    Sam:
    A good way to preserve the book for future reference is to:
    1 - do a print to PDf on the book in iPhoto
    2 - just before you complete the ordering process (or simulating an order) find and save the pdf file that iPhoto creates for uploading and printing. Here's how to find it:
    How to Find the iPhoto Generated PDF File:
    1 - Start the ordering process and stop after the book has been assembled and you get to the Order pane where you select the cover color, copies, etc.
    2 - Go to the Finder and select the Go->Go to Folder menu item (CommandShiftG).
    3 - copy the following, “/private/var/tmp/folders.501/TemporaryItems/iPhoto” (for Panther the path is ‘/private/tmp/501/TemporaryItems/iPhoto “), and paste into the Go to Folder search box.
    4 - the iPhoto folder will be brought up. In it will be the PDF file that was generated by iPhoto. You can copy it (Option-drag) to the Desktop to review and/or save.
    Note: the iPhoto folder will not exist before you start the ordering process and is deleted after the order is completed or after you cancel the order and quit iPhoto.

  • How do I transfer videos / music from the Purchased List

    I have recently got a new iPOD Touch 64GB and by all accounts it seems pretty good.
    However, I have purchased a couple of things from iTunes (a movie and a TV show) and I cannot seem to get them transferred (if that is the correct word of course) from the "Puchased" list in iTunes to the "Video" selection.
    Without transferring them, this will mean that although I've purchased these items, in order to watch them, I'll need to be connected to a WiFi location - which defeats the purpose of purchasing!
    What am I doing wrong?
    Thanks.

    Vorksholk is right. Plug in your iPod to your computer, open iTunes, and select it on the left-hand side. You will see several different tabs on the top (music, tv shows, apps, etc...). Select "tv shows" or "movies" and you'll see your purchases there with checkboxes to their left. Check them and then click apply at the very bottom. Oh, you should also open the TV shows or Movies playlists on iTunes, and check if your purchases are there. If not, drag them in.

  • Dragging from the address bar to desktop... Why open a new window?

    Running 64bit Windows 7 Pro with SP1 installed. Also running Internet Explorer 11.
    When I drag the icon from the address bar of IE to my desktop to create a shortcut to that webpage, the current tab will close and a new browser window opens and loads the page. Why does this happen, and more importantly, how can I stop it?

    Hi yes... it did work before Tear-able tabs were introduced...
    I opened a connect ticket at the MS Feedback channel for IE.
    https://connect.microsoft.com/IE/feedback/details/930834/dragging-from-the-address-bar-to-desktop-why-open-a-new-window-tearable-tabs-breaks-drag-drop-to-desktop-from-addressbar
    I don't think it will be a show stopper...
    another workaround is to store all of your links in your Favorites folder (or Favorites Bar folder)...
    then the Address bar autocomplete makes it easy to retrieve the web address and navigate back to the website....
    If you are using the desktop to store your downloads (zips/whatever), there is no need for this as the IE Download Manager will retain a listing of downloaded files (until you clear it)... you can also choose to save your downloads to the Desktop folder
    I/o the default Downloads folder.
    Rob^_^

  • IMPORT CONTACTS TO AN EMAIL FROM MY CONTACT LIST

    I want to attach multiple email addresses from my contacts list to an email I wish to send. .. Help appreciated !!!

    Hey loons,
    Although you could manually add each recipient to your outgoing email, if you send regularly to the same group the easiest thing to do is create groups in Contacts (app) then address to that group.
    Contacts (Mavericks): Group contacts
    Use groups and folders (for Exchange accounts) to organize your contacts by categories, or to easily send email to several people at once.
    If you want a group that adds or deletes contacts automatically based on rules you define, create a Smart Group.
    Use Smart Groups
    If a contact has multiple email addresses, you can choose which address to use when sending mail to the groups the contact belongs to.
    Select addresses for group members
    Create a group or folder
    Select an account.
    Click Add (+), then choose New Group. You can also select contacts, then choose File > New Group From Selection.
    Create subgroups or subfolders by dragging a group or folder to another group or folder.
    Add contacts to a group or folder
    Select one or more contacts and drag them to a group or folder.
    Contacts in an Exchange account can belong to only one folder at a time. Any contacts not in a created folder are in the default Exchange Contacts folder.
    See groups and folders a contact belongs to
    Select the contact, then press the Option key.
    The groups and folders containing the contact are highlighted.
    Best regards,
    Nubz

Maybe you are looking for

  • From line item text field in Fi not posted to COPA characteristic field?

    How do you create the link from the Line item Text field in FI to a characteristic field in COPA? I tried to create a characteristic field Text. from the domain VBELN in COPA. Although I can post from CRM the contract number to the Line itemText fiel

  • Can i use 32Gb RAM on my macbook pro 2012

    Can i use 32Gb (2 x 16Gb) RAM on my 2012 Macbook Pro????

  • SRM 7.0 - RBDAPP01 error in background elaboration

    Hi all, we have a problem with the program RBDAPP01 (background mode) only with the shopping cart from Germany. In the spool of the elaboration we have the message BBP_PD 001 "Buffer table not up-to-date" but in foreground mode we don't receive any m

  • Creating graphs web page

    Hi, I am trying out this Jdeveloper. I am trying to create a web page that show graphs (values are from a table) as well as some table's data. Can JDeveloper create such web page ? and what type of project should it be created under ? ADF , Jave EE W

  • Alternative cal type

    Hi    what is alt. condition base value, calculation type and requirement in pricing. thanks in advance