[Vm-dev] [commit][3720]
JMM ensure drag and drop works after optimization of window views,
need awakeFromNib
commits at squeakvm.org
commits at squeakvm.org
Mon May 16 21:09:33 UTC 2016
Revision: 3720
Author: johnmci
Date: 2016-05-16 14:09:31 -0700 (Mon, 16 May 2016)
Log Message:
-----------
JMM ensure drag and drop works after optimization of window views, need awakeFromNib
Modified Paths:
--------------
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXOpenGLView.m
Modified: branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXOpenGLView.m
===================================================================
--- branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXOpenGLView.m 2016-05-16 20:06:10 UTC (rev 3719)
+++ branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXOpenGLView.m 2016-05-16 21:09:31 UTC (rev 3720)
@@ -92,11 +92,16 @@
return self;
}
+- (void)awakeFromNib {
+ self = [self initWithFrame: self.frame pixelFormat: [[self class] defaultPixelFormat] ];
+ [self initialize];
+}
+
- (void)initialize {
inputMark = NSMakeRange(NSNotFound, 0);
inputSelection = NSMakeRange(0, 0);
[self registerForDraggedTypes: [NSArray arrayWithObjects: NSFilenamesPboardType, nil]];
- // NSLog(@"registerForDraggedTypes");
+ //NSLog(@"registerForDraggedTypes %@",self);
dragInProgress = NO;
dragCount = 0;
dragItems = NULL;
@@ -631,6 +636,8 @@
}
- (NSDragOperation)draggingEntered:(id < NSDraggingInfo >)info {
+// NSLog(@"draggingEntered %@",info);
+
if (self.dragInProgress)
return NSDragOperationNone;
dragInProgress = YES;
@@ -644,6 +651,7 @@
- (NSDragOperation) draggingUpdated: (id<NSDraggingInfo>)info
{
+// NSLog(@"draggingUpdated %@",info);
if (self.dragCount)
[(sqSqueakOSXApplication *) gDelegateApp.squeakApplication recordDragEvent: DragMove numberOfFiles: self.dragCount where: [info draggingLocation] windowIndex: self.windowLogic.windowIndex view: self];
return NSDragOperationGeneric;
@@ -651,6 +659,7 @@
- (void) draggingExited: (id<NSDraggingInfo>)info
{
+// NSLog(@"draggingExited %@",info);
if (self.dragCount)
[(sqSqueakOSXApplication *) gDelegateApp.squeakApplication recordDragEvent: DragLeave numberOfFiles: self.dragCount where: [info draggingLocation] windowIndex: self.windowLogic.windowIndex view: self];
self.dragCount = 0;
@@ -659,6 +668,7 @@
}
- (BOOL) performDragOperation: (id<NSDraggingInfo>)info {
+// NSLog(@"performDragOperation %@",info);
if (self.dragCount) {
self.dragItems = [self filterOutSqueakImageFilesFromDraggedFiles: info];
[(sqSqueakOSXApplication *) gDelegateApp.squeakApplication recordDragEvent: DragDrop numberOfFiles: self.dragCount where: [info draggingLocation] windowIndex: self.windowLogic.windowIndex view: self];
More information about the Vm-dev
mailing list