• 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
Re: NSTableView delete button
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView delete button


  • Subject: Re: NSTableView delete button
  • From: John Stiles <email@hidden>
  • Date: Fri, 29 Dec 2006 19:30:01 -0800

On Dec 29, 2006, at 7:19 PM, PGM wrote:


On 29-Dec-06, at 19:03 PM, Keith Duncan wrote:

I mean my idea of a per row delete button. I prototyped the interface to include a delete button but it threw it off. Having it per row makes a lot more sense and it keeps the UI clean.

- Keith


I actually agree with Scott and John, but for the sake of argument, this is how I would do it. I guess that your problem is that you want to know in which row the clicked button is situated. So connect a normal IBAction to your button and in that method get the coordinates of the sender (or of the mouse). Then use NSTableView's -rowAtPoint: to get which row you want. You can then remove the appropriate object from the array.

If you do this, make sure to use the point of the event, not the mouse's current location.
Otherwise, if there is some sort of event lag, the user might move the mouse and inadvertently delete the wrong thing.



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >NSTableView delete button (From: Keith Duncan <email@hidden>)
 >Re: NSTableView delete button (From: Scott Stevenson <email@hidden>)
 >Re: NSTableView delete button (From: Keith Duncan <email@hidden>)
 >Re: NSTableView delete button (From: John Stiles <email@hidden>)
 >Re: NSTableView delete button (From: Keith Duncan <email@hidden>)
 >Re: NSTableView delete button (From: John Stiles <email@hidden>)
 >Re: NSTableView delete button (From: Keith Duncan <email@hidden>)
 >Re: NSTableView delete button (From: PGM <email@hidden>)

  • Prev by Date: Re: NSTableView delete button
  • Next by Date: Sync Services
  • Previous by thread: Re: NSTableView delete button
  • Next by thread: Dock Icon and NSWindow.
  • Index(es):
    • Date
    • Thread