[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Color-window-mixin and global-to-local
- To: firstname.lastname@example.org
- Subject: Color-window-mixin and global-to-local
- From: Richard Lynch <email@example.com>
- Date: Wed, 24 Oct 90 15:41:59 CDT
Anybody have any idea why a color-window can't do global-to-local right?
Included is sample code to demonstrate this.
As near as I can tell, the problem is not the port changing, but in the
_GlobalToLocal trap call. (Comment out the _GetPort and _SetPort lines to
see this. [3 lines to comment out]).
As far as I can tell, the horizontal number of the incorrect answer changes
with each new window. The vertical component does not change (but is not
Of course, now that I have figured out _GlobalToLocal trap call, I don't
need to worry about this much, but maybe it will be helpful to someone
Here is the code:
(oneof (list *color-window-mixin* *dialog*) ;This is the same as
*color-dialog* for those
;of you who may actually have
;that mentions this. Somewhere
;and my bosses, the update docs
;to one page that doesn't.
:window-title "FOOBAR color-window"
:window-position #@(200 100)
:dialog-item-text "Push Me"
(declare (object-variable my-dialog wptr))
(%stack-block ((old-port-ptr 4)
(%put-long point-ptr #@(200 100))
(_GetPort :ptr old-port-ptr)
(_SetPort :ptr (ask my-dialog wptr))
(format t "Unless you move the window, both answers should be
(format t "(global-to-local 200 100) -> ~A~%"
(point-string (ask my-dialog (global-to-local 200
(format t "(_GlobalToLocal 200 100) -> ~A~%"
(_GlobalToLocal :ptr point-ptr)
(_SetPort :ptr (%get-ptr old-port-ptr))
) ) ) ) ) )
P.S. Is (was) there a bug-macl or something and should this have gone
Thanks in advance.
"TANSTAAFL" Rich firstname.lastname@example.org