• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
drag and drop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

drag and drop


  • Subject: drag and drop
  • From: Valerio Ferrucci <email@hidden>
  • Date: Tue, 7 Mar 2006 13:10:57 +0100

Hi,
I'm new to cocoa and I'm trying to implement drag and drop to the window of my app.


I followed the steps in "http://developer.apple.com/documentation/ Cocoa/Conceptual/DragandDrop/index.html".

In IB I put a CustomView in the window and set as CustomClass of the view "MyClass" (extending NSView).

Then I declared in "MyClass" the methods:

initWithFrame
draggingEntered
draggingExited
performDragOperation

but the last three methods are never called!

Am I forgetting something?

This is my initWithFrame method (I'm beginning with .mov files):

- (id)initWithFrame:(NSRect)frameRect
{
	if ((self = [super initWithFrame:frameRect]) != nil)
	{
		NSString *pboardType = NSCreateFileContentsPboardType(@"mov");
		NSArray *dragTypes = [NSArray arrayWithObject:pboardType];
		[self registerForDraggedTypes:dragTypes];
		highlight = NO;
	}
	return self;
}

==================================================================
Valerio Ferrucci                        Tabasoft Sas
email@hidden                    http://www.tabasoft.it


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: drag and drop
      • From: David Kennedy <email@hidden>
  • Prev by Date: Re: sudo shutdown -c now
  • Next by Date: Copying a view from one nib to another
  • Previous by thread: Re: sudo shutdown -c now
  • Next by thread: Re: drag and drop
  • Index(es):
    • Date
    • Thread