0

In OS X sierra 10.12 Drag and drop is not working properly with NSTabView.... Drag and drop seems to only work in label of TabView not the entire tab ..you can see in the following project sample...download Code OR here is code:-I have created a subClass AppMainTabSet OF NSTabView and use this class as a custom class of TabView In Interface Builder.....

 #import "AppMainTabSet.h"

@implementation AppMainTabSet


- (id)initWithCoder:(NSCoder *)coder
{
    /*------------------------------------------------------
     Init method called for Interface Builder objects
     --------------------------------------------------------*/
    self=[super initWithCoder:coder];
    if ( self ) {



    }
    return self;
}

- (void)awakeFromNib{

       [self registerForDraggedTypes:[NSArray arrayWithObject:NSFilenamesPboardType]];

    }


-(NSDragOperation) draggingEntered:(id < NSDraggingInfo >)sender
{
    NSLog(@"Hello Hello....draggingEntered");
    return NSDragOperationGeneric;
}




- (void)draggingExited:(id <NSDraggingInfo>)sender {
     NSLog(@"**** draggingExited*****");

}

- (BOOL) prepareForDragOperation:(id <NSDraggingInfo>)sender {
     NSLog(@"Hello Hello....prepareForDragOperation");
    return YES;
}



- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{

    NSLog(@"Hello Hello....performDragOperation");

    return YES;
}

- (void)concludeDragOperation:(id <NSDraggingInfo>)sender {
   NSLog(@"Hello Hello....concludeDragOperation");

    [[NSCursor arrowCursor] push];
    [self setNeedsDisplay:YES];
}

- (BOOL) processNSDraggingInfo:(id <NSDraggingInfo>)sender {


   NSLog(@"Hello Hello....processNSDraggingInfo");

    return YES;
}
M P
  • 352
  • 3
  • 14
Shiv Pogra
  • 93
  • 5
  • 2
    No, we are not going to see inside a project on dropbox. You need to isolate and share here the code section that performs the D&D. – Flint Sep 15 '16 at 18:11
  • I shared my Code ...you can please See ...again in the question – Shiv Pogra Sep 20 '16 at 05:28
  • Did it work in (previous) versions of OS X? – Willeke Sep 20 '16 at 21:51
  • Yes it is working even now till 10.11.6 but as soon as we upgraded one of system to Sierra beta it is not working. Though Sierra is out on 20th Sept so may be Apple has fixed it. Here is another lead to it https://forums.balsamiq.com/t/cannot-drag-and-drop-elements-macos-sierra/2868/29. (@Shiv is my teammate so I am just updating it on behalf of him). – M P Sep 21 '16 at 01:58
  • It is still same after upgrading to 10.12 final release on 20th Sept. – M P Sep 22 '16 at 01:11
  • it is still same after upgrading macOS sierra 10.12.1 Beta (16B2548a) – Shiv Pogra Oct 12 '16 at 14:21

0 Answers0