Hilaire Fernandes pravi:
> In the following example, I expect the web element referenced by input
> temporary variable to be hidden at the first page rendering.
> But it is not, I don't see why. Toggling is working however
>
> viewTerms
> |e input|
> e := WebElement new.
> input := WebElement new addInputFieldAspect: #name for: Term new.
As every Smalltalk #add: method Aida also returns the argument, not the
receiver of this call, that's why in your case you get a WebInputField
and not WebElement in input local variable. Use therefore #yourself :
input := WebElement new
addInputFieldAspect: #name for: Term new;
yourself
> input hide.
> e addTextH1: 'Editer les termes de la nomenclature'.
> e addTextBold: 'Nom : '. e addText: self observee name.
> e addBreak.
> (e addTextBold: 'ajouter un terme') onClickToggle: input.
> e addSpace.
> e add: input.
> e addBreak.
> self pageFrameWith: e title: 'Editer les termes'.
>
--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida