Tim Knapp <[email protected]> writes:

> Hello again,
>
> On Mon, 2009-06-01 at 11:09 -0700, Rob Miller wrote:
>
> <snip />
>
>> 
>> like ross, i'm not entirely sure how what you're doing here is all
>> supposed to fit together.  it's a bit confusing, too, b/c you're
>> using 'setId' as the computed field expression, when setId is the
>> default name for the id field mutator.
>> 
>> i don't know why your approach isn't working, but i'd personally be a
>> bit reluctant to change id to a ComputedField.  i'd probably continue
>> to have id as a regular StringField, but i'd hide it from the edit
>> forms and would take steps to make sure that it was always set to the
>> value that you wanted, probably by overriding the 'update' method on
>> the member object.  i'd also maybe override the 'setId' mutator to do
>> a bit of sanity checking, to reject any attempts to set the id if it
>> doesn't match the expected value (be sure to make allowances for the
>> auto-generated temporary ids, though).
>
> Ok, I've been trying to implement this today and have been hitting my
> head against a brick wall. It should be a simple exercise to override
> the 'update' method within my customised-Remember type but 'oh no' it
> doesn't wanna work.
>
> My current Remember-classes code is here[1]. As you can see I've put a
> pdb statement in there but it never gets called. As you can also see
> I've overridden the validate_id method as this was causing it to fail
> too as it was expecting a id to be entered into the form.
>
> Any tips please?

Having been chatting with you in IRC, I just want to document for the
rest of the list.

It's not clear that the issue happening here is specific to
membrane/remember at all and may be simple class hierarchy trouble.  I
don't have much time to help Tim so if someone else wants to give more
time, that would be great.

Ross



--
Archive: 
http://www.openplans.org/projects/remember/lists/remember/archive/2009/06/1244092358421
To unsubscribe send an email with subject "unsubscribe" to 
[email protected].  Please contact 
[email protected] for questions.

Reply via email to