CLIM mail archive

[Prev][Next][Index][Thread]

Getting :initially-select-query-identifer to show default in "modify" mode.



    Date: Mon, 29 Nov 1993 15:15 EST
    From: Daniel D Suthers <suthers+@pitt.edu>

    Clim 1.1.

    Is there an easy/official way to get :initially-select-query-identifer
    to show the :default argument in Modify mode? :insert-default seems not
    to work.

CLIM 2.0 has a :MODIFY-INITIAL-QUERY argument.  I thought that I had
added this in the CLIM 1.1 timeframe, but I could be wrong.

    How about getting :gesture :select on the field to always go into
    Modify, without having to right-click to get a menu and select "Modify"? 

Clicking Mouse-Middle does this.

CLIM defines three gesture names -- :EDIT-FIELD, :MODIFY-FIELD, and
:DELETE-FIELD -- that are used by dialogs.  You can certainly change
them to fit your own model of usability.

    this is my context ...
    -------------------
    (defun GET-STRING-DIALOGUE (&key (associated-window (shared-clim-root-window))
				     (label "Get String Dialogue")
				     (message nil)
				     (prompt "Your response")
				     (default "")
				     (estimated-response-length
				      *minimum-response-string-length*)) 
      ;;
      (let ((string-response ""))
	(clim:accepting-values 
	  (associated-window 
	   :own-window (list :right-margin (list estimated-response-length
						 :character)
			     #+:LUCID :bottom-margin
			     #+:LUCID 10)
	   :label label
	   :initially-select-query-identifier 'active-item
	   :exit-boxes *standard-exit-boxes*
	   :x-position *popup-position-x*
	   :y-position *popup-position-y*)
	    #+:LUCID (format associated-window "~%") ; enough space on top
	    #-:LUCID (terpri associated-window)
	  (when message 
	    (princ message associated-window) 
	    (terpri associated-window))
	  (setq string-response
		(clim:accept 'clim:string 
			     :stream associated-window
			     :prompt prompt
			     :default default
			     :insert-default t
			     :query-identifier 'active-item)))
	    ;; To make the window close
	#+:LUCID (force-output *bogus-window*)
	string-response))

    ----------------------------
    --------------------------------------------------
     Dan Suthers           | LRDC, room 505A
     suthers+@pitt.edu     | 3939 O'Hara Street
     (412) 624-7036 office | University of Pittsburgh
     (412) 624-9149 fax    | Pittsburgh, PA 15260
    --------------------------------------------------


References:

Main Index | Thread Index