• 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: NSPasteBoard - Copying contents of NSTextField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPasteBoard - Copying contents of NSTextField


  • Subject: Re: NSPasteBoard - Copying contents of NSTextField
  • From: Fritz Anderson <email@hidden>
  • Date: Tue, 9 Dec 2003 15:44:08 -0600

You have to send declareTypes:owner: to the pasteboard before putting data into it.

-- F

On 9 Dec 2003, at 2:24 PM, Oliver Cameron wrote:

Im trying to copy the contents of a NSTextField (the NSTextField is:
webColorTextField)
...
- (void)copyContents:(id)sender
{
NSPasteboard *thePasteboard = [NSPasteboard generalPasteboard];
[thePasteboard setString:[webColorTextField stringValue]
forType:NSStringPboardType];
}
...
_______________________________________________
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: 
 >NSPasteBoard - Copying contents of NSTextField (From: Oliver Cameron <email@hidden>)

  • Prev by Date: Shifting of NSSearchFieldCell
  • Next by Date: Re: CGShading line, triangle?
  • Previous by thread: NSPasteBoard - Copying contents of NSTextField
  • Next by thread: Delay when clicking cancel button in NSSearchFieldCell
  • Index(es):
    • Date
    • Thread