[Seaside] Image Zoomer: How to capture mouseOver X & Y

Robert Sirois watchlala at hotmail.com
Sat Apr 3 16:37:24 UTC 2010


Yay! Thank you so much. I really appreciate you keeping up with the mailing list.

This has the correct javascript output:

        onClick: (
            html jQuery ajax
                callback: [:value | self session mousePosTop: value] value: (JSStream on: 'arguments[0].pageY');
                callback: [:value | self session mousePosLeft: value] value: (JSStream on: 'arguments[0].pageX')
        );

Thanks!
RS

> From: renggli at gmail.com
> Date: Sat, 3 Apr 2010 18:22:16 +0200
> Subject: Re: [Seaside] Image Zoomer: How to capture mouseOver X & Y
> To: seaside at lists.squeakfoundation.org
> 
> You are probably on an old version of Seaside. Try to put the string into
> 
>    JSStream on: 'your string'
> 
> Lukas
> 
> On 3 April 2010 16:27, Robert Sirois <watchlala at hotmail.com> wrote:
> > Evidently something isn't working right, cuz all I get back is the string
> > I'm passing in, as if the javascript isn't being evaluated. I tried
> > 'arguments[0]' as well as a couple other things, too.
> >
> > I tried binding this function to a click event in a script, which yielded
> > the same results.
> >
> > I also wasn't able to get the little json example to work.
> >
> > I have JQ develop deploy, UI develop deploy, JSON develop deploy, CT, and a
> > theme loaded.
> >
> > Thanks again heh
> > RS
> >
> >> From: renggli at gmail.com
> >> Date: Sat, 3 Apr 2010 09:44:14 +0200
> >> Subject: Re: [Seaside] Image Zoomer: How to capture mouseOver X & Y
> >> To: seaside at lists.squeakfoundation.org
> >>
> >> > What I'd like to do is get the position of the mouse
> >> > (http://docs.jquery.com/Types/Event#event.pageX.2FY) and send the value
> >> > to
> >> > an ajax callback like below:
> >> >
> >> > ...
> >> >         onClick: (html jQuery ajax
> >> >             callback: [:v | self session mousePosTop: v ] value: 'y
> >> > val';
> >> >             callback: [:v | self session mousePosLeft: v ] value: 'x
> >> > val'
> >> >         );
> >> > ...
> >>
> >> That would be:
> >>
> >> callback: [:v | self session mousePosTop: v ] value: 'argument[0].pageX';
> >> callback: [:v | self session mousePosLeft: v ] value: 'argument[0].pageY'
> >>
> >> 'argument[0]' is the event object passed into the event handler.
> >> 'pageX' is the attribute as given in the JQuery documentation.
> >>
> >> Currently the JQuery event object is not reified in Smalltalk, that's
> >> why you need to use these Javascript strings. I guess that should (and
> >> could easily) be changed. Can you create an issue in the bug-tracker?
> >>
> >> Alternatively you can serialize the complete event object, this
> >> requires that you add the JSJsonDevelopmentLibrary though:
> >>
> >> callback: [ :v | v inspect ] json: 'argument[0]'
> >>
> >> Lukas
> >>
> >> --
> >> Lukas Renggli
> >> www.lukas-renggli.ch
> >> _______________________________________________
> >> seaside mailing list
> >> seaside at lists.squeakfoundation.org
> >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
> > ________________________________
> > The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with
> > Hotmail. Get busy.
> > _______________________________________________
> > seaside mailing list
> > seaside at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
> >
> 
> 
> 
> -- 
> Lukas Renggli
> www.lukas-renggli.ch
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
 		 	   		  
_________________________________________________________________
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20100403/2a1ea9e8/attachment.htm


More information about the seaside mailing list