Search
Tuesday, 29th of September 2020, 23:44:52 UTC
3:57:51
beach
Good morning everyone!
6:44:01
jackdaniel
I'm too little off lately because the little one is sick (looks like a common cold) and we all stay home and take turns with working
6:57:35
beach
Does your wife work at home as well?
7:04:31
jackdaniel
yes, we have our usual scheme which involves grandparents, but since she is sick we don't want to expose them to that
10:20:00
dickb
I'm learning mcclim. In the code below the push-button (pb1) doesnot change the number in the pane app1. What is wrong?
10:20:35
dickb
(in-package :common-lisp-user)
10:20:47
dickb
;;----------------------------------------------------------------------
10:20:50
dickb
(define-application-frame superapp ()
10:20:53
dickb
((current-number :initform nil
10:20:56
dickb
:accessor current-number )
10:20:59
dickb
(current-text :initform nil
10:21:06
dickb
(:pointer-documentation t)
10:21:20
dickb
:display-function 'display-app1)
10:21:33
dickb
:display-function 'display-app2)
10:21:50
dickb
:activate-callback #'(lambda (pane &rest args)
10:21:53
dickb
(declare (ignore pane args))
10:22:00
dickb
(:menu-bar menubar-command-table)
10:22:03
dickb
(:layouts (default (vertically () (horizontally () app1 app2) int pb1))))
10:22:10
dickb
;;----------------------------------------------------------------------
10:22:14
dickb
(defun display-app1 (frame pane)
10:22:14
dickb
(let ((number (current-number frame)))
10:22:17
dickb
(format pane "nummer is: ~a~%" number)))
10:22:23
dickb
(defun display-app2 (frame pane)
10:22:26
dickb
(let ((text (current-text frame)))
10:22:30
dickb
(format pane "tekst is: ~a~%" text)))
10:22:36
dickb
;;----------------------------------------------------------------------
10:32:00
contrapunctus
dickb: please use a pastebin to share multiline texts 😱
10:52:53
jackdaniel
because you call a function, not execute a command. I gather that command cm-getal-333 increases the counter
10:53:20
jackdaniel
you need to call redisplay pane after changing the number (or,instead of calling a function, execute-command)
10:55:34
dickb
I defined com-getal-333 as a command. (define-superapp-command (com-getall-333 ...
11:02:01
scymtym
commands are also functions, so you /can/ call the command like a function. however, that will not, for example, trigger the redisplay of the frame. so as jackdaniel said, you either have to trigger the redisplay "manually" or call the command via CLIM:EXECUTE-FRAME-COMMAND
Wednesday, 30th of September 2020, 11:44:52 UTC