Lisp HUG Maillist Archive

Geometry information missing

I am wondering why the geometry information is not completely registered in the capi interface object after display. 
I am running 5.1.2 on Mac OS X (32 bit). 
You can see from the example code below that the X and Y positions are not recorded in the geometry instance slot. 
Thanks
Bruno

CL-USER 26 > (setf interface (make-instance 
  'capi:interface
  :title "Test"
  :best-x 100
  :best-y 200
  :best-width 150
  :best-height 75))

#<CAPI:INTERFACE "Test" 20099D27>

CL-USER 27 > (capi:with-geometry interface (list capi:%width% capi:%height% capi:%x% capi:%y%))
(NIL NIL NIL NIL)

CL-USER 28 > (capi:display interface)
#<CAPI:INTERFACE "Test" 20099D27>

CL-USER 29 > (capi:with-geometry interface (list capi:%width% capi:%height% capi:%x% capi:%y%))
(150 75 NIL NIL)

Re: Geometry information missing

On Friday 30 January 2009 5:13:34 pm Bruno Emond wrote:

> I am wondering why the geometry information is not completely

> registered in the capi interface object after display.

You need to render (capi:display or capi:contain) the interface first. CAPI delays calculating this information until the interface is actually rendered. The first few times I encountered this, I found it confusing. I suspect that this is related to the fact that layouts (can) auto-stretch their contents.

pt

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