Search Results

Search found 43406 results on 1737 pages for 'drag and drop files'.

Page 7/1737 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Cocoa Drag and Drop, reading back the data

    - by kodai
    Ok, I have a NSOutlineView set up, and I want it to capture PDF's if a pdf is dragged into the NSOutlineView. My first question, I have the following code: [outlineView registerForDraggedTypes:[NSArray arrayWithObjects:NSStringPboardType, NSFilenamesPboardType, nil]]; In all the apple Docs and examples I've seen I've also seen something like MySupportedType being an object registered for dragging. What does this mean? Do I change the code to be: [outlineView registerForDraggedTypes:[NSArray arrayWithObjects:@"pdf", NSStringPboardType, NSFilenamesPboardType, nil]]; Currently I have it set up to recognize drag and drop, and I can even make it spit out the URL of the dragged file once the drag is accepted, however, this leads me to my second question. I want to keep a copy of those PDF's app side. I suppose, and correct me if I'm wrong, that the best way to do this is to grab the data off the clipboard, save it in some persistant store, and that's that. (as apposed to using some sort of copy command and literally copying the file to the app director.) That being said, I'm not sure how to do that. I've the code: - (BOOL)outlineView:(NSOutlineView *)ov acceptDrop:(id <NSDraggingInfo>)info item:(id)item childIndex:(NSInteger)childIndex { NSPasteboard *pboard = [info draggingPasteboard]; NSURL *fileURL; if ( [[pboard types] containsObject:NSURLPboardType] ) { fileURL = [NSURL URLFromPasteboard:pboard]; // Perform operation using the file’s URL } NSData *data = [pboard dataForType:@"NSPasteboardTypePDF"]; But this never actually gets any data. Like I said before, it does get the URL, just not the data. Does anyone have any advise on how to get this going? Thanks so much!

    Read the article

  • iPhone: detect "touch-and-drag" gesture from UIBarButtonItem?

    - by Greg Maletic
    I have an "add" button that's represented by a UIBarButtonItem. Hitting the "add" button adds an object into a list that represents a moment in time. By default, that time is "now"...but I'd like to be able to use dragging behavior to let the user specify earlier times for the object. Here's the behavior I want to implement: If the user touches on the UIBarButtonItem and lets go quickly, an object is added to the list that represents "now." If the user touches on the UIBarButtonItem and drags, a little UI pops up that shows the time that the distance of their drag represents. The further they drag, the further back in time their touch will represent. When they let go, the object representing an earlier time will get added to the list. (Though the description of the behavior is complicated, I'm convinced this will be pretty intuitive for users of the app.) I haven't implemented code for anything but the most simple touches in the past, and I'm at a loss as to the best way to try this. Does anyone have any suggestions, or could point me towards some sample code that implements something like this? Thanks very much.

    Read the article

  • WPF Drag-to-scroll doesn't work correctly.

    - by Garegin
    Hi all, I am tying to realize a drag-to-scroll functionality in my application and have problems on my way. Can anybody help me? I have a ScrollViewer and inside it an ItemsControl and within ItemsTemplate I have a UserControl. I want to drag that UserControl within ItemsControl. I want the ScrollViewer to scroll down, when I am dragging to the boundaries of the ItemsControl. protected override void OnPreviewMouseMove(System.Windows.Input.MouseEventArgs e) { if (this.IsMouseCaptured) { // Get the new mouse position. Point mouseDragCurrentPoint = e.GetPosition(this); if (Math.Abs(mouseDragCurrentPoint.Y - this.ActualHeight) <= 50) { this._scrollStartOffset.Y += 5; _containingScrollViewer.ScrollToVerticalOffset(this._scrollStartOffset.Y); } if (mouseDragCurrentPoint.Y <= 50) { this._scrollStartOffset.Y -= 5; _containingScrollViewer.ScrollToVerticalOffset(this._scrollStartOffset.Y); } } base.OnPreviewMouseMove(e); } When i start dragging by calling DragDrop.DoDragDrop() scrolling don't happens. But when i disable dragging, the ScrollViewer scrolls down dependong on mouse position. Maybe there's something that i don't take into accont about dragging and Capturing the mouse? Thanks for attention. Garegin

    Read the article

  • Why do we need a format for binary executable files

    - by user3671483
    When binary files (i.e. executables) are saved they usually have a format (e.g. ELF or .out) where we have a header containing pointers to where data or code is stored inside the file. But why don't we store the binary files directly in the form of sequence of machine instructions.Why do we need to store data separately from the code?Secondly when the assembler creates a binary file is the file is among the above formats?

    Read the article

  • FOR command cannot see hidden files

    - by Synetech
    I’m struggling with one of the most frustrating bugs I’ve ever come across. Bug description:   The for command of the command-interpreter cannot see hidden files. Reproduction steps: Create a temporary directory Create a few files Assign a variety of attributes to the files (including hidden) Use a command like for %i in (*) do echo "%i" Expected results:    All files are processed in the for loop either by default or though a switch. Actual results: Files with any attribute other than hidden are processed; files flagged as hidden are skipped There is no switch to the for command to allow it to process hidden files Implications:    There is no way to process all files from the command-prompt. Question:    How the heck can hidden files be processed from the command-prompt or batch-files (at least in Windows if not DOS)?

    Read the article

  • Jquery drag /drop and clone

    - by Sajeev
    Hi I need to achive this .. I have a set of droppable items ( basically I am droping designs on a apparel ) and I am dropping a clone.. If I don't like the dropped object (designs) - I want to delete that by doing something like hidden . But I am unable to do that. Please help me.. here is the code var clone; $(document).ready(function(){ $(".items").draggable({helper: 'clone',cursor: 'hand'}); $(".droparea").droppable({ accept: ".items", hoverClass: 'dropareahover', tolerance: 'pointer', drop: function(ev, ui) { var dropElemId = ui.draggable.attr("id"); var dropElem = ui.draggable.html(); clone = $(dropElem).clone(); // clone it and hold onto the jquery object clone.id="newId"; clone.css("position", "absolute"); clone.css("top", ui.absolutePosition.top); clone.css("left", ui.absolutePosition.left); clone.draggable({ containment: 'parent' ,cursor: 'crosshair'}); $(this).append(clone); alert("done dragging "); /lets assume I have a delete button when I click that clone should dissapear so that I can drop another design - but the following code has no effect //and the item is still visible , how to make it dissapear ? $('#newId').css("visibility","hidden"); } }); });

    Read the article

  • QListWidget drag and drop items disappearing from list

    - by ppalasek
    Hello, I'm having trouble implementing a QListWidget with custom items that can be reordered by dragging and dropping. The problem is when I make a fast double click (a very short drag&drop) on an item, the item sometimes disappears from the QListWidget. This is the constructor for my Widget: ListPopisiDragDrop::ListPopisiDragDrop(QWidget *parent) : QListWidget(parent) { setSelectionMode(QAbstractItemView::SingleSelection); setDragEnabled(true); viewport()->setAcceptDrops(true); setDefaultDropAction(Qt::MoveAction); setDropIndicatorShown(true); setDragDropMode(QAbstractItemView::InternalMove); } also the drop event: void ListPopisiDragDrop::dropEvent(QDropEvent *event){ int startRow=currentIndex().row(); QListWidget::dropEvent(event); int endRow=currentIndex().row(); //more code... } Custom items are made by implementing paint() and sizeHint() functions from QAbstractItemDelegate. When the problem with disappearing items happens, the dropEvent isn't even called. I really don't know what is happening and if I'm doing something wrong. Any help is appreciated. Thanks! Edit: I'm running the application on a Symbian S60 5th edition phone. Edit2: If I add this line to the constructor: setDragDropOverwriteMode(true); the item in the list still disappears, but an empty row stays in it's place.

    Read the article

  • Drag and drop in as3 on specific path (ex bezier curve)

    - by abinop
    I need to implement a drag and drop functionality, where I can define and constraint the route of the draggable object. Like in http://www.kirupa.com/forum/showthread.php?t=330302 , only that i have the paths designed and not calculated by a math function. So, in fact, as mouse moves I need to tell the object to follow the custom path/movieclip.

    Read the article

  • WPF: Drag/Drop to re-order grid and jiggle

    - by Echilon
    I need to implement a grid in WPF which has squares that can be dragged/dropped to be re-ordered, but I'm not sure the best way to do it. I was thinking using an ObservableCollection of squares and a UniFormGrid but although I have experience with both WPF and drag/drop, ideally I'd like to do a kind of 'jiggle' when before the user releases the mouse. Any suggestions on a good starting point?

    Read the article

  • Testing drag-and-drop with Watir

    - by Marcel J.
    I'm evaluating Watir right now. While Selenium has a dragAndDropToObject command (which seems to be broken) Watir seems not to have such a command. I couldn't find a script/tutorial with an example of how to test DnD with Watir. Did anybody try/succeed in testing drag-and-drop with Watir? Btw.: I am using jQuery for the DnD implementation.

    Read the article

  • Drag and Drop file upload in Silverlight 4?

    - by Parvenu74
    I'm working on re-writing a WinForms application into Silverlight. One use case in the WinForms app allows users to drag TIFF images (of faxes) from Outlook directly onto an "attach an image or fax to this case" control in the WinForms app. Is there a Silverlight 4 control which allows for the same functionality? It's important to realize that saving the file to the local filesystem and then selecting and uploading the file with a standard upload control will not meet the business requirements as outlined in the project.

    Read the article

  • ActiveX Control Drag and Drop in C sharp

    - by Philip
    I'm making Windows Form App in C sharp and best control for what I need is ActiveX Control (Calendar). The problem is that I need drag and drop but Control that I use does not have events for it (only positive thing is that it has property "AllowDrop"). (Control is Xtreme Calendar - Codejock)

    Read the article

  • qt drop event get widget

    - by eyecreate
    I'm trying to, inside a dropevent method, find out which widget was just dropped. I tried looking at the docs, but they only have commands for images and text. How do I access both the item just dropped and which widget it was dropped on?(this is drag and drop inside of a QTreeWidget)

    Read the article

  • C# Drag and Drop - e.Data.GetData using a base class

    - by Dustin Brooks
    C# Winforms 3.5 I have a list of user controls all derived from one base class. These controls can be added to various panels and I'm trying to implement the drag-drop functionality, the problem I'm running in to is on the DragDrop event. The DragEventArgs: e.Data.GetData(typeof(baseClass)) doesn't work. It wants: e.Data.GetData(typeof(derivedClass1)) e.Data.GetData(typeof(derivedClass2)) etc... Is there a way I can get around this, or a better way to architect it?

    Read the article

  • Disable Drag-drop from TextBox

    - by viky
    I have a WPF textBox that is declared as ReadOnly <TextBox IsReadOnly="True" IsTabStop="False" Width="200" /> So, User can not write anything into the TextBox or delete the content but it still allows user to drag the text from this textbox and drop it in any other textbox that caused the text removed from the first textbox(the read-only one) and thats unexpected. Is it a bug? how can I get rid of this?

    Read the article

  • Delete Drag and Drop Behavior of IKImageBrowserView

    - by PF1
    Hi Everyone: By default (it seems), IKImageBrowserView enables drag and drop to locations in the Finder. I would like to turn off this behavior but am unsure of how to do so. I was thinking that perhaps implementing the NSDraggingDestination protocol and overriding it could solve this, but so far it hasn't worked for me. Thanks for any help!

    Read the article

  • Drag and drop into a browser application

    - by user272769
    We have a browser based application written in PHP in which I want to drag-n-drop files from the windows explorer or directly email attachments(this would be very cool). On dropping the files in the browser application, it should save it on a particular folder on the server. Any help on how this can be achieved would be really appreciated.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >