[aida] onEnterTabulate

Janko Mivšek janko.mivsek at eranova.si
Wed Apr 1 20:36:06 CEST 2009


Hi Herbert,

I hope I'm not to late with answer, sorry!

About #onEnterTabulate (which enables a very handy tabulation between
fields with ENTER key, not just with TAB), you better send it
immediately to fields when building your form. In your case:

viewKontrollwerteComponent
         "reusable print and Edit Kontrollwerte"
         | e da51|
         da51 := self observee abrechnung kontrollwerte.
         e := WebElement new.
         e cell  addText: 'KWX:'.
         (e newCell addDelayedFieldAspect: #kwxText for: da51)
		onEnterTabulate.
         e  newRow.
         e cell  addText: 'KWY:'.
         (e newCell addDelayedFieldAspect: #kwyText for: da51)
		onEnterTabulate.
         e  newRow.

Then you don't need to use self form fieldSet do: [...onEnterTabulate]
in your view.

Also, I didn't check if tabulation with Enter is working on delayed
fields. I'd check that by trying first with normal fields.

One suggestion, avoid naming components as #viewSomethingComponent,
because #view.. method start is reserved for view methods, to avoid
confusion.

Best regards
Janko

Herbert König pravi:
> Hi,
> 
> from the docs I tried to make inputs tabulate on enter with:
>   self form fieldSet do: [:field | field onEnterTabulate].
> 
> The fields I want to tabulate over are in a component.
> 
> No tabulation happens on enter regardless wether I put the line into
> the view or into the component.
> 
> Guess I miss some additional incantation.
> 
> The view is:
> 
> viewKontrollwerte
>         | e |
>         e := WebElement new.
>         e addTextH1: 'Elling Abrechnung ohne Schwerpunktsweg'.
>         e addBreak;
>                 add: self viewTabComponent;
>                 addTextH1: 'Kontrollwerte (DA51) ändern'; addBreak;
>                 add: self viewKontrollwerteComponent ;
>                 addBreak.
>         self form fieldSet do: [:field | field onEnterTabulate].
>         self pageFrameWith: e title: 'REB Elling'
> 
> The component somewhat abbreviated goes like:
> 
> viewKontrollwerteComponent
>         "reusable print and Edit Kontrollwerte"
>         | e da51|
>         da51 := self observee abrechnung kontrollwerte.
>         e := WebElement new.
>         e cell  addText: 'KWX:'.
>         e newCell addDelayedFieldAspect: #kwxText for: da51.
>         e  newRow.
>         e cell  addText: 'KWY:'.
>         e newCell addDelayedFieldAspect: #kwyText for: da51.
>         e  newRow.
> 
>         "Some more of these follow"
>         
>         ^e
> 
> 
> Thanks,
> 
> 
> Herbert                          mailto:herbertkoenig na gmx.net
> 
> _______________________________________________
> Aida mailing list
> Aida na aidaweb.si
> http://lists.aidaweb.si/mailman/listinfo/aida
> 

-- 
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si


More information about the Aida mailing list