Drag and Drop Weirdness?
Drag and Drop Weirdness?
- Subject: Drag and Drop Weirdness?
- From: Jerry LeVan <email@hidden>
- Date: Mon, 25 Nov 2002 18:23:41 -0500
After dancing around with drag and drop with a few simple examples I decided
to try and add it to my CSV editor.
The editor window contains a tableView and a couple of buttons. I targeted
the scrollview that wraps the actual table view for the target of the drag
protocol.
After a few false starts it is kinda working, If I drag a file with the
finder onto the table view and release the mouse button, I capture the
pathname and send a message to the main controller to fill the table. The
table is then displayed ok.
The problem is that my highlighting does *not display* until I release the
mouse button. The code that highlights the scrollview is in the
draggingEntered method.
...
[self lockFocus];
NSRect theFrame = [self bounds];
[[NSColor keyboardFocusIndicatorColor] set];
NSBezierPath *thePath = [NSBezierPath bezierPathWithRect:theFrame];
[thePath setLineWidth:5];
[thePath stroke];
[self unLockFocus];
NSLog(@"Finished outline");
I get the "Finished outline" message in the log but the blue frame does not
appear! (until I release the mouse).
The same code seems to work "properly" if I target a textInfo field, ie as
soon as I enter the textInfo field the outline is drawn.
What am I overlooking?
--Jerry
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.