• 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: Drag and drop color swatches
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drag and drop color swatches


  • Subject: Re: Drag and drop color swatches
  • From: email@hidden (Heinrich Giesen)
  • Date: Wed, 8 Dec 2004 12:34:36 +0100

Hello ,

On 08.12.2004, at 07:29, Christopher Drum wrote:

The problem I'm having is with the
NSColorPboardType.

Your code is too complicated. I do not know why you declare
the NSStringPboardType and why you use an archiver. Since my
NeXTStep times I rarely needed an archiver. This is because
"the system" does it all for you. Try this:

NSColor *dragColor = [self color];
[pb declareTypes:[NSArray arrayWithObject:NSColorPboardType] owner:self];
[dragColor <x-tad-bigger>writeToPasteboard:pb</x-tad-bigger>];

You read a color from the pasteboard with:
<x-tad-bigger>color = [NSColor colorFromPasteboard:</x-tad-bigger><x-tad-bigger>pasteBoard];</x-tad-bigger>

(See the docs for NSColor)

Heinrich Giesen


--
Heinrich Giesen

email: email@hidden


 _______________________________________________
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 color swatches
      • From: Christopher Drum <email@hidden>
  • Prev by Date: Re: [OT] Document Icon Templates
  • Next by Date: If statement evaluation with logical AND
  • Previous by thread: Re: Drag and drop color swatches
  • Next by thread: Re: Drag and drop color swatches
  • Index(es):
    • Date
    • Thread