what's wrong, cannot get element hide

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

what's wrong, cannot get element hide

Hilaire Fernandes-2
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.
        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'.

--
CDDP des Landes
Ingénierie éducative
BP401 - 614, rue du ruisseau
40012 Mont de Marsan cedex
T 05 58 75 50 10
F 05 58 06 29 18
http://crdp.ac-bordeaux.fr/cddp40

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: what's wrong, cannot get element hide

Janko Mivšek
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