[mcclim-devel] Re: with-output-as-gadget
Paul Werkowski
pw at snoopy.mv.com
Wed Dec 28 21:58:27 UTC 2005
Here is a patch that gets with-output-as-gadget working better.
It seems to work correctly but using updating-output has revealed some problems
that I don't yet know how to fix (still working on it).
The biggest problem with updating-output is that redisplay causes a new
gadget-output-record to be created, but the gadget is not adopted by any sheet.
The first gadget created remains as the adopted one but each redisplay causes
the new, unadopted gadget to be "current". This shows up when
erase-output-record is used and sheet-disown-child complains that the supplied
gadget
is not a child of sheet. Wrapping the with-output-as-gadget form as in
(updating-output (stream :cache-value t) (with-output-as-gadget (stream) ...))
is a workaround.
That workaround won't work in accepting-values though because
invoke-updating-output fails with a no-applicable-method error on the
stream ;-(
The more minor problem (but still vexing) is that somehow updating-output
ignores the stream-cursor-position adjustment that is supposed to move the
cursor to after the gadget. The adjustment works fine without updating-output.
I think the patch is safe to commit. Maybe someone has some ideas about solving
the updating-output problems?
Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gadget.patch
Type: application/octet-stream
Size: 5783 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/mcclim-devel/attachments/20051228/0c2d61df/attachment.obj>
More information about the mcclim-devel
mailing list