Tutorial problem with cache

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Tutorial problem with cache

cbeler
Hi

I was having a look at the last exercices of the tutorial and I'm having
a problem with the last exercice with custom descriptions.

the custom description are doubled each time I access to them in the
container...

decription is overriden in MAPersonModel

MAPersonModel>>description

    ^super description copy;
          addAll: self class customDescription;
          yourself.

copy sould prevent to change the description stored in the cache. Is it
correct ?

This makes me ask you another question. When a description (class side)
is changed, how the cache of the builder is refreshed ? I have no idea


Thank you

Cédrick

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki

_______________________________________________
Smallwiki mailing list
[hidden email]
http://impara.de/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Tutorial problem with cache

Lukas Renggli-2
> MAPersonModel>>description
>
>     ^super description copy;
>           addAll: self class customDescription;
>           yourself.
>
> copy sould prevent to change the description stored in the cache.  
> Is it
> correct ?

Yes, but you need to remove the colon after the copy ;-)

> This makes me ask you another question. When a description (class  
> side)
> is changed, how the cache of the builder is refreshed ? I have no idea

Any source-code modification within the system flushes the cache, see  
MADescriptionBuilder>>flush.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch



_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
_______________________________________________
Smallwiki mailing list
[hidden email]
http://impara.de/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Dangerous Commands

Ramon Leon-4
Lucas, any chance you could add some javascript confirmations to
commands that are unsafe, such as Remove, one small slip of the fingers
and bam, a page is gone.


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
_______________________________________________
Smallwiki mailing list
[hidden email]
http://impara.de/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Dangerous Commands

Lukas Renggli-2
> Lucas, any chance you could add some javascript confirmations to
> commands that are unsafe, such as Remove, one small slip of the  
> fingers and bam, a page is gone.

The simplest thing you could do is to change:

PRRemoveCommand>>isQuick
        ^ false

The result doesn't look very nice, but it works.

Pier-All-lr.85 does what you suggest using a simple JavaScript  
confirmation dialog.

Hope this helps,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch



_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
_______________________________________________
Smallwiki mailing list
[hidden email]
http://impara.de/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Dangerous Commands

Ramon Leon-4
> Pier-All-lr.85 does what you suggest using a simple JavaScript  
> confirmation dialog.
>
> Hope this helps,
> Lukas

PRCommand>>isConfirmed, perfect, thanks!


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
_______________________________________________
Smallwiki mailing list
[hidden email]
http://impara.de/mailman/listinfo/smallwiki