Manual Drag and Drop from Tree to Tree with XML dataProvider

Been struggling with Drag-n-Drop between Tree controls. As far as I can tell, it doesn't work very well.
I have boiled it down to a minimal project below and would be ever so grateful if someone can tell me what I am doing wrong.
The complete MXML application file is below. Flex 3.5.
Two trees side-by-side. One has XML that I want to drag over to the drop tree.
On the DragOver() event, I select the node which is given to me by the calculateDropIndex() function.
After startup; first open the L1 branch on the left and drag L11 over and drop it on the right Tree.
Looks good, root node is selected/highlighted and dropFeedback is correct and dropping the node drops it as a child of "Start Here".
Open the Start Here root node to see it.
Now proceded to #1 below.
Here are the problems:
1) Drag "L12" from the left tree over to the middle of the right tree (below "L11" just dropped). "L11" will not be selected. The Selected node (with dropIndex=4) will be the entire new nested XML "<L><L11/></L>"; and therefore only "Start Here" node will be highlighted. Drop "L12" anyway. So, it is acting like selectedIndex = <anynumber> will only select the root node. How do I get the new L11 to show as a drop target?
2) Now drag "L21" from the left tree onto the right tree; again starting below all nodes on the right tree. Selected node will not change until you drag it above #2 out of 3. Then, you can drag it anywhere, and correctly highlight/select any node as the target, and get that node in code. This is a problem. Go ahead and drop it anywhere. Now if you drag, for example, L22 from the left it will correctly highlight/select any node without having to first drag above #2 in the list.
3) Now, grab and drag L11 a second time and drop it at the bottom on the right. Drag L23 over. No matter which L11 you hover over, it highlights the one at the bottom. How can this be right?
Those are the bugs I would like to figure out. If I am doing it wrong, I sure would like to know what I am doing wrong. The code below is distilled down to one simple mxml application module.
Thanks,
Jeff
<?xml version="1.0" encoding="utf-8"?>
<mx:Application 
xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal" minWidth="955" minHeight="600">
<mx:Script>
<![CDATA[
import mx.collections.XMLListCollection; 
import mx.core.IUIComponent; 
import mx.events.DragEvent; 
import mx.managers.DragManager; 
Bindable] 
private var dragXML:XML = 
<Tree label="root"><L1 label="L1">
<L11 label="L11"/>
<L12 label="L12"/>
</L1>
<L2 label="L2">
<L21 label="L21"/>
<L22 label="L22"/>
<L23 label="L23"/>
</L2>
</Tree> ; 
Bindable] 
private var dragXMLListCollection:XMLListCollection = new XMLListCollection(dragXML.*); 
Bindable] 
private var dropXML:XML = 
<Tree label="root"><L label="Start Here"/>
</Tree> ; 
Bindable] 
private var dropXMLListCollection:XMLListCollection = new XMLListCollection(dropXML.*); 
// ************* Drag Drop Events ********************
private function dragEnter(evt:DragEvent):void
if (evt.dragSource.hasFormat("treeItems")) DragManager.acceptDragDrop(IUIComponent(evt.target));}
private function dragOver(evt:DragEvent):void
// Calculate dropindex and set selected item
var dropIndex:int = dropTree.calculateDropIndex(evt);dropTree.selectedIndex = dropIndex;
// setting the selected item based on calculateDropIndex()
var selNode:XML = dropTree.selectedItem as XML; // Getting XML for selected node in Tree
var selNodeName:String = (selNode != null ? selNode.localName() : ""); 
// Get dragged XML
var dragNode:XML = XML(evt.dragSource.dataForFormat("treeItems")[0]); 
var dragNodeName:String = dragNode.localName(); 
trace(evt, "\n", dropIndex, "\n", (selNode ? selNode.toXMLString() : "null"), "\n", dragNode.toXMLString()); 
// you cannot drop a shorter name on a longer name
if ((dragNodeName.length >= selNodeName.length) && (selNode != null)) DragManager.showFeedback(DragManager.COPY); 
else DragManager.showFeedback(DragManager.NONE);}
private function dragDrop(evt:DragEvent):void
// get selected node in drop tree
var selNode:XML = dropTree.selectedItem as XML; //selected in dragOver() event
// Get dragged XML
var dragNode:XML = XML(evt.dragSource.dataForFormat("treeItems")[0]); 
// Drop logic
// Compare dragNode.localName().length to dropNode.localName().length
// if drag longer; drop as child
// if drag is equal; drop as sibling
// Drag can never be shorter in this example.
var isChild:Boolean = String(dragNode.localName()).length > String(selNode.localName()).length; 
if (isChild){
selNode.insertChildAfter(
null, dragNode);}
else
selNode.parent().insertChildAfter(selNode, dragNode);
]]>
</mx:Script>
<mx:Tree id="dragTree" width="30%" showRoot="true" height="100%" labelField="@label"dataProvider="
{dragXMLListCollection}"dragEnabled="
true" dragMoveEnabled="false" dropEnabled="false" />
<mx:Tree id="dropTree" width="30%" showRoot="true" height="100%" labelField="@label"dataProvider="
{dropXMLListCollection}"dragEnter="dragEnter(event);" dragDrop="dragDrop(event);" dragOver="dragOver(event);"
/>
</mx:Application>

