[Seaside] Re: WAImageMapTag problem with Scriptaculous?

John Chludzinski john.chludzinski at gmail.com
Tue Nov 10 23:02:53 UTC 2009


If I use:

   html map
      callback: [ :point | point x > 200 ifTrue: [ self nextPage ] ifFalse:
[ self previousPage ]];
      with: [ html image id: #WWW; url: MMAFileLibrary / self
getCurrentPageFile ]].

This works BUT the entire page in re-rendered.  Not what I want.

If I use:

   html map
      onClick: (html scriptaculous evaluator
         callback: [ :script | self nextPage ];
         return: false);

This updates the instance of WAImageMapTag with the next slide (without
re-rendering the entire page) BUT I don't have access to 'point' to
determine whether to invoke either #nextPage or #previousPage.

---John

On Tue, Nov 10, 2009 at 5:10 PM, John Chludzinski <
john.chludzinski at gmail.com> wrote:

> I trying to use an instance of WAImageMapTag to hold a slide (in a
> presentation).  Instead of using buttons (on an iPod), I'm trying to advance
> to the next slide by clicking on the right half of the slide or going back
> to the previous slide by clicking on the left half.   This requires I have
> access to 'point' in 'callback: [ :point | ... ]' associated with the
> instance of WAImageMapTag. But when using Scriptaculous, I'd like to have
> something like this:
>
>    html map
>       onClick: (html scriptaculous evaluator
>          callback: [ :script | self x > 200 ifTrue: [ self nextPage ]
> ifFalse: [ self previousPage ]];
>          return: false);
>       callback: [ :point | self x: point x ];
>       with: [ html image id: #WWW; url: MMAFileLibrary / self
> getCurrentPageFile ]].
>
> This doesn't work (my conclusion?) because the #callback: in the
> Scriptaculous evaluator: "Registers aBlock as a primary callback of the
> receiver." and the other callback ([ :point | self x: point x ]) is never
> invoked?  Is there a solution to this Catch-22?
>
> ---John
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20091110/38ac27f9/attachment.htm


More information about the seaside mailing list