<div dir="ltr">Hi Daniel;<div><br></div><div>Thanks!  Holy cow, but that was fast.  And sorry that took so long for me to track down...</div><div><br></div><div>-jm</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 12, 2017 at 3:44 PM, Daniel Kochmański <span dir="ltr"><<a href="mailto:daniel@turtleware.eu" target="_blank">daniel@turtleware.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <p>OK, thank you. That was a missing piece I needed. Fix was pushed
      to master branch a second ago.</p>
    <p>Best regards,</p>
    <p>Daniel<br>
    </p><div><div class="h5">
    <br>
    <div class="m_3290002783089001063moz-cite-prefix">On 12.11.2017 21:26, John Morrison
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Hi;
        <div><br>
        </div>
        <div>So I think I misrepresented this (both to you and myself). </div>
        <div><br>
        </div>
        <div>Vintage commit abba473 respects the following, regardless
          of whether it is The Right Thing for me to ask of McCLIM:</div>
        <div>
          <div><br>
          </div>
          <div>      (with-output-as-gadget (stream :x 0) ....</div>
        </div>
        <div><br>
        </div>
        <div>And the gadgets come out stacked vertically</div>
        <div><br>
        </div>
        <div>The next commit, e04adb3, AFAICT doesn't accept that:</div>
        <div><br>
        </div>
        <blockquote style="margin:0 0 0 40px;border:none;padding:0px"><span style="font-family:monospace"><span style="color:rgb(0,0,0)">While
              evaluating the form starting at line 28, column 0<br>
            </span></span><span style="font-family:monospace">  of
            #P"/home/jm/tmp69/test-<wbr>gadgets-v04.lisp":<br>
          </span><span style="font-family:monospace"><br>
          </span><span style="font-family:monospace">debugger invoked on
            a SB-INT:SIMPLE-PROGRAM-ERROR in thread<br>
          </span><span style="font-family:monospace">#<THREAD "main
            thread" RUNNING {10029568C3}>:<br>
          </span><span style="font-family:monospace">  keyword argument
            not a symbol:<br>
          </span><span style="font-family:monospace">  #<CLOSURE
            (FLET CLIM-INTERNALS::GADGET-OUTPUT-<wbr>RECORD-CONSTRUCTOR :IN
            DISPLAY-GADGETS)<br>
          </span><span style="font-family:monospace">
               {155549A4D62B}>.<br>
          </span><span style="font-family:monospace"><br>
          </span></blockquote>
        <font face="arial, helvetica, sans-serif">If I recall correctly,
          I did it because of <a href="http://bauhh.dyndns.org:8000/clim-spec/30-5.html#_1866" target="_blank">this</a> bit of the CLIM
          spec...</font>
        <div><font face="arial, helvetica, sans-serif"><br>
          </font></div>
        <div><font face="arial, helvetica, sans-serif">Current vintage
            seems to accept the request without complaining, but does
            not honor it.</font></div>
        <div><font face="arial, helvetica, sans-serif"><br>
          </font></div>
        <div><font face="arial, helvetica, sans-serif">That took an
            embarrassingly long time to track down.</font></div>
        <div>
          <div><span style="font-family:monospace"><br>
            </span></div>
          <div><span style="font-family:monospace">-jm</span></div>
          <div><span style="font-family:monospace"><br>
            </span></div>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Sun, Nov 12, 2017 at 3:13 PM, Daniel
          Kochmański <span dir="ltr"><<a href="mailto:daniel@turtleware.eu" target="_blank">daniel@turtleware.eu</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF">
              <p>The behavior seems to be there for a long time and is
                not a bug but deliberately coded. This is made for
                consistency with all macros which support :move-cursor
                key parameter (like `surrounding-output-with-borde<wbr>r'):</p>
              <blockquote>
                <p>If the boolean <i>move-cursor</i> is <span class="m_3290002783089001063m_4133417934581058318term">true</span> (the
                  default), then the text cursor will be moved so that
                  it immediately follows the lower right corner of the
                  bordered output. </p>
              </blockquote>
              So if wrapping things in `vertically' solves the issue we
              are all set.<br>
              <br>
              Best regards,<br>
              Daniel
              <div>
                <div class="m_3290002783089001063h5"><br>
                  <br>
                  <div class="m_3290002783089001063m_4133417934581058318moz-cite-prefix">On
                    11.11.2017 22:40, John Morrison wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <div dir="ltr">Hey, thanks.  I will get on the task
                      of trying to find out exactly which commit changed
                      the behavior I remember.  This will, however, take
                      me a bit to wrap my brain around checking out
                      particular git commit versions, as I am pretty
                      much a git lightweight.
                      <div><br>
                      </div>
                      <div>Thanks again!</div>
                      <div><br>
                      </div>
                      <div>-jm</div>
                      <div><br>
                      </div>
                    </div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">On Sat, Nov 11, 2017 at
                        4:06 PM, Daniel Kochmański <span dir="ltr"><<a href="mailto:daniel@turtleware.eu" target="_blank">daniel@turtleware.eu</a>></span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                          <div text="#000000" bgcolor="#FFFFFF">
                            <p>Alright. Fact that we start by diagonal
                              lines looks like a bug (though I'm not
                              100% sure) – could you please fill out the
                              bug report? If you know commit when it
                              worked as you expected, that would be
                              helpful too.</p>
                            <p>As of your problem at hand – macro
                              vertically (and all the others) isn't
                              limited only to layouts section, you may
                              use it in display-gadget function too. If
                              you need something, what will compose list
                              in such macro, it is a matter of writing
                              macro doing just that, like</p>
                            <p>(defmacro vertically* (options body-list)
                              `(vertically ,options ,@body-list))</p>
                            <p>-- cut here --</p>
                            <p>(in-package :clim-user)<span><br>
                                <br>
                                (define-application-frame test-gadgets
                                ()<br>
                                  ()<br>
                                  (:panes<br>
                              </span>    (output<br>
                                  :application<br>
                                  :display-time :command-loop<br>
                                  :display-function 'display-gadgets)<br>
                                 (outputs<br>
                                  :application<br>
                                  :display-time :command-loop<br>
                                  :display-function 'display-gadgets2))<br>
                                (:layouts<br>
                                 (default (horizontally ()  output
                              outputs))))<br>
                              <br>
                              (defmethod display-gadgets ((frame
                              test-gadgets) stream)<br>
                                (dolist (item '("one" "two" "three"
                              "four"))<br>
                                  (with-output-as-gadget (stream)<span><br>
                                      (make-pane 'push-button<br>
                                                 :label item<br>
                                                 :activate-callback<br>
                                                 (lambda (&rest
                                args)<br>
                                                   (declare (ignore
                                args))<br>
                              </span>                    (notify-user
                              *application-frame* "You clicked a
                              button"))))))<span><br>
                                <br>
                                (defun make-gadget (item)<br>
                                  (make-pane 'push-button<br>
                                             :label item<br>
                                             :activate-callback<br>
                                             (lambda (&rest args)<br>
                                               (declare (ignore args))<br>
                                               (notify-user
                                *application-frame* "You clicked a
                                button"))))<br>
                                <br>
                              </span> (defmethod display-gadgets2
                              ((frame test-gadgets) stream)<br>
                                (with-output-as-gadget (stream)<span><br>
                                    (vertically ()<br>
                                      (make-gadget "one")<br>
                                      (make-gadget "two")<br>
                              </span>       (make-gadget "three"))))<br>
                              <br>
                              (run-frame-top-level
                              (make-application-frame 'test-gadgets))<br>
                            </p>
                            <p>-- cut here --</p>
                            <p>hope this is helpful.<br>
                            </p>
                            <p>Regards,</p>
                            <p>Daniel<br>
                            </p>
                            <div>
                              <div class="m_3290002783089001063m_4133417934581058318h5"> <br>
                                <div class="m_3290002783089001063m_4133417934581058318m_-3300027386482786851moz-cite-prefix">On
                                  11.11.2017 21:49, John Morrison wrote:<br>
                                </div>
                                <blockquote type="cite">
                                  <div dir="ltr">ugh - should attach
                                    what I said I attached</div>
                                  <div class="gmail_extra"><br>
                                    <div class="gmail_quote">On Sat, Nov
                                      11, 2017 at 3:48 PM, John Morrison
                                      <span dir="ltr"><<a href="mailto:jm@symbolic-simulation.com" target="_blank">jm@symbolic-simulation.com</a>></span>
                                      wrote:<br>
                                      <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                        <div dir="ltr">Hi Daniel (and
                                          Lucien, who replied
                                          privately):
                                          <div><br>
                                          </div>
                                          <div>(1) thanks for the "not
                                            dumb" comment.</div>
                                          <div><br>
                                          </div>
                                          <div>Sorry additionally for
                                            not being clear.  The app is
                                            intended for the buttons
                                            (will eventually be
                                            checkboxes, but buttons were
                                            simpler for purposes of
                                            isolating the behavior) to
                                            be dynamic (unknown at
                                            layout time as things to be
                                            checked will come and go
                                            during program execution).</div>
                                          <div><br>
                                          </div>
                                          <div>So while I did have some
                                            joy with making :list-panes
                                            with :items in the
                                            definition of the
                                            application frame (and it
                                            was prettier than what I
                                            sent), I had less joy
                                            changing those items
                                            programmatically.</div>
                                          <div><br>
                                          </div>
                                          <div>When I put a "terpri" in
                                            as in the slightly revised
                                            test program as the other
                                            alternative, I get a blank
                                            line between the gadgets,
                                            which (given I am going to
                                            have a lot of items) would
                                            cause the user excess
                                            scrolling due to the
                                            whitespace between boxes.</div>
                                          <span class="m_3290002783089001063m_4133417934581058318m_-3300027386482786851HOEnZb"><font color="#888888">
                                              <div><br>
                                              </div>
                                              <div>-jm</div>
                                              <div><br>
                                              </div>
                                              <div><br>
                                              </div>
                                              <div><br>
                                              </div>
                                            </font></span></div>
                                        <div class="m_3290002783089001063m_4133417934581058318m_-3300027386482786851HOEnZb">
                                          <div class="m_3290002783089001063m_4133417934581058318m_-3300027386482786851h5">
                                            <div class="gmail_extra"><br>
                                              <div class="gmail_quote">On
                                                Sat, Nov 11, 2017 at
                                                3:24 PM, Daniel
                                                Kochmański <span dir="ltr"><<a href="mailto:daniel@turtleware.eu" target="_blank">daniel@turtleware.eu</a>></span>
                                                wrote:<br>
                                                <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello
                                                  John,<br>
                                                  <br>
                                                  question is obviously
                                                  not dumb. Some
                                                  cognitive problem
                                                  arises from the
                                                  disparity, that McCLIM
                                                  provides both sheets
                                                  and gadgets. If you
                                                  want to lay out
                                                  buttons vertically,
                                                  you may either put
                                                  terpri after each
                                                  make-pane, or put each
                                                  button in your layout
                                                  (the latter is more
                                                  elegant imho):<br>
                                                  <br>
                                                  -- cut --<br>
                                                  <br>
                                                  (in-package
                                                  :clim-user)<br>
                                                  <br>
                                                  (defun make-gadget
                                                  (item)<br>
                                                    (make-pane
                                                  'push-button<br>
                                                               :label
                                                  item<br>
                                                              
                                                  :activate-callback<br>
                                                               (lambda
                                                  (&rest args)<br>
                                                                
                                                  (declare (ignore
                                                  args))<br>
                                                                
                                                  (notify-user
                                                  *application-frame*
                                                  "You clicked a
                                                  button"))))<br>
                                                  <br>
(define-application-frame test-gadgets ()<br>
                                                    ()<br>
                                                    (:panes)<br>
                                                    (:layouts<br>
                                                     (default
                                                  (vertically ()<br>
                                                               
                                                  (make-gadget "one")<br>
                                                               
                                                  (make-gadget "two")<br>
                                                               
                                                  (make-gadget "three")<br>
                                                               
                                                  (make-gadget
                                                  "four")))))<br>
                                                  <br>
                                                  <br>
                                                  (run-frame-top-level
                                                  (make-application-frame
                                                  'test-gadgets))<br>
                                                  <br>
                                                  -- cut --<br>
                                                  <br>
                                                  Best regards,<br>
                                                  <br>
                                                  Daniel
                                                  <div class="m_3290002783089001063m_4133417934581058318m_-3300027386482786851m_7477811832927283636HOEnZb">
                                                    <div class="m_3290002783089001063m_4133417934581058318m_-3300027386482786851m_7477811832927283636h5"><br>
                                                      <br>
                                                      <br>
                                                      On 11.11.2017
                                                      21:07, John
                                                      Morrison wrote:<br>
                                                      <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                                        Hi;<br>
                                                        <br>
                                                        In another app I
                                                        am writing, I
                                                        BELIEVE gadgets
                                                        used to come out
                                                        stacked
                                                        vertically. 
                                                        After an upgrade
                                                        (to current
                                                        git), I think
                                                        they come out
                                                        "diagonally," in
                                                        that the x &
                                                        y of successive
                                                        gadgets increase
                                                        (presumbly by
                                                        the dimensions
                                                        of its preceding
                                                        gadget).  Please
                                                        find attached
                                                        the simplest
                                                        test program I
                                                        could cons up
                                                        that displays
                                                        the behavior,
                                                        along with a
                                                        screenshot that
                                                        shows the
                                                        behavior.<br>
                                                        <br>
                                                        What is the
                                                        idiomatic/best
                                                        way to get them
                                                        to stack
                                                        vertically?  I
                                                        messed about
                                                        (again, mostly
                                                        unsuccessfully,
                                                        or I wouldn't be
                                                        pestering you
                                                        all) with
                                                        various
                                                        approaches, but
                                                        every time I
                                                        find myself with
                                                        a complex
                                                        solution, it
                                                        turns out there
                                                        is indeed a
                                                        Better, Simpler
                                                        Way.<br>
                                                        <br>
                                                        Thanks,<br>
                                                        <br>
                                                        -jm<br>
                                                        <br>
                                                      </blockquote>
                                                      <br>
                                                    </div>
                                                  </div>
                                                </blockquote>
                                              </div>
                                              <br>
                                            </div>
                                          </div>
                                        </div>
                                      </blockquote>
                                    </div>
                                    <br>
                                  </div>
                                </blockquote>
                                <br>
                              </div>
                            </div>
                          </div>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br></div>