Damien Cassou damien.cassou at
Wed Feb 22 20:28:51 MET 2006

Cédrick Béler a écrit :
> Hi ...
> I don't really see how the different MAaccesor work... as I'm always 
> using MASelector...

Do you use last Magritte version ? There is comments in the MAAccessor 
classes now.

> For instance, what could be the use of MADictionnaryAccesor ?

This one expects a dictionary as the model and a key to create the 
accessor. #read: is equivalent to #at: on dictionaries while #write:to: 
is equivalent to #at:put:.

> MAVariableAccesor ? (used in MADescription class)

MAVariableAccessor is used only as a convenience constructor in 
MADescription in fact. It access directly a variable of the model passed 
to #write:to: or #read. You'd better use MASelectorAccessor or 

> MAContainerAccessor ?

This one is not supposed to write. And when used for reading, it answers 
the model given as the argument.

> Are they always linked to real instance variables (created) ?

Not at all. Only MAVariableAccessor use instance variables directly. 
MASelectorAccessor does not require a variable, it can store in a 
database for example or something else that fit your needs.

Damien Cassou

CSS3 :  "On passe au  HSL, plus intuitif  et moins orienté CRT  que le
RGB. Il y a du HSLA". Et en plus, ça veut dire quelque chose (au moins
pour l'auteur) !

More information about the SmallWiki mailing list