On 1/29/10 9:35 AM, Jacek Kałucki wrote: > Użytkownik Ed Leafe napisał: >> >> No, it's never been troublesome for me. There is ample protection for >> accidental deletion in the UI layer. >> >> With new(), most immediate saves would fail, because no values have >> been entered yet. >> >> So you want to issue a delete(), and not have it actually delete, but >> somehow mark the record for deletion. Then add an additional method called >> "actuallyDelete()" that will delete the marked records? >> > > I rather would like that delete works more like new() method, e.g.: > - let's add _deletedRecords attribute (equivalent of _newRecords > attibute in new() method) > - each call of delete() method causes to remove row from dataset > and update _deletedRecords with key of deleted row > - save(), requery() and clear() updates dataset and _deletedRecords, > additionally save() checks _deletedRecords and updates backend > accordingly. > > Currently to achieve something similar I need to create local copy of > dataset > and then in beforeSave() update framework dataset and then backend.
For the record I've always thought it was inconsistent to have delete() operate immediately instead of needing a save(). But I believe each time I brought it up Ed ended up convincing me otherwise. This should be a FAQ entry with the rationale for why it is the way it is. Paul _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev Searchable Archives: http://leafe.com/archives/search/dabo-dev This message: http://leafe.com/archives/byMID/[email protected]
