[Grok-dev] Re: applyChanges and add forms

Philipp von Weitershausen philipp at weitershausen.de
Mon Apr 16 16:04:28 EDT 2007

On 16 Apr 2007, at 19:00 , Martijn Faassen wrote:
> On 4/16/07, Philipp von Weitershausen <philipp at weitershausen.de>  
> wrote:
> [snip]
>> > Ah, okay. We should allow applyChanges to continue working but
>> > raise a deprecation warning when we use it then. It's in use in too
>> > many places to suddenly break again, I think. :)
>> I'm not too fond of deprecation anymore, especially if we haven't had
>> a release yet. We don't even have a deprecation policy. I hate
>> deprecation cruft.
>> I'd be fine if we'd say "let's deprecate it for 2 weeks", though I
>> don't even see the point. The change is purely mechanical, we haven't
>> proposed to change the signature.
> I don't like deprecation cruft either, so I'm fine for deprecating
> this for, say, about a month. It's just to give people a clue what to
> do when their code breaks. :)


> [snip]
>> Sounds like applyData in add forms want to do the
>> > real minimum to just set attributes based on the schema.
>> Yup.
> By the way, formlib's applyChanges does all kinds of adapter lookup.
> The use case is..um.. I guess when you have an edit form for a schema
> that's only available as an adapter to the original object.

Right. I find that very useful. This way you easily make edit forms  
for, say, IZopeDublinCore data on objects.

> I guess our AddForm.applyData does need to support that use case,  
> right?

I would certainly say so.

(I was confused at first by that extra "does"... it sounded like you  
might've forgotten an extra "not"; either way I agree with the  
statement above :)).

More information about the Grok-dev mailing list