Next thing I don't understand: One added inputFieldAspect works, the second doesn't

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

Next thing I don't understand: One added inputFieldAspect works, the second doesn't

Herbert König
Hello,

extending ADemoAddressApp>>viewMain with:
e cell  addInputFieldAspect: #firstName for: self observee.

gives me an input field in which I can change the first name. Hitting
Enter in that field actually changes the view and going back to the
address book shows the change. Beautiful, I had expected to have to
add some code to make the change happen!

Now I innocently added a second line:
e newCell addInputFieldAspect: #surname for: self observee.

and voila, I can hit the Enter key as much as I like, the changes are
ignored. I tried e cell add.. and e add.. without success.

Surely some magic happens behind the scenes but I don't know the
incantations.

 

Thanks,

Herbert                          mailto:[hidden email]

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

Re: Next thing I don't understand: One added inputFieldAspect works, the second doesn't

Janko Mivšek
Herbert König wrote:

> extending ADemoAddressApp>>viewMain with:
> e cell  addInputFieldAspect: #firstName for: self observee.
>
> gives me an input field in which I can change the first name. Hitting
> Enter in that field actually changes the view and going back to the
> address book shows the change. Beautiful, I had expected to have to
> add some code to make the change happen!
>
> Now I innocently added a second line:
> e newCell addInputFieldAspect: #surname for: self observee.
>
> and voila, I can hit the Enter key as much as I like, the changes are
> ignored. I tried e cell add.. and e add.. without success.
>
> Surely some magic happens behind the scenes but I don't know the
> incantations.

So you do something like:

   e cell  addInputFieldAspect: #firstName for: self observee.
   e newCell addInputFieldAspect: #surname for: self observee.
   e newCell addButtonText: 'Save'

So, if you click with a mouse to Save, it stores changes in any case? If
you click Enter, it should be also posted if this button is the only one
or the first on the entire page. Note that there is also a search button
on default webpage ..

Janko


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Next thing I don't understand: One added inputFieldAspect works, the second doesn't

Herbert König
Hello Janko,


JM> So you do something like:

JM>    e cell  addInputFieldAspect: #firstName for: self observee.
JM>    e newCell addInputFieldAspect: #surname for: self observee.
JM>    e newCell addButtonText: 'Save'

yes it helps to add the save button, but where to read up on the magic
behind it? The first inputFieldAspect:for: didn't need a save Button
at all.

Every first element of a kind seems to have some special features
which it looses when a second element of its kind appears.

Actually the name (for the first button) seems to have no meaning,
naming the button "Garbage" also does the save. As long as it is the
first I guess. Let me experiment.

JM> So, if you click with a mouse to Save, it stores changes in any case? If
JM> you click Enter, it should be also posted if this button is the only one
JM> or the first on the entire page. Note that there is also a search button
JM> on default webpage ..

I've read every documentation available via Aidaweb.si, now it seems I
have to browse code but there's quite a lot. So I'll appreciate any
pointers.


Thanks,

Herbert                            mailto:[hidden email]

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida