Paul McNett wrote:
> Carl Karsten wrote:
>> Paul McNett wrote:
>>> Carl Karsten wrote:
>>>> To me, .save and .delete operate at the same level: you can either save, 
>>>> or you 
>>>> can delete.  once you have done either, you are done.  so perfectly 
>>>> consistent.
>>> To me, .save() and .cancel() operate at the same level: you can either 
>>> save, or you can cancel. .new(), .delete(), and .setFieldVal() operate 
>>> at the same level (just like in SQL insert, delete, and update. So not 
>>> perfectly consistent.
>> im confused.
>>
>> doesn't .save() cause the SQL INSERT or UPDATE commands?
> 
> Yes. So to me it seems that .save() should cause the SQL INSERT, UPDATE, 
> and/or DELETE commands.

I guess the question is: does .delete() belong with (save, cancel) or with (new 
setFieldVal)

and on a different angle, that almost shouldn't be discussed, but might help 
clarify what is is:  implementation.

I can see 2 reasonable was to implement it:

1. list of deleted items.
2. "deleted" virtual field.

In both cases, you are storing something, and committing it later.

hmm, I thought this would make it obvious that what you are looking for is just 
another flavor of setFieldVal, and so you should just use setFieldVal, but 
something still needs to do the .delete..... so ... um...

> 
> 
>>> Read those threads I posted: you changed your tune! :)
>> I claim being still in the VFP haze.  glad I was unsure about it, this could 
>> have been extra embarrassing.
> 
> I think I'm sufficiently out of the VFP haze myself. And we aren't 
> talking about the VFP-style deleted flag here, not really. Once 
> committed, the records will be deleted. But while in the local dataset, 
> deleted records won't be a special case. Special cases violate the zen 
> of python. ;)
> 

"deleted records won't be a special case" sounds like an oxymoron: a deleted 
record is no longer in existence, so there is no case.

I think "marked for deletion" makes it clear what you are looking for.

given there isn't a reason the framework can't provide support for both, maybe 
that is the answer: .flag_for_delete_on_save() and .delete()

Carl K



_______________________________________________
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]

Reply via email to