[mcclim-devel] Gadget based accepting-values

Clinton Ebadi clinton at unknownlamer.org
Wed May 7 22:15:17 UTC 2008


Greetings,

Attached is a patch, accepting-values-gadgets-1, that makes
accepting-values capable of working of with gadget based views. The
(probably) uncontroversal part is exporting the CLIM 2.2 (from the
Franz user guide) gadget views and the related constants. 

I added view-gadget-initargs support to gadget-view so gadgets can be
created properly. The code merely stashes all the provided initargs
into a slot and does no sanity checking. Should this somehow verify
that the initargs are valid for the related gadget class? If so, what
would be the cleanest way?

I also caught the lack of a +check-box-view+ and added it.

To the frame-manager protocol class I added the CLIM 2.2
frame-manager-dialog-view method which (for now) defaults to a
textual rather than gadget based view. I noticed the XXX comment
attached so I am unsure if this is an OK place to add it.

accepting-values-stream now returns the frame manager dialog view as
its stream-default-view. The Franz user guide says that this ought to
be setfable; to which class should I add the slot and accessor?

To accepting-values itself I moved the final cleanup of the input
editor records into a generic, finally-finalize-query-record, so that
accept-present-default methods that don't contain a text editing field
can actually work.

There are a few quick hackish methods for accepting from a
text-field-view/gadget-dialog-view (the assumption being that they
contain an input editing record so just calling them with
+textual-dialog-view+ will work). I also reworked the
accept-present-default for text-field-view to always call the
textual-dialog-view method even if the width is not set.

Also attached is avg.lisp which is a work in progress I'd like someone
a bit more knowledgeable about CLIM to look at which implements gadget
based accepting-values methods as per the Franz user guide. This is
loosely based upon the public domain code found in [1]. If it looks ok
I can split it up into the appropriate files in McCLIM and submit a
patch. It seems to work well enough, but I am unsure if I have
implemented things well. The most suspect bit is line 225 where I set
the cache-test of the updating-output-record to return t always. I was
having problems with a new gadget being created every time the value
changed.

gui.lisp contains a small test frame for testing whether the gadgets
actually work.

[1] http://osdir.com/ml/lisp.mcclim.devel/2006-04/msg00069.html

-------------- next part --------------
A non-text attachment was scrubbed...
Name: accept-values-gadgets-1.patch
Type: text/x-diff
Size: 10946 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/mcclim-devel/attachments/20080507/44ddba4f/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avg.lisp
Type: application/octet-stream
Size: 12311 bytes
Desc: accepting values gadgets
URL: <https://mailman.common-lisp.net/pipermail/mcclim-devel/attachments/20080507/44ddba4f/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gui.lisp
Type: application/octet-stream
Size: 2267 bytes
Desc: test program
URL: <https://mailman.common-lisp.net/pipermail/mcclim-devel/attachments/20080507/44ddba4f/attachment-0001.obj>
-------------- next part --------------


-- 
Jessie: but today i was a nerd
Jessie: i even read slashdot.


More information about the mcclim-devel mailing list