Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

35 lines (29 sloc) 0.945 kb
# MetaWindow
# Created by Will Larson on 8/26/08.
# Copyright (c) 2008 Will Larson. All rights reserved.
import objc
from Foundation import *
from AppKit import *
class MWDragWindow(NSWindow):
controller = objc.IBOutlet()
def awakeFromNib(self):
def draggingEntered_(self,sender):
pboard = sender.draggingPasteboard()
types = pboard.types()
opType = NSDragOperationNone
if NSStringPboardType in types:
return NSDragOperationCopy
return opType
def performDragOperation_(self,sender):
pboard = sender.draggingPasteboard()
successful = False
if NSStringPboardType in pboard.types():
txt = pboard.stringForType_(NSStringPboardType)
successful = True
return successful
Jump to Line
Something went wrong with that request. Please try again.