From: Neil S. <ne...@ha...> - 2005-12-09 12:23:41
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Neil Stevens wrote: > def addClicked > # @data is the array used in my table view data source methods > @data << 'URL' > # @view is the view, now that we added a row, we notify it > # that we did > @view.noteNumberOfRowsChanged > > # NOW I select the last row, and begin editing it, > # because I know it is the new row. > row = @urls.size - 1 Sorry, that should read @data.size - 1, I missed one rename when I simplified the variable names for the example. > indexSet = OSX::NSIndexSet.indexSetWithIndex(row) > @view.selectRowIndexes_byExtendingSelection(indexSet, false) > @view.editColumn_row_withEvent_select(0, row, nil, true) > end - -- Neil Stevens - ne...@ha... 'A republic, if you can keep it.' -- Benjamin Franklin -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFDmXdIf7mnligQOmERAjIuAJ9BZJeWwX4i5nDUYQLfF9N9Tqw73gCgko2t zrV9poJWzZKS1sGn4wDIeSc= =7ava -----END PGP SIGNATURE----- |