Accessor for class inst var

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

Accessor for class inst var

cedreek
Hi,

Still for my descriptor (attribute). I defined a similarity matrix in
the class side.
I've never used Magritte to edit class inst var, so out of curiosity,
what accessor would you use ?
I've use a Block Accessor.

(MABlockAccessor
                        read:  [ :model | model class matrix]
                        write: [ :model :object | model class matrix: aMatrix]);

 Is it ok to edit class side inst var ? What would you use ?

Also, I was doing a matrix description, but I saw MATableModel and
MATableComponent... it seems to be a "matrix", isnt'it ?

Thanks

Cédrick


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Accessor for class inst var

Lukas Renggli-2
> I've never used Magritte to edit class inst var, so out of curiosity,
> what accessor would you use ?

You could also use a cascaded of selector accessors:

    MAChainAccessor selectors: #(class matrix)

> Is it ok to edit class side inst var ? What would you use ?

Yes, that's fine. You can edit any value. If you write an SQL-Accessor  
you could also access your data in a Relational Table.

> Also, I was doing a matrix description, but I saw MATableModel and  
> MATableComponent... it seems to be a "matrix", isnt'it ?

Yes, exactly.

Lukas

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


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