Re: -draggingEntered: never gets called [SOLVED]

2008-05-07 Thread Michael Gardner
It turns out that this was caused by manipulating the GUI outside the main thread. Once I realized that and refactored accordingly, the issue went away. No wonder I was having trouble duplicating the symptoms! Thanks to everybody who helped me figure this out. -Michael On May 5, 2008, at

Re: -draggingEntered: never gets called [solved?]

2008-05-06 Thread Michael Gardner
If so, it should be documented. As soon as I can get together a working test case, I'll submit a bug report. It would be nice to get some confirmation from an Apple engineer, though, since I'm having trouble duplicating the issue. -Michael On May 6, 2008, at 6:30 PM, Graham Cox wrote: I'm

Re: -draggingEntered: never gets called [solved?]

2008-05-06 Thread Michael Gardner
Which is irrelevant, since I'm constructing my views programatically. Anyway, I've long since verified that my methods are all getting called as expected (except for -draggingEntered:, of course). -Michael On May 6, 2008, at 6:24 PM, Kyle Sluder wrote: On Tue, May 6, 2008 at 10:44 AM, Micha

Re: -draggingEntered: never gets called [solved?]

2008-05-06 Thread Graham Cox
I'm not sure if it's documented as such, but I *think* this is expected behaviour. The reality is that the dragging is really implemented by the underlying window (ultimately using Carbon) so if the view has no reference to its window when the drag types are registered, they probably just "

Re: -draggingEntered: never gets called [solved?]

2008-05-06 Thread Kyle Sluder
On Tue, May 6, 2008 at 10:44 AM, Michael Gardner <[EMAIL PROTECTED]> wrote: > My actual init method has a different signature, and calls -initWithFrame: > on its superclass. I was trying to abstract away extra details, but I > shouldn't have made it look like an actual method signature. Sorry about

Re: -draggingEntered: never gets called [solved?]

2008-05-06 Thread Michael Gardner
On May 6, 2008, at 10:47 AM, I. Savant wrote: On Tue, May 6, 2008 at 11:34 AM, Michael Gardner <[EMAIL PROTECTED]> wrote: Upon further investigation, I've found that if I call -registerForDraggedTypes: before adding the view to its parent window with -setContentView:, I never get the -draggi

Re: -draggingEntered: never gets called [solved?]

2008-05-06 Thread I. Savant
On Tue, May 6, 2008 at 11:34 AM, Michael Gardner <[EMAIL PROTECTED]> wrote: > Upon further investigation, I've found that if I call > -registerForDraggedTypes: before adding the view to its parent window with > -setContentView:, I never get the -draggingEntered: messages. If I do so > afterwards, e

Re: -draggingEntered: never gets called [solved?]

2008-05-06 Thread Michael Gardner
Upon further investigation, I've found that if I call - registerForDraggedTypes: before adding the view to its parent window with -setContentView:, I never get the -draggingEntered: messages. If I do so afterwards, everything works properly. Is this expected behavior? As for posting the co

Re: -draggingEntered: never gets called [solved?]

2008-05-06 Thread I. Savant
On Tue, May 6, 2008 at 10:44 AM, Michael Gardner <[EMAIL PROTECTED]> wrote: > My actual init method has a different signature, and calls -initWithFrame: > on its superclass. I was trying to abstract away extra details, but I > shouldn't have made it look like an actual method signature. Sorry about

Re: -draggingEntered: never gets called [solved?]

2008-05-06 Thread Michael Gardner
My actual init method has a different signature, and calls - initWithFrame: on its superclass. I was trying to abstract away extra details, but I shouldn't have made it look like an actual method signature. Sorry about that. -Michael On May 6, 2008, at 9:34 AM, I. Savant wrote: With help

Re: -draggingEntered: never gets called [solved?]

2008-05-06 Thread Andy Lee
I haven't been following this thread and I'm not sure this would make a difference, but do you really mean -init:, or -initWithFrame:? --Andy On May 6, 2008, at 10:27 AM, Michael Gardner wrote: With help from Stéphane Sudre, I found that calling - registerForDraggedTypes: somewhere outside t

Re: -draggingEntered: never gets called [solved?]

2008-05-06 Thread I. Savant
> With help from Stéphane Sudre, I found that calling > -registerForDraggedTypes: somewhere outside the destination's -init: method > solves the issue. Can anyone shed light on why this would be? I've never personally experienced the problem you're describing, but if you're literally calling thi

Re: -draggingEntered: never gets called [solved?]

2008-05-06 Thread Michael Gardner
With help from Stéphane Sudre, I found that calling - registerForDraggedTypes: somewhere outside the destination's -init: method solves the issue. Can anyone shed light on why this would be? My views are created programatically rather than loaded from a .nib, so there shouldn't be any interf

Re: -draggingEntered: never gets called

2008-05-05 Thread Michael Gardner
The source implements -draggingSourceOperationMaskForLocal: and - mouseDown: (for initiating the drag). The destination implements -draggingEntered:, - prepareForDragOperation:, and -performDragOperation:. I checked the pasteboard's types list, and the result is as expected. For reference,

Re: -draggingEntered: never gets called

2008-05-05 Thread Stéphane Sudre
On May 5, 2008, at 11:02 PM, Michael Gardner wrote: I'm trying to implement drag & drop in an NSView subclass. I made sure that the source returns NSDragOperationMove in - draggingSourceOperationMaskForLocal:, and that the destination calls -registerForDraggedTypes: with the same (custom) ty

-draggingEntered: never gets called

2008-05-05 Thread Michael Gardner
I'm trying to implement drag & drop in an NSView subclass. I made sure that the source returns NSDragOperationMove in - draggingSourceOperationMaskForLocal:, and that the destination calls - registerForDraggedTypes: with the same (custom) type that the source uses for the drag operation. Th