alexrozanski / PXSourceList

Source List control for the Mac
Other
638 stars 76 forks source link

Tap twice to edit #45

Closed jdrukman closed 10 years ago

jdrukman commented 10 years ago

In PXSourceList, if an item is editable, a single click on the item puts it in editing mode. Pretty much everywhere else in OSX, the first click selects and the second click triggers editing. Is there a way to get this behavior in PXSourceList?

alexrozanski commented 10 years ago

In the test projects, clicking once on the row then clicking again triggers editing triggers editing, which is in line with OS X behaviour as you say. Are you seeing different behaviour?

jdrukman commented 10 years ago

Yes, the first click immediately triggers editing on my source list. I don't know what I did to make that happen, but I can't seem to suppress it!

alexrozanski commented 10 years ago

Are you using a view- or cell-based source list?

jdrukman commented 10 years ago

View-based.

alexrozanski commented 10 years ago

Interesting. If you send me your project/test project where this repros I'll be happy to take a look. http://alexrozanski.com/contact/

jdrukman commented 10 years ago

I finally solved this. I had set the sourcelist's delegate property in the nib and also in code. sourceListSelectionDidChange was being called twice. (Presumably all the delegate methods are.)

alexrozanski commented 10 years ago

Interesting; the old delegate should be removed as an observer when it's changed. I'll have a look.