• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
validateDrop called twice for same Event on TableView DataSource.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

validateDrop called twice for same Event on TableView DataSource.


  • Subject: validateDrop called twice for same Event on TableView DataSource.
  • From: Michael Clark <email@hidden>
  • Date: Fri, 24 Sep 2004 15:58:20 -0400

Hello.

I am experiencing a strange behavior with DnD and TableView.

I have a tableview displayed, with only a few items and a lot of white space below the items in the tableview.

I get the validateDrop DataSource called when I drag into the white space, with a row value of the number of rows in the tableview, and a taleview proposed drop operation of above.
For this I return NSDragOperationNone because I only want to link to items showing in the tableview.


The validateDrop method immediately gets called again, this time with row of count-1 (the last item in the tableview) and proposed operation of on.
Since this is validate I allow it and return NSDragOperationLink.


The problem is that I don't want the user to have the mouse cursor down in the white space, and then have the last row in the tableview highlighted with the outline. I would like the NSDragOperationNone to stick which I returned the first time the datasource method was called. I want the user to be hovering over the row it will be dropped onto.

I am very careful that my mouse cursor only enters into the tableview by 1 pixel, so that I know that I am not triggering this by moving the mouse around in the tableview.
In fact, I get the current event from the application and print out the window location and it is the same for both calls into the validateDrop method just to confirm this.


Does anyone have any ideas about this one?

TIA,
Michael.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Theft Recovery: Useful Tool or SpyWare?
  • Next by Date: Re: Refresh the Cursor
  • Previous by thread: Re: Loading a view from a nib multiple times
  • Next by thread: Re: Refresh the Cursor
  • Index(es):
    • Date
    • Thread