parameter and accessor

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

parameter and accessor

NorbertHartl
I'm embedding a component in a page like this

+component|className=HRWine+

On the embedded component I have

descriptionContextClassName
        ^ MAStringDescription new
                parameterName: 'className';
                accessor: #contextClassName;
                priority: 100;
                label: 'Name of the context class';
                beRequired;
                yourself

What I get is an entry in the components properties with an association description -> value. That is good so far. I'm asking myself what is the best way to access the value. If I don't specify an accessor on the description magritte creates one itself leading to equality check failing in properties when doing

self propertyAt: self class descriptionContextClassName.

But if I have to specify an accessor I'm wondering why the accessor isn't used to store the value in the component.

Do I misunderstand something or is there a preferred way of accessing parameter values?

thanks,

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

Re: parameter and accessor

Lukas Renggli
> Do I misunderstand something or is there a preferred way of accessing parameter values?

Magritte uses the accessor also to establish the identity between
different descriptions, that's why you should always specify an
accessor even if you don't use it.

Lukas

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

Re: parameter and accessor

NorbertHartl

On 25.10.2010, at 08:30, Lukas Renggli wrote:

>> Do I misunderstand something or is there a preferred way of accessing parameter values?
>
> Magritte uses the accessor also to establish the identity between
> different descriptions, that's why you should always specify an
> accessor even if you don't use it.
>
Ok. But what about using the accesor to store the parameter value into the object?

Norbert


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