Skip to content

Commit

Permalink
Implemented delete operations on drag
Browse files Browse the repository at this point in the history
  • Loading branch information
ELLIOTTCABLE committed Jan 15, 2009
1 parent 3d309f4 commit 815beb5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion TypingTutor/BigLetterView.m
Expand Up @@ -139,7 +139,15 @@ - (void)insertBacktab:(id)sender { [[self window] selectKeyViewPrecedingView:sel
- (void)deleteBackward:(id)sender { [self setString:@" "]; }

- (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal {
return NSDragOperationCopy;
return NSDragOperationCopy | NSDragOperationDelete;
}

- (void)draggedImage:(NSImage *)image
endedAt:(NSPoint)screenPoint
operation:(NSDragOperation)operation {
if (operation == NSDragOperationDelete) {
[self setString:@""];
}
}

- (void)mouseDown:(NSEvent *)event {
Expand Down

0 comments on commit 815beb5

Please sign in to comment.