Hello
On Fri, Aug 26, 2005 at 01:50:21PM +0200, Paolo Amoroso wrote:
mretzlaff@common-lisp.net (Max-Gerd Retzlaff) writes:
Modified Files: dialog.lisp Log Message: (climi::frame-event-queue *application-frame*) as argument :INPUT-BUFFER to the call of OPEN-WINDOW-STREAM in WITH-STREAM-IN-OWN-WINDOW (was not specified previously).
I still don't get separate windows in dialogs of town-example.lisp that have :own-window t. The accepting-values dialogs still appear in the interactor. I use the latest McCLIM CVS sources.
Did you change the call TO ACCEPTING-VALUES in the macro ACCEPTING-VALUES-WITH-STYLE-AND-TITLE (and a recompile of the whole file)?
ACCEPTING-VALUES-WITH-STYLE-AND-TITLE is only used for the *output* of the commands COM-SHOW-TOWN-INFO and COM-GET-DISTANCE. And that did not work for you? I just grabbed a fresh cvs checkout and it worked for me.
If you want the accepting-values dialogs of the partial-command-parser (i.e. if you click in the menu on "Show Town Info" or "Get Distance") to appear in a new window, you have to change the :own-window argument of that call. It is burried in MAKE-PARTIAL-PARSER-FUN in mcclim/commands.lisp, try this patch:
-- zipp --
--- commands.lisp_old 2005-08-26 15:06:27.370372680 +0200 +++ commands.lisp 2005-08-26 15:06:29.218091784 +0200 @@ -755,7 +755,7 @@ ,command-table :errorp nil)) ,@(mapcar #'list required-arg-names original-args)) - (accepting-values (,stream) + (accepting-values (,stream :own-window t) (format ,stream "You are being prompted for arguments to ~S~%~%" ,command-line-name)
-- zapp --
There seems to be no simple way to just change the default for a single application frame. The right way seems to be to modify the application-frame's top-level with something like (:top-level (default-frame-top-level :partial-command-parser ..) in one's DEFINE-APPLICATION-FRAME. But that seems to be a lot of work as the default, COMMAND-LINE-READ-REMAINING-ARGUMENTS-FOR-PARTIAL-COMMAND, calls the partial-command-parsers that are created via mentioned MAKE-PARTIAL-PARSER-FUN when the commands of the application are defined (DEFINE-..-COMMAND -> DEFINE-COMMAND -> %DEFINE-COMMAND)..
Bye, Max
Max-Gerd Retzlaff m.retzlaff@gmx.net writes:
Did you change the call TO ACCEPTING-VALUES in the macro ACCEPTING-VALUES-WITH-STYLE-AND-TITLE (and a recompile of the whole file)?
Doh, I din't notice it was commented out. Now it works, but when I execute the command:
Show Town Info ( Which town? ) Berlin
the dialog does appear in a different window. But when I dismiss it with OK or Cancel, I get this error:
In method #<STANDARD-METHOD LISP::PCL-CLOSE (CLIM-INTERNALS::WINDOW-STREAM) {2846A855}>: No next method for arguments (#<CLIM-INTERNALS::WINDOW-STREAM "(Unnamed Pane)" {58A56285}> NIL). [Condition of type PCL::NO-NEXT-METHOD-ERROR]
Restarts: 0: [CONTINUE] Try again. 1: [ABORT ] Return to application command loop 2: Return to Top-Level.
Debug (type H for help)
("DEFMETHOD NO-NEXT-METHOD (STANDARD-GENERIC-FUNCTION STANDARD-METHOD)" #<unused-arg> #<unused-arg> #<STANDARD-GENERIC-FUNCTION LISP::PCL-CLOSE (5) {282CC739}> #<STANDARD-METHOD LISP::PCL-CLOSE (CLIM-INTERNALS::WINDOW-STREAM) {2846A855}> ...) Source: Error finding source: Error in function DEBUG::GET-FILE-TOP-LEVEL-FORM: Source file no longer exists: target:pcl/braid.lisp. 0] backtrace
0: ("DEFMETHOD NO-NEXT-METHOD (STANDARD-GENERIC-FUNCTION STANDARD-METHOD)" #<unused-arg> #<unused-arg> #<STANDARD-GENERIC-FUNCTION LISP::PCL-CLOSE (5) {282CC739}> #<STANDARD-METHOD LISP::PCL-CLOSE (CLIM-INTERNALS::WINDOW-STREAM) {2846A855}> ...) 1: ((FLET #:G19 TOWN-EXAMPLE::COM-SHOW-TOWN-INFO))[:CLEANUP] 2: (TOWN-EXAMPLE::COM-SHOW-TOWN-INFO #<TOWN-EXAMPLE::TOWN Berlin>) 3: ((METHOD CLIM:DEFAULT-FRAME-TOP-LEVEL NIL (CLIM:APPLICATION-FRAME)) (#() . #(# # # # # ...)) #<unused-arg> #<TOWN-EXAMPLE::TOWN-EXAMPLE {586B391D}> (:PROMPT #<Function TOWN-EXAMPLE::TOWN-EXAMPLE-PROMPT {5819B1A1}>)) 4: ("LAMBDA (.KEYARGS-START. .VALID-KEYS. G4395)" #<unused-arg> #<unused-arg> #<TOWN-EXAMPLE::TOWN-EXAMPLE {586B391D}> (:PROMPT #<Function TOWN-EXAMPLE::TOWN-EXAMPLE-PROMPT {5819B1A1}>)) 5: ((METHOD CLIM:RUN-FRAME-TOP-LEVEL NIL (CLIM:APPLICATION-FRAME)) (#(20) . #()) #<unused-arg> #<TOWN-EXAMPLE::TOWN-EXAMPLE {586B391D}> #<unused-arg>) 6: ((METHOD CLIM:RUN-FRAME-TOP-LEVEL (:AROUND) (CLIM:APPLICATION-FRAME)) (#(16 15) . #(#)) #S(PCL::FAST-METHOD-CALL :FUNCTION #<Function # {116D7231}> :PV-CELL (# . #) :NEXT-METHOD-CALL NIL :ARG-INFO (1 . T)) #<TOWN-EXAMPLE::TOWN-EXAMPLE {586B391D}> NIL) 7: (INTERACTIVE-EVAL (TOWN-EXAMPLE:RUN)) 8: (LISP::%TOP-LEVEL) 9: ((LABELS LISP::RESTART-LISP SAVE-LISP))
0]
I am using CMUCL Snapshot 2005-08 (19B) with the latest McCLIM CVS sources.
Paolo
Hello
On Fri, Aug 26, 2005 at 04:51:32PM +0200, Paolo Amoroso wrote:
Show Town Info ( Which town? ) Berlin
the dialog does appear in a different window. But when I dismiss it with OK or Cancel, I get this error:
In method #<STANDARD-METHOD LISP::PCL-CLOSE (CLIM-INTERNALS::WINDOW-STREAM) {2846A855}>: No next method for arguments (#<CLIM-INTERNALS::WINDOW-STREAM "(Unnamed Pane)" {58A56285}> NIL). [Condition of type PCL::NO-NEXT-METHOD-ERROR]
That does not happen on sbcl. The last line of climi::close in panes.lisp, the call (call-next-method) is the problem, as currently there is no such next method. The following patch helps but I'll not commit it as there might be such a method in the future. See http://meme.b9.com/~1a49f9d55ce30a6e18177a45~/cview.html?channel=lisp&da... (The relevant part starts at 16:21:44 (17:21 in my timezone).)
-- zipp --
--- panes.lisp.~1.154.~ 2005-08-25 23:22:10.000000000 +0200 +++ panes.lisp 2005-08-26 17:36:44.597545784 +0200 @@ -2520,8 +2520,7 @@ (declare (ignore abort)) (let ((frame (pane-frame stream))) (when frame - (disown-frame (frame-manager frame) frame))) - (call-next-method)) + (disown-frame (frame-manager frame) frame))))
(define-application-frame a-window-stream (standard-encapsulating-stream standard-extended-input-stream
-- zapp --
Bye, Max