• 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: Dragging URL clippings into a Cocoa app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dragging URL clippings into a Cocoa app


  • Subject: Re: Dragging URL clippings into a Cocoa app
  • From: Chris Boot <email@hidden>
  • Date: Sat, 24 Aug 2002 23:13:15 +0200

Hi,

Thanks for helping. I just tried this and my NSOutlineView doesn't respond
to the drag at all. I'm using the following code to register the drag
types:

[linkList registerForDraggedTypes:[NSArray
arrayWithObjects:WebPadPboardType, WPURLClippingPBoardType,
NSStringPboardType, nil]];

WebPadPboardType is a type used for dragging within the application, and
WPURLClippingPBoardType is defined earlier in the file as:

static NSString *WPURLClippingPBoardType =
@"CorePasteboardFlavorType 0x75726C20";

Any ideas?

> URL clippings use a drag type that there isn't specific Cocoa API for.
> You need to register for the type:
> @"CorePasteboardFlavorType 0x75726C20"
>
> ... the number is hex for the four character constant 'url ' (note the
> space at the end).
>
> In general, this is how you tell a Cocoa app about Carbon/Classic drag
> flavors - they are all CorePasteboardFlavorType X, where X is the
> hexadecimal representation of the Carbon/Classic four character code.
>
> Hope this helps,
> - Greg
>
> On Saturday, August 24, 2002, at 11:58 AM, Chris Boot wrote:
>> Hi,
>>
>> I'm writing an open-source link manager called WebPad
>> (http://sourceforge.net/projects/tmdcwebpad/) and I've run into a
>> problem.
>> I've allowed NSStrings to be dragged into my Outline View, and I can
>> drag
>> links in from all applications EXCEPT I can't seem to drag URL
>> clippings in
>> at all. What do I need to do to accept a URL clipping drag and just
>> use the
>> URL that it contains (instead of the path to the clipping, which is
>> what I
>> get if I use NSURLPboardType) ?

--
Chris Boot
email@hidden

"To err is human. To really screw up, you need a computer." - Scott Adams
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Dragging URL clippings into a Cocoa app (From: Greg Titus <email@hidden>)

  • Prev by Date: where are the faster compilations?
  • Next by Date: Re: where are the faster compilations?
  • Previous by thread: Re: Dragging URL clippings into a Cocoa app
  • Next by thread: where are the faster compilations?
  • Index(es):
    • Date
    • Thread