Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
troubles with tables (editing)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

troubles with tables (editing)



I have a table with two columns in it, code and short description. There is also a third item, long description, which is shown in a text edit box above the table.

The idea is that you can click to select a row in the table and it will load the long description in the box at the top of the screen.

That part is all working great. My problem is when you edit an item in the table.

Say that row 0 is selected and you edit the code item. When you press return (ie finished) you go to the 2nd row (row 1 in the index).

This row (1) now shows as selected, and my handleClick routine is called, which should now load the long description from that 2nd data element and stuff it into the text box up top.

It doesn't, because the selected row is still zero (0), instead of 1!

I don't know why. I suspect I'm missing a message somewhere or a way to force the selection (I know there is a selectRow method but I'm not sure if that's the right way).

BTW - if you tab over to the short description field, you're still on row 0 so that works fine.

I did find this method "textDidEndEditing:" in the apple docs which looks possibly like what I need but I don't know how to use it.

Can anyone provide a pointer on this?
_______________________________________________
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.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.