Magritte question

sop soptwo sop2 at hotmail.fr
Sat Sep 8 15:31:57 MEST 2007




> From: renggli at iam.unibe.ch
> Subject: Re: Magritte question
> Date: Sat, 8 Sep 2007 11:42:15 +0200
> To: smallwiki at iam.unibe.ch
> 
> > Likely that you're using the same component for the entire length  
> > of the
> > session.  You may want to copy the description as well, I don't  
> > recall if
> > Magritte still caches its descriptions, so say anItem description copy
> > addCondtion.
> 
> Yes, you have to copy the description, else your globally cached  
> description ends up with a whole set of conditions.
> 
> Caching can be disabled by using a different description-builder,  
> however need the descriptions a lot (e.g. searching, persistency) it  
> is really worth to let Magritte only build them once and then cache  
> them.
> 
Thank you for your help.

Now I have another problem :

buildEditorFor: anItem
    ^(anItem description copy
            addCondition: [:memento | (Item repository
                contains: [:each | memento model id = each not]) not]
            labelled: 'An item with that id already exists';
            asComponentOn: anItem)
        addValidatedForm;
        yourself

The memento model id doesn't change it's value when I edit it. I saw MACheckedMemento has a #cache and a #original method, maybe I should use them, but I don't know how.

Sebastien

> Lukas
> 
> -- 
> Lukas Renggli
> http://www.lukas-renggli.ch
> 
> 
> _______________________________________________
> SmallWiki, Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki

_________________________________________________________________
Créez un blog Messenger pour partager facilement toutes vos photos de vacances !
http://www.windowslive.fr/spaces/default.asp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iam.unibe.ch/pipermail/smallwiki/attachments/20070908/a2cb7de6/attachment.html


More information about the smallwiki mailing list