Great, that's what I needed to know.  =)

Dave

On Jul 18, 2009, at 12:40 PM, Michael Hoy wrote:

Dave,

I've worked with UIPasteboard, which I'm assuming is similar. dataForType: will contain string data if it's a type such as UTF8 text. My own "PasteboardItem" class had just "data" (NSData) and "type" (NSString) properties, and it's worked fine for everything. Once you have the type and data, you can then write methods to convert to strings or whatnot.

Michael Hoy
michael.john....@gmail.com


On Jul 18, 2009, at 1:52 PM, Dave DeLong wrote:

Hi everyone,

I'm playing around with NSPasteboard in 10.5 and want to basically create a copy of the generalPasteboard. I've got two classes: DDPasteboard and DDPasteboardItem. DDPasteboard has a to-many relationship with DDPasteboardItem.

What I'm wondering is this: do I need to have separate string and data properties in DDPasteboardItem? I see that I can grab stringForType: and dataForType: from the pasteboard, but what's the difference between them (other than one returning an NSString and the other an NSData)? In the documentation I see that stringForType: just invokes dataForType:, but is there ever an instance where stringForType: would return something different than can be inferred from dataForType:?

Thanks,

Dave DeLong
_______________________________________________

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/michael.john.hoy%40gmail.com

This email sent to michael.john....@gmail.com


_______________________________________________

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 arch...@mail-archive.com

Reply via email to