Magritte addCondition:

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

Magritte addCondition:

dtrussardi@tiscali.it
Hi,
 
    when define a description i can into addCondition: block
 
    test one  property of the description ?
 
    For example:
 
   descriptioAddressPrn
    ............
    addCondition:[:value| ...... propertyAt: #sizeLink = value size]
    labelled: ' Error ';
    yourself
 
 
 
  Where the property is set when create the descriptionContainer
 
        description
            ^ self class descriptionContainer,
                self class descriptionAddressPrn beWritable; propertyAt: #sizeLink put:10; yourself
 
   

Any pointers would be greatly appreciated!

Thanks!

 
    Dario

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

Re: Magritte addCondition:

Lukas Renggli
What about ...

descriptionFoo
    | desc |
    desc := MAStringDescription new.
    desc addCondition: [ :value | desc propertyAt: #sizeLink .... ].
    ^ desc

?

On Tue, Jun 16, 2009 at 5:26 PM, Dario Trussardi<[hidden email]> wrote:

> Hi,
>
>     when define a description i can into addCondition: block
>
>     test one  property of the description ?
>
>     For example:
>
>    descriptioAddressPrn
>     ............
>     addCondition:[:value| ...... propertyAt: #sizeLink = value size]
>     labelled: ' Error ';
>     yourself
>
>
>
>   Where the property is set when create the descriptionContainer
>
>         description
>             ^ self class descriptionContainer,
>                 self class descriptionAddressPrn beWritable; propertyAt:
> #sizeLink put:10; yourself
>
>
>
> Any pointers would be greatly appreciated!
>
> Thanks!
>
>
>     Dario
> _______________________________________________
> Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>



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

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