Lisp HUG Maillist Archive

CommonSQL select to produce outer joins

Unable to parse email body. Email id is 6514

Valid values for the initarg :draw-pinboard-objects

For a pinboard-layout, what are valid values for the initarg :draw-pinboard-objects?  I have seen :local-buffer, :buffer and (:initarg :display-type).
 
More generally, after a while using LW, I often have difficulty figuring out what the options are for slots.  First, I try F5.  If that doesn't work, I look at the superclasses for the class of interest in the CAPI Reference Manual or User Guide.  Then I look in the other manuals.  I get the feeling that there is a better technique for discovering this information and would be grateful if someone could share it.  Or maybe this is just a gap in the documentation?
 
Mitch

:draw-pinboard-objects :once

What does an assignment of :once to the init-arg :draw-pinboard-objects mean? I see the example in draw-pinboard-objects-once but don't understand of what it is an example.
 
Mitch

Re: CommonSQL select to produce outer joins


On Mar 17, 2007, at 1:03 PM, Vagif Verdi wrote:

> What is the syntax for outer joins in CommonSQL select ?
As far as I can tell there isn't any.  I'd be happy to be wrong though.

> If there’s no way to do outer joins with select and I have to fall  
> back to query, what is the best way to avoid sql injection attacks ?
My compromise looks like this:

(defun left-outer-join (table join-table on)
   (sql-expression :string (format nil "~a LEFT OUTER JOIN ~a ON ~a"
                                   (sql table) (sql join-table) (sql  
on))))

I use this function to assemble the value of :WHERE arguments in a  
way which looks/feels *relatively* natural.

-ck




Scrollbars and transforms

This was asked by someone a few years ago (in 2003), but there was no reply.
I have the same question now.

"If I add scrollbars to a pinboard-layout, as follows:
   ...
   (pinboard-layout-1
    capi:pinboard-layout
    ()
    :accessor canvas
    :horizontal-scroll t
    :vertical-scroll t))
   ...
then all appears to be well (the scrollbars appear and disappear as 
desired, and they scroll the pinboard correctly).

But, if I transform the pinboard contents, as with, say:

(defun test-scale (s)
  (let*
      ((transform (gp:graphics-port-transform *canvas*)))
    (gp:apply-scale transform s s)
    (gp:invalidate-rectangle *canvas*)))

Then the contents indeed scale to the desired value, but the scrollbars act 
as if the pinboard is still displaying the contents at the original 
(untransformed) scale.

Is there a simple way to get the scrollbars to track the transforms?  Or, 
do I have to accomplish this through manual manipulation of the scrollbars? 
 Is there an example of this anywhere handy? "

Thanks for any help.

Mitch


Scrollbars and transforms

When I create a layout with scrollbars and then do a graphics transform, I'd
like to have the scrollbars reflect the new extents of the graphics
transform result. It looks like the scrollbar is not aware of the results of
the graphics transform. Do I need to write my own scrollbar that is
transform-aware?

In the example below, a pinboard layout is written with circles which make
its scrollbar appear when the circles are outside the window region. After
the graphics scaling at the bottom, the scrollbars still reflect the
original circle positions.

Mitch

(capi:define-interface noscroll ()
  ()
  (:layouts
   (pin-lay
    capi:pinboard-layout
    nil
    :visible-border t
    :visible-min-height 100
    :visible-max-height nil
    :visible-min-width 100
    :visible-max-width nil
    :title "No scroll after scaling"
    :title-position :frame
    :title-adjust :right
    :vertical-scroll t
    :horizontal-scroll t
    :background :white)
  (column-layout-1
    capi:column-layout
    '(pin-lay)))
  (:default-initargs
   :best-height 200
   :best-width 200
   :layout 'column-layout-1
   :title "No scroll"))

(capi:display (setf test (make-instance 'noscroll)))

(capi:manipulate-pinboard (slot-value test 'pin-lay)
                     (make-instance
                      'capi:ellipse
                      :visible-min-width 50 :visible-min-height 50
                      :x 20 :y 20) :add-top)

(capi:manipulate-pinboard (slot-value test 'pin-lay)
                     (make-instance
                      'capi:ellipse
                      :visible-min-width 50 :visible-min-height 50
                      :x 250 :y 20) :add-top)

(gp:set-graphics-state (slot-value test 'pin-lay) :transform '(2 0 0 2 0 0))


Updated at: 2020-12-10 08:46 UTC