Re: selectionShouldChangeInTableView called twice
Re: selectionShouldChangeInTableView called twice
- Subject: Re: selectionShouldChangeInTableView called twice
- From: Andre Masse <email@hidden>
- Date: Sat, 20 Dec 2008 22:14:53 -0500
Thanks for your replies guys.
This application is a front end to a database with a lot of data
entries and deals with legal data. There's a lot of validations going
on and data integrity is vital. Normally, the user will save or cancel
by clicking a button in the detail view and changes will be committed
or rolled back to the database. The alert is for handling the cases
where the user select another row in the master table after having
done some modifications to a record and "forgot" to save or cancel
(most document based application display a similar alert when the
window is closed without saving). This case is exceptional. As an
analogy, let's say the master table is a list of clients. A typical
use case for data entry goes like this:
1- search for a client
2- select the "good" one from the list (if a match is found, if not
add a new one)
3- make some modifications in the detail view
4- save
repeat
Suppose the user begin editing a client then decide this is not the
record he wanted to modify and simply select another row in the master
table. Or, the master table contains the next client he has to
modified and after finishing editing the first, he simply select the
next. How can I know what to do without asking him what he want? In
the first case I should cancel the record and in the second I should
save it. Now, suppose the user somehow move the focus from the detail
view (by switching application and coming back, accidently clicking in
the master view or whatever). This is a third case, he may have not
completed its modifications and should be able to continue editing the
record.
I agree that this is a restrictive approach and I'll think how I could
handle all this with Undo. This has a lot of implications on my
application design which rely on being in a database transaction for
editing, will never be sold as it's an in house application for 3
users (me, my wife and my son) and has been working this way for years
using 4th Dimension on a PC...
Food for thoughts :-)
Thanks,
Andre Masse
On Dec 20, 2008, at 20:26, Jerry Krinock wrote:
On 2008 Dec, 20, at 10:23, Andre Masse wrote:
I'm using a master/detail view in my application. If the user
select another row in the master table and the detail has been
modified, I want to present an alert to save, cancel or return to
detail.
Back to the original question, I always thought that the desired
behavior in this case would be to simply set the change in the data
model without asking. You mentioned "save". Indeed, I would not
"save" in the sense of saveDocument:. But like Graham said, a table
entry is "cheap" [in user effort] to restore the old value if it was
a mistake. And the proper, easy way for the user to restore it
would be -- drum roll -- Undo -- cowbell :)
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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