[Seaside] accessing event information

Mariano Martinez Peck marianopeck at gmail.com
Thu Oct 1 12:02:11 UTC 2015


Hi Chris, I did NOT test it but maybe something like this works?

onKeyUp: (' alert(evt) ' asFunction: #('evt'))

Basically, you can write whatever function (here I do a simple alert).

Cheers,

On Thu, Oct 1, 2015 at 12:50 AM, Chris Muller <ma.chris.m at gmail.com> wrote:

> I am still learning.  I want to make a desktop-like app in the
> browser.  Seaside lets me use Ajax to respond to individual widget
> clicks and update my model in the server, as well as update the DOM in
> the client accordingly, all in one step:
>
>         html button
>             onClick: ((html jQuery: #idOfElementToReplace) load
>                 html:
>                     [ : resultOfClickHtml | model doTheAppropriateUpdates.
>                     resultOfClickHtml render: model ]);
>             with: 'click to update the model'.
>
> I also tested onMouseOver: and onMouseOut:, they worked.  It feels a
> little strange to be updating my model within html rendering, but it
> gives me near desktop-app-like development capability for the browser
> with efficient event / response transfer, using Seaside.  Wonderful!
>
> I also need to handle onKeyUp and onKeyDown:, but I'm not sure the
> proper way to access the Event information by this approach.  I
> couldn't find any examples I could learn from.  How could I do it?
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>



-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151001/606eeb67/attachment.htm


More information about the seaside mailing list