• 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
NSTableView drop targeting error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTableView drop targeting error


  • Subject: NSTableView drop targeting error
  • From: Jesse Grosjean <email@hidden>
  • Date: Tue, 6 Apr 2004 09:20:18 -0400

When dropping onto an empty table view (at the very top of the view) I'm getting the console error:

ERROR: Attempt to set dropRow=0, dropOperation=NSTableViewDropOn when [0 - 0] is valid range of rows.

I've even tried always returning NSDragOperationNone from the table views validateDrop method, but that doesn't seem to work, so I'm sure that I'm not setting the invalid drop target. I've also noticed that a number of other cocoa apps also have this error in the same situation, but others don't. This error message doesn't seem to cause any damage (application keeps running), but I'd like to make sure that I'm not doing anything wrong.

I can get rid of the error message by overriding NSTableView's

- (void)setDropRow:(int)row dropOperation:(NSTableViewDropOperation)op {
if (row == 0 && op == NSTableViewDropOn && [self numberOfRows] == 0) return;
[super setDropRow:row dropOperation:op];
}

method.

Does anyone know what's going on here, is this a reasonable approach to getting rid of the message?

Thanks,
Jesse
_______________________________________________
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.


  • Follow-Ups:
    • Re: NSTableView drop targeting error
      • From: Stéphane Sudre <email@hidden>
References: 
 >Icon and Text in NSTableView (From: Martin Redington <email@hidden>)
 >Re: Icon and Text in NSTableView (From: "M. Uli Kusterer" <email@hidden>)

  • Prev by Date: Re: Scrolling Back Terminal Window
  • Next by Date: Re: Scrolling Back Terminal Window
  • Previous by thread: Re: Icon and Text in NSTableView
  • Next by thread: Re: NSTableView drop targeting error
  • Index(es):
    • Date
    • Thread