1
2
3 _gDropDataCallbacks = []
4
6 """Add a function to the list of callbacks. This function will called whenever data is dropped onto the DAG. Override it to perform other actions.
7 If you handle the drop, return True, otherwise return None."""
8 _gDropDataCallbacks.append(callback)
9
11 """Handle data drops by invoking the list of callback functions until one has
12 handled the event"""
13 for callback in reversed(_gDropDataCallbacks):
14 if callback(mimeType, text) == True:
15 return True
16 return None
17