> I've studied the pasteboard docs, and wonder if there is a simple way to > copy the contents of an NSString to the general clipboard. In AS or AS > Studio it's just "set the clipboard to <variable>." Is there such a > convenience method in Cocoa?
Study the docs again, the answers are there if you've carefully read the entire document: http://developer.apple.com/documentation/Cocoa/Conceptual/CopyandPaste/Articles/pbImplementing.html Cobbled-together example from example code found in the "Lazy Writing" section, only slightly modified: NSPasteboard *pb = [NSPasteboard generalPasteboard]; NSArray *types = [NSArray arrayWithObjects:NSStringPboardType, nil]; [pb declareTypes:types owner:self]; [pb setString:@"Read the docs carefully!" forType:NSStringPboardType]; -- I.S. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]