Accessor for class inst var

View: New views
2 Messages — Rating Filter:   Alert me  

Accessor for class inst var

by cedrick beler :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

Re: Accessor for class inst var

by Lukas Renggli-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> 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