I just found out that by setting the dataProvider for each tree to the XML variable instead of the XMLListCollection variable, problems #1 and #2 went away!
But the documentation says to use an XMLListCollection if you will be dynamically changing the tree contents.
And, I just found out that #1 returns if I specify showRoot="false". But with it set to "true" that problem goes away. Is there some sort of minimum XML required to make drag-n-drop work on these Tree controls?
Hmmmm. It appears that (for #3) the calculateDropIndex() will always return the last matching XML node - by name - in the tree.

Similar Messages

  • Issue : drag and drop from list control to tree control

    Hi,
    I was trying a drag and drop from list control to tree control. I have used some sample data to populate list and tree controls .
    It is working fine . except one problem ..
    Prob : when i drag an item to tree control .. it gets added .. now tree contains (X+1) data in list .. say X is the inital number of nodes in a tree node.
              now if i drag another item from list to last item in the tree node  .. i.e at X+1 index. .. it throws null pointer exception.
    I am considerably new in flex programming . looking for help from experts ..
    Below is my code :
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                    layout="horizontal"
                    creationComplete="init()">
        <mx:Script>
            <![CDATA[
                import mx.controls.listClasses.IListItemRenderer;
                import mx.rpc.events.FaultEvent;
                import mx.rpc.events.ResultEvent;
                import mx.utils.ObjectUtil;
                import mx.collections.ICollectionView;
                import mx.core.UIComponent;
                import mx.managers.DragManager;
                import mx.events.DragEvent;
                import mx.controls.Alert;
                import mx.controls.Label;
                import mx.events.CloseEvent;
                private var homePath:String="/home/e311394/dndTest/";
                private var destPath:String="/home/e311394/dndDest/";
                private var eid:String="e311394";
                private var actn:String;
                [Bindable]
                private var cm:ContextMenu;
                private var cmi:ContextMenuItem;
                [Bindable]
                private var dp:ArrayCollection;
                private function init():void
                    cmi=new ContextMenuItem("Remove");
                    cmi.enabled=true;
                    cmi.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, contextMenuItem_menuItemSelect);
                    cm=new ContextMenu();
                    cm.hideBuiltInItems();
                    cm.customItems=[cmi];
                    cm.addEventListener(ContextMenuEvent.MENU_SELECT, contextMenuItem_menuSelect);
                    list.contextMenu=cm;
                private function contextMenuItem_menuSelect(evt:ContextMenuEvent):void
                    list.selectedIndex=lastRollOverIndex;
                private function contextMenuItem_menuItemSelect(evt:ContextMenuEvent):void
                    var loclSelectedRow:Object=list.selectedItem;
                    var lostrSelectedMenuItem:String;
                    lostrSelectedMenuItem=evt.target.caption;
                    if (loclSelectedRow != null)
                        var obj:Object=new Object()
                        obj.label=loclSelectedRow.label as String;
                            //Alert.show(obj.label);
                    if (lostrSelectedMenuItem == "Remove")
                        if(loclSelectedRow!=null)
                        var pth:String=homePath.concat(loclSelectedRow.label);
                        //Alert.show(pth);
                        //FlexDnDRemoteService.process(eid,"delete",pth,"-"); 
                        var coll:ArrayCollection=list.dataProvider as ArrayCollection;
                        if (coll.contains(loclSelectedRow))
                            coll.removeItemAt(coll.getItemIndex(loclSelectedRow));
                public function onTreeDragEnter(event:DragEvent):void
                    event.preventDefault();
                    DragManager.acceptDragDrop(event.target as UIComponent);
                    tree.showDropFeedback(event);
                protected function onTreeDragOver(event:DragEvent):void
                    event.preventDefault();
                    event.currentTarget.hideDropFeedback(event);
                    try
                        var index:int=tree.calculateDropIndex(event);
                    catch (e:Error)
                        DragManager.showFeedback(DragManager.NONE);
                        return;
                    tree.selectedIndex=index;
                    var draggedOverItem:Object=tree.selectedItem;
                public function onTreeDragExit(event:DragEvent):void
                    event.preventDefault();
                    tree.hideDropFeedback(event);
                private function showAlert():void
                    Alert.yesLabel="Move";
                    Alert.noLabel="Copy";
                    Alert.buttonWidth=70;
                    Alert.show("Copy / Move ?", "Confirm", Alert.YES | Alert.NO | Alert.CANCEL, this, alertListener, null, Alert.OK);
                private function alertListener(eventObj:CloseEvent):void
                    var result:Boolean=false;
                    if (eventObj.detail == Alert.CANCEL)
                        //Alert.show("CANCEL");
                        return;
                    if (eventObj.detail == Alert.YES)
                        //Alert.show("YES");
                        result=true;
                    else if (eventObj.detail == Alert.NO)
                        //Alert.show("NO");
                        result=false;
                    var index:int=tree.calculateDropIndex(treedropevt);
                    //Alert.show("Drop Pos" + index.toString());
                    /* var treeList:ArrayCollection=tree.dataProvider as ArrayCollection;
                       Alert.show(" index"+index+"Length "+treeList.length);
                       if(index > treeList.length)
                       Alert.show("Returning");
                       return;
                    var items:Array=new Array();
                    if (treedropevt.dragSource.hasFormat("items"))
                        items=items.concat(treedropevt.dragSource.dataForFormat("items") as Array);
                    var parentItem:Object;
                    parentItem=getObjectTarget();
                    /* if (tree.dataDescriptor.isBranch(tree.indexToItemRenderer(index).data))
                       parentItem=tree.indexToItemRenderer(index).data;
                       else
                       var dropParentPackage:Object = tree.mx_internal::_dropData.parent as Object;
                       Alert.show("HAck"+dropParentPackage.toString());
                       parentItem=tree.getParentItem(tree.indexToItemRenderer(index).data);
                       //Alert.show("Lenght "+ObjectUtil.getClassInfo(parentItem).properties.length);
                    //Alert.show("Lenght "+ObjectUtil.getClassInfo(parentItem).properties.length);
                    var position:int=0;
                    /* if(ObjectUtil.getClassInfo(parentItem).properties.length==0)
                       Alert.show("Returning");
                       return;
                    if (parentItem != null)
                        try
                            while (tree.indexToItemRenderer(index).data != parentItem)
                                //Alert.show(tree.indexToItemRenderer(index).data.toString());
                                if (index > 0)
                                    index--;
                                //Alert.show("Insiade");
                                position++;
                        catch (e:Error)
                            Alert.show("Catch" + index.toString());
                            return;
                    for each (var item:Object in items)
                        var obj:Object=new Object()
                        obj.label=item.label as String;
                        if (parentItem != null)
                            //Alert.show("ADDED");                       
                            tree.dataDescriptor.addChildAt(parentItem, obj, position++);                       
                        else
                            //Alert.show("PARENT NULL");
                            tree.dataDescriptor.addChildAt(tree.selectedItem, obj, position++);                       
                        var spth:String=homePath.concat(item.label);
                        //Alert.show(spth);   
                        var dpth:String=destPath.concat(item.label);
                        //Alert.show(dpth);
                        if (result == true)
                            removeItems();
                                //FlexDnDRemoteService.process(eid,"move",spth,dpth);
                        else
                            //FlexDnDRemoteService.process(eid,"copy",spth,dpth);
                        tree.validateNow();
                public function getObjectTarget():Object
                    var dropData:Object=tree.mx_internal::_dropData as Object;
                    if (dropData.parent != null)
                        return dropData.parent;
                    else
                        // if there is not parent (root of the tree), I take the root directly
                        var renderer:IListItemRenderer=tree.indexToItemRenderer(0);
                        return renderer.data;
                public function removeItems():void
                    //remove moved elements
                    var items:Array=treedropevt.dragSource.dataForFormat("items") as Array;
                    var coll:ArrayCollection=list.dataProvider as ArrayCollection;
                    for each (var item:Object in items)
                        if (coll.contains(item))
                            coll.removeItemAt(coll.getItemIndex(item));
                private var treedropevt:DragEvent;
                public function onTreeDragDrop(event:DragEvent):void
                    treedropevt=event;
                    showAlert();
                    event.preventDefault();
                    tree.hideDropFeedback(event);
                public function resultHandler(event:ResultEvent):void
                    Alert.show("Success", "Status");
                public function faultHandler(event:FaultEvent):void
                    Alert.show(event.fault.faultString, "Failure");
            ]]>
        </mx:Script>
        <mx:ArrayCollection id="listDP">
            <mx:Object label="File1.dnd"/>
            <mx:Object label="File2.dnd"/>
            <mx:Object label="File3.dnd"/>
            <mx:Object label="File4.dnd"/>
            <mx:Object label="File5.dnd"/>
        </mx:ArrayCollection>
        <mx:Number id="lastRollOverIndex"/>
        <!--
             <mx:ArrayCollection id="treeDP">
             <mx:Object label="/home">
             <mx:children>
             <mx:Object label="dummy1.ks"/>
             <mx:Object label="dummy2.ks"/>
             <mx:Object label="e493126">
             <mx:children>
             <mx:ArrayCollection>
             <mx:Object label="/home/e493126/sample1.ks"/>
             </mx:ArrayCollection>
             </mx:children>
             </mx:Object>
             </mx:children>
             </mx:Object>
             </mx:ArrayCollection>
        -->
        <mx:ArrayCollection id="treeDP">
            <mx:Object label="/dndDest">
                <mx:children>
                    <mx:ArrayCollection>
                        <mx:Object label="sample1.ks"/>
                        <mx:Object label="sample2.ks"/>
                        <mx:Object label="sample3.ks"/>
                        <mx:Object label="sample4.ks"/>
                        <mx:Object label="sample5.ks"/>
                        <mx:Object label="sample6.ks"/>
                    </mx:ArrayCollection>
                </mx:children>
            </mx:Object>
        </mx:ArrayCollection>
        <mx:List id="list"
                 itemRollOver="lastRollOverIndex = event.rowIndex"
                 width="50%"
                 dragEnabled="true"
                 dataProvider="{listDP}"
                 labelField="label"
                 allowMultipleSelection="true"
                 dragMoveEnabled="false">
        </mx:List>
        <mx:Tree id="tree"
                 width="50%"            
                 dragEnabled="true"            
                 dataProvider="{treeDP}"            
                 dragEnter="onTreeDragEnter(event)"
                 dragOver="onTreeDragOver(event)"
                 dragExit="onTreeDragExit(event)"
                 dragDrop="onTreeDragDrop(event)"
                 labelField="label"
                 liveScrolling="true">
        </mx:Tree>
        <mx:RemoteObject id="FlexDnDRemoteService"
                         showBusyCursor="true"
                         destination="FlexDnD">
            <mx:method name="process"
                       result="resultHandler(event)"
                       fault="faultHandler(event)"/>
        </mx:RemoteObject>
    </mx:Application>
    Thanks,
    Rajiv

    Ya , i have searched and have used the same code.
    But needed to customize few things like:
    stop dnd in same tree
    drop some item into a folder ..( onto it ) etc
    have achieved the same .. but this issue ..
    i think the tree dataprovider (contents internally is not being updated .. only the UI)
    any suggestions ?
    - Rajiv

  • Drag And Drop in ALV Column Tree

    Hello All,
    Can anyone tell me the method used for  a drag and drop in a column tree....
    i found it for a simple tree but not for a column tree.....
    thanks in advance....
    Regards,
    Praveen

    Check the links -
    drag drop required for alv column!
    drag and drop in a tree
    Drag&Drop within the Tree
    Drag&Drop within a tree
    Drag and drop in ALV tree
    Regards,
    Amit
    Reward all helpful replies.

  • HT1386 Can I manually drag and drop a playlist from an itunes account different from my own?

    Can I manually drag and drop a playlist from an itunes account other than my own?

    Yes but then all your music will be erased and replace by the new playlist.

  • How do I manually drag and drop songs from music library to iPhone 4 using iTunes 11?

    How do I manually drag and drop songs from music library to iPhone using iTunes 11?

    If you manually manage music... on iTunes 11, go to the top left corner and there will be a pull down bar. Click "show menu bar". From there, go to view, then show sidebar. Magically, it looks like the previous versions of iTunes. Took me 3 hours of trial and error and searching through forums to figure out. Tried calling Apple to have them walk me through it and they said they wouldn't help me since I don't have Apple Care. Whatever. Hope this helps!!

  • How to manually drag and drop songs from music library to iPod Shuffle using iTunes 11?

    In iTunes 10, it's simple to just drag and drop a few songs manually from the library/playlist to the Shuffle.  In iTunes 11, Shuffle has its own window.  How do you manually drag and drop songs from music library/playlist to iPod Shuffle using iTunes 11?

    If you manually manage music... on iTunes 11, go to the top left corner and there will be a pull down bar. Click "show menu bar". From there, go to view, then show sidebar. Magically, it looks like the previous versions of iTunes. Took me 3 hours of trial and error and searching through forums to figure out. Tried calling Apple to have them walk me through it and they said they wouldn't help me since I don't have Apple Care. Whatever. Hope this helps!!

  • Can not drag and drop from iTunes to my iPod

    I upgraded to iTunes 10.5 and now can not can not drag and drop from a playlist to my iPod

    Is the manually manage music and videos option still selected from under the iPod's Summary tab?  What happens when you try to drag files over to your iPod Classic?
    B-rock

  • I am trying to drag and drop one page of a .pdf into another .pdf in Acrobat Reader.  I used to be able to drag and drop from one .pdf to another.

    I am trying to drag and drop one page of a .pdf into another .pdf in Acrobat Reader.  I used to be able to drag and drop from one .pdf to another.

    If you could drag and drop pages before, it wasn't in Reader. You no doubt had Adobe Acrobat (Pro or Standard) which shouldn't be confused with Adobe Acrobat Reader. They recently added Acrobat to the name of Adobe Reader so the confusion about which product you had and/or have is understandable.

  • Downloads dragged and dropped from Firefox download window into Outlook e-mail show as file location text.

    I have a user who normally can drag files from Firefox's Download window into an e-mail in Outlook and it creates an attachment of that file in the e-mail. However, lately, the dragged .pdf or whatever file only shows up as a text file location like:
    \\file:%Downloads%\randomfile.pdf
    It's not a link either, it's just the text.
    I've tried doing a repair of Outlook.
    I've uninstalled and reinstalled Firefox 19.
    I've tested dragging items from the desktop to the e-mail and it works fine.
    I can't drag and drop from the Downloads window to the desktop.
    I just wanted to add this user is using Windows XP Pro.

    I can confirm that this is an issue with the newest release of Firefox. I just upgraded my Firefox, which was previously 18.02 to 19.0 and now I'm getting the same error. It's a bug.

  • I can't drag and drop from a data CD I recorded

    I recently burned some audiobooks files (in mp3 format) as data cd's in Toast 8.0.1. When I go to reload them back onto my 20" 2 Ghz Dual Core Intel I can't drag and drop the files directly into any folder while using the columns view in a finder window. I can do it if I drag onto the music folder and let it spring open down to the level of the folder. I also can drag the mp3's into iTunes and then into the folder. This is not CD related since I used several diff brands.
    I constantly update, backup, repair permissions, and do other maintenance so everything is up to date. I have noticed this behavior just since I started to use the program called Audiobook Builder. I am (and have always used) a non-admin user account. When this started a few months ago it seemed to go away with a restart, permission repair, or a logout but now it seems permanant. I checked user permissions on my home folder - I have not added any software since adding Audiobook Builder. Any idea's? I read something about trashing a com.apple pref but didn't try that.
    I suspect Audiobook Builder since it changes the permissions and filetype to the iTunes Audiobook filetype but have not seen anyone reference this.
    wes

    dj_paige wrote:
    While the programming of course could be done, the idea of a function that performs on original unprocessed images seems to violate the whole idea of what Lightroom was designed to be. At least that's my opinion. Of course, the idea that Adobe should do this programming for a relatively small number of people (you're one of a very few people to ask for this, that I have read) seems to be something that isn't going to happen.
    I agree, I can't see much reason for drag-and-drop to drag the unprocessed image - in other words, an image that isn't the one that you see when you drag and drop.  I can see that just filling this forum with "why the heck does it do that????????" posts.  I could be wrong, but I suspect that Adobe won't do that. 
    But if you do want to drag-and-drop the original unprocessed image, you can do it very easily now.  Right click the image, choose "show in Explorer", and then drag-and-drop from Explorer. 

  • I can't drag and drop from windows explorer into my ipod on itunes. Any suggestions?

    Hi,
    I manage my music/podcast library on my Vista PC using windows explorer because I don't like how iTunes does it. Then today I can no longer drag and drop from explorer onto my iPod in iTunes all I get is a circle with a line through it meaning "iTunes says no." Any suggestions?
    Ta.

    You will need to Sync your iPad and all Music/Albums Selected will transfer over from iTunes..
    iOS: Syncing your data with iTunes
    http://support.apple.com/kb/HT1386

  • Drag and Drop from LR to other applications

    There was a thread going on D&D from LR to explorer.
    The other appliation problem I have is the apparent inability to drag and drop from lightroom into a file transfer window (e.g., file upload with SmugMug).
    The quick collection is an awesome way to organize a storyline of images from a shoot, select only the images needed, and prepare a shoot for upload. However, short of exporting to a folder first, is there a way to just drag and drop the file set from a LR view (filmstrip or thumbs) to another app? This would just be providing file handles, and I would be satisfied if it only grabbed the original images (pre-"develop").
    Anyone have any luck with this?
    -- Jeff

    No. And not likely anytime soon. Putting a Pointer/alias to SmugMug (if it is an uploader client app, not familiar with it) in the Export Actions Folder for Post Processing from Export is the best you can do at the monemt. To get LR rdits out of LR you have to Export. D&D just isn't going to do that for you.
    Don
    Don Ricklin, MacBook 1.83Ghz Duo 2 Core running 10.4.9 & Win XP, Pentax *ist D
    http://donricklin.blogspot.com/

  • Drag and drop from Lightroom into Premiere doesn't work in Windows

    I recently switched from OSX to Windows and noticed that in Windows, I'm unable to drag and drop from LIghtroom into Premiere. In OSX, it worked fine.
    I do this a lot because it's a time saver. I basically use lightroom to find the photo or video clip I need for my editing project and then just drag in right on to the Premiere timeline. Now I have to do the extra step in Lightroom of "show in explorer", then drag the file from explorer to Premiere. Not really a big deal but just curious why it works in OSX and not Windows.
    I'm running latest Windows 8.1, Lightroom 5.4, Camera Raw 8.4, and Premiere Pro CC 7.2.2 (33)
    -Pete

    Hi Pete,
    You can obtain scripts here:
    http://www.robcole.com/Rob/ProductsAndServices/MiscLrPlugins#MiscScripts
    You'll have to edit lua code to adapt for Premiere. Not that hard really (e.g. clone, then change the script name and path to executable..), but may be too intimidating for some folks. If you are one of those folks, go for the plugin instead - it's usable via GUI - no lua code - can probably accomplish the same thing.
    http://www.robcole.com/Rob/ProductsAndServices/OpenInWhateverLrPlugin
    Let me know (outside the forum please) if problems - thanks,
    Rob

  • Can't drag and drop from page view

    Can't drag and drop from page view to desktop even though plus icon shows up for duplicating the page.  On Mac 10.9.2 Acrobat XI. I don't want to extract through the menu and associated dialogues.  Its slow and cumbersome.

    Hi Peterbruce,
    Acrobat for Windows will let you select pages in the Pages panel and drag them to your desktop, but that isn't an option in Acrobat for Mac OS. You can drag thumbnails from the Pages panel in one doc, to the Pages panel in another, however.
    Best,
    Sara

  • Can't drag and drop from Address Book to Mail?

    Hi,
    I have always used Address Book to store my email contact information in SL. When I wanted to send an email, I would drag and drop from Address Book to the "To:" field in Mail and it would add the contact information to Mail. I upgraded to Lion, and now when I try this, the address icon moves like it should, the little green circle with the + in it appears when I hover over the field, but when I release it does not add the address to Mail. The drag and drop does not work at all, but it looks like it should. I have searched all around but have not found any information about this. Does anyone know what's up with this? How can I fix it? Thanks in advance.

    Are you dragging from the actual AddressBook application, or the Address icon you can add to the NewMail and Reply toolbars in Mail?  (It ought to be there by default, but isn't).
    Either should work, but if AB doesn't, try the icon method:

Maybe you are looking for