From 5526ad8daf03df6ed397786bbee7edd1a60ac418 Mon Sep 17 00:00:00 2001 From: Richard Frith-MacDonald Date: Thu, 11 Sep 1997 13:40:01 +0000 Subject: [PATCH] Added methods to ask the pasteboard owner to provide data. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2413 72102866-910b-0410-8b05-ffd578937521 --- Source/NSPasteboard.m | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Source/NSPasteboard.m b/Source/NSPasteboard.m index ace10ce20..a37911348 100644 --- a/Source/NSPasteboard.m +++ b/Source/NSPasteboard.m @@ -551,7 +551,7 @@ static id the_server = nil; { d = [target dataForType: dataType oldCount: changeCount - mustBeCurrent: useHistory]; + mustBeCurrent: (useHistory == NO) ? YES : NO]; } NS_HANDLER { @@ -597,6 +597,11 @@ static id the_server = nil; provideDataForType:(NSString *)type {} +- (void)pasteboard:(NSPasteboard *)sender +provideDataForType:(NSString *)type + andVersion:(int)version +{} + - (void)pasteboardChangedOwner:(NSPasteboard *)sender {} @@ -604,6 +609,18 @@ provideDataForType:(NSString *)type @implementation NSPasteboard (GNUstepExtensions) +- (id)askOwner:(id)anObject toProvideDataForType:(NSString*)type +{ + [anObject pasteboard:self provideDataForType:type]; + return self; +} + +- (id)askOwner:(id)obj toProvideDataForType:(NSString*)type andVersion:(int)v +{ + [obj pasteboard:self provideDataForType:type andVersion:v]; + return self; +} + /* * Once the '[-setChangeCount:]' message has been sent to an NSPasteboard * the object will gain an extra GNUstep behaviour - when geting data