• 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
Pasteboard substitution
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Pasteboard substitution


  • Subject: Pasteboard substitution
  • From: Quentin Mathé <email@hidden>
  • Date: Fri, 11 Jul 2003 16:47:12 +0200

Is it possible to take a snapshot of the current general pasteboard, replace it temporarly with a custom one, and restore it at the end ?

I want to do something like the following pseudo code :

defaultPasteboard = [[NSPasteboard generalPasteboard] copy]; // take a snapshot
[NSPasteboard setGeneralPasteboard:[NSPasteboard pasteboardWithName:NSGeneralPboard]]; // substitute

... // here I do what I need, with the new pasteboard and pbcopy pbpaste command line tools

[NSPasteboard setGeneralPasteboard:defaultPasteboard]; // restore
[defaultPasteboard release];

Any ideas ?

Quentin.

--
Quentin Mathi
email@hidden
_______________________________________________
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.

  • Prev by Date: Re: Random number
  • Next by Date: Re: Random number
  • Previous by thread: Re: Xcode - ___gxx_personality_v0 symbol error
  • Next by thread: Install two Mac OSX on one computer
  • Index(es):
    • Date
    • Thread