Re: registering dragged types
Re: registering dragged types
- Subject: Re: registering dragged types
- From: Jens Alfke <email@hidden>
- Date: Sun, 6 Jun 2010 13:08:45 -0700
On Jun 6, 2010, at 12:25 PM, ronald b. kopelman wrote:
> However, changing the line:
>
>> [self registerForDraggedTypes: [NSArray arrayWithObject: NSFilenamesPboardType]];
>
> to
>
> [self registerForDraggedTypes:[NSArray arrayWithObjects:NSFilenamesPboardType, nil]];
>
> might help.
No, those two NSArray calls have exactly the same effect, creating an array with a single object. I prefer the first since it’s shorter and you don’t have to remember to put the “,nil” at the end. (At least you get a compiler warning in 10.5+ if you forget. It used to just crash at runtime.)
—Jens
PS: When replying to a digest, remember to update the subject line to match the message you’re replying to, so it’s not the generic “Re: Cocoa-dev Digest…”. Thanks._______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden