<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-2"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    <font face="Georgia">Actually, that would not work as written in a
      closure image. </font>To make it work in closure image, you could
    write something like:<br>
    <br>
    <pre wrap="">...
        aRenderer anchor
                callback: (makeCallBackWith: index );
...
</pre>
    And then write a method<br>
    <pre wrap="">makeCallBackWith: n
        ^[self callbackFor: n]

</pre>
    In a non-closure image, it would work as written since
    fixCallbackTemps would have been sent automatically.<br>
    <br>
    Cheers,<br>
    Bob<br>
    <br>
    On 10/31/10 9:52 PM, Levente Uzonyi wrote:
    <blockquote
      cite="mid:Pine.LNX.4.64.1011010251220.15605@login03.caesar.elte.hu"
      type="cite">On Mon, 1 Nov 2010, Hernán Morales Durand wrote:
      <br>
      <br>
      <blockquote type="cite">Hi all,
        <br>
        <br>
        I'm experimenting different behavior between Seaside 2.8 and 3.0
        <br>
        regarding parameters passed in callback blocks. Attached there
        is code
        <br>
        to test in both platforms (just click in any of the first 8
        links),
        <br>
        the problem is in the variable index in the #callback: of the
        <br>
        following code
        <br>
        <br>
        <blockquote type="cite">
          <blockquote type="cite">renderBlabla
            <br>
          </blockquote>
        </blockquote>
            | index |
        <br>
            index := 1.
        <br>
            8 timesRepeat: [
        <br>
                aRenderer tableRow: [
        <br>
                    5 timesRepeat: [
        <br>
                        aRenderer tableData: [
        <br>
                            aRenderer anchor
        <br>
                                callback: [ self callbackFor: index ];
        <br>
                                with: 'image link'.
        <br>
                            index := index + 1.
        <br>
                        ]  ] ] ].
        <br>
        <br>
        In Seaside 2.8 after clicking the link 3 for example, the
        <br>
        #callbackFor: method received 3 as parameter.
        <br>
        In Seaside 3.0 #callbackFor: receive 41.
        <br>
        <br>
        I would like to preserve the parameter value configured in the
        <br>
        rendering phase, any suggestion how to do that in Seaside 3?
        (Using
        <br>
        PharoVM 4.0.2 12/4/2010 and Pharo1.1rc2 #11400)
        <br>
      </blockquote>
      <br>
      Use an image with support for closures. Or if that's not possible,
      then send #fixTemps to the callback block.
      <br>
      <br>
      <br>
      Levente
      <br>
      <br>
      <blockquote type="cite">Cheers,
        <br>
        <br>
        -- <br>
        Hernán Morales
        <br>
        Information Technology Manager,
        <br>
        Institute of Veterinary Genetics.
        <br>
        National Scientific and Technical Research Council (CONICET).
        <br>
        La Plata (1900), Buenos Aires, Argentina.
        <br>
        Telephone: +54 (0221) 421-1799.
        <br>
        Internal: 422
        <br>
        Fax: 425-7980 or 421-1799.
        <br>
        <br>
      </blockquote>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
seaside mailing list
<a class="moz-txt-link-abbreviated" href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a>
<a class="moz-txt-link-freetext" href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a>
</pre>
    </blockquote>
  </body>
</html>