• 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
Re: registering dragged types
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: Cocoa-dev Digest, Vol 7, Issue 621 (From: "ronald b. kopelman" <email@hidden>)

  • Prev by Date: Re: NSTextField sending action unbidden...
  • Next by Date: SQLite Database 2 distinct database iphone.
  • Previous by thread: Re: Cocoa-dev Digest, Vol 7, Issue 621
  • Next by thread: Ignore last problem...
  • Index(es):
    • Date
    • Thread