On 11 June 2010 21:26, Nick Ager <
[hidden email]> wrote:
> Hi,
> I have a form that's using generated via Magritte descriptions. I'd like to
> be able to change the label on one of the fields dynamically. I thought I'd
> found the solution by overriding #description on the instance-side and
> editing the field's description as in:
> description
> | description pricePerUnitDescription |
> self halt.
> description := super description.
> pricePerUnitDescription := description detect: [:each| each accessor
> readSelector == #pricePerUnit].
> self addCurrencyToDescriptionLabel: pricePerUnitDescription.
> ^ description
> However it seems that the description is cached so this method is rarely
> called.
> Any thoughts on how to dynamically change the label in a magritte field
> greatly received.
Only the description on the class-side is cached, the #description
method one the instance-side is called whenever a form, report, query,
... is made.
Lukas
> Thanks
> Nick
> _______________________________________________
> Magritte, Pier and Related Tools ...
>
https://www.iam.unibe.ch/mailman/listinfo/smallwiki>
--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki