Lisp HUG Maillist Archive

(unknown)

Hi,

I use LispWorks HobbyistDV on Windows 10, and I'm trying to build a simple GUI app.


The code is as follows:

***************************************************************
(defpackage "MY-PACKAGE"

 (:add-use-defaults t) (:use "CAPI"))

(in-package :my-package)

(setq interface

      (make-instance 'interface

                     :visible-min-width 200

                     :title "My Interface"))

(setq button

      (make-instance 'push-button

                     :data "Hello" 

                     :callback

                     #'(lambda (&rest args) 

                         (display-message 

                          "Hello World"))))

(contain button)
***************************************************************


And I face with the error as bellow:


***************************************************************
Quitting because of error:
   Trying to use CAPI without Multiprocessing
***************************************************************

Could you tell me how to fix this issue?

I'd appreciate your help.


- Hiroki N.

Re:

I should have read the tutorial of application builder before I posted the question.
I read the tutorial and, I write down the example script.

************************************************************************
(capi:define-interface demo ()
  ()
  (:panes
      (page-up capi:push-button
               :text "Page Up"
               :selection-callback 'scroll-up)
      (page-down capi:push-button
                 :text "Page Down"
                 :selection-callback 'scroll-down)
      (open-file capi:push-button
                 :text "Open File"
                 :selection-callback 'file-choice)
      (viewer capi:editor-pane
              :title "File:"
              :text "No file selected."
              :visible-min-height '(:character 8)
              :reader viewer-pane))
   (:layouts
     (main-layout capi:column-layout 
                  '(row-of-buttons row-with-editor-pane))
     (row-of-buttons capi:row-layout
                     '(page-up page-down open-file))
     (row-with-editor-pane capi:row-layout
                           '(viewer)))
   (:menus 
     (file-menu "File"
                (("Open"))
                :selection-callback 'file-choice)
     (page-menu "Page"
                (("Page Up" 
                  :selection-callback 'scroll-up)
                 ("Page Down"
                  :selection-callback 'scroll-down))))
   (:menu-bar file-menu page-menu)
   (:default-initargs :title "Demo"))

(capi:display (make-instance 'demo))
***************************************************************************

I loaded the script on Application builder and set demo as the starting function,
then the building script was made.

*****************************************************************************
;;; Automatically generated delivery script

(in-package "CL-USER")

(load-all-patches)

;;; Load the application:
(load "//Mac/Home/Documents/test3.lisp")

(compile-system 'capi :load t)

(deliver 'demo "//Mac/Home/Desktop/test" 0
         :interface :capi)
*****************************************************************************

I loaded the building script and I tried to build.
But I faced the same error again.

I cannot find the good tutorial of the application builder.
Does anyone know the good tutorial?

I'd appreciate your help.


- Hiroki N.


2017-05-07 20:29 GMT+09:00 Noguchi Hiroki <padds1st@gmail.com>:
Hi,

I use LispWorks HobbyistDV on Windows 10, and I'm trying to build a simple GUI app.


The code is as follows:

***************************************************************
(defpackage "MY-PACKAGE"

 (:add-use-defaults t) (:use "CAPI"))

(in-package :my-package)

(setq interface

      (make-instance 'interface

                     :visible-min-width 200

                     :title "My Interface"))

(setq button

      (make-instance 'push-button

                     :data "Hello" 

                     :callback

                     #'(lambda (&rest args) 

                         (display-message 

                          "Hello World"))))

(contain button)
***************************************************************


And I face with the error as bellow:


***************************************************************
Quitting because of error:
   Trying to use CAPI without Multiprocessing
***************************************************************

Could you tell me how to fix this issue?

I'd appreciate your help.


- Hiroki N.

Re:

I found the example folder of CAPI.
I tried to build some examples and I understand how to build an app.

2017-05-07 21:13 GMT+09:00 Noguchi Hiroki <padds1st@gmail.com>:
I should have read the tutorial of application builder before I posted the question.
I read the tutorial and, I write down the example script.

************************************************************************
(capi:define-interface demo ()
  ()
  (:panes
      (page-up capi:push-button
               :text "Page Up"
               :selection-callback 'scroll-up)
      (page-down capi:push-button
                 :text "Page Down"
                 :selection-callback 'scroll-down)
      (open-file capi:push-button
                 :text "Open File"
                 :selection-callback 'file-choice)
      (viewer capi:editor-pane
              :title "File:"
              :text "No file selected."
              :visible-min-height '(:character 8)
              :reader viewer-pane))
   (:layouts
     (main-layout capi:column-layout 
                  '(row-of-buttons row-with-editor-pane))
     (row-of-buttons capi:row-layout
                     '(page-up page-down open-file))
     (row-with-editor-pane capi:row-layout
                           '(viewer)))
   (:menus 
     (file-menu "File"
                (("Open"))
                :selection-callback 'file-choice)
     (page-menu "Page"
                (("Page Up" 
                  :selection-callback 'scroll-up)
                 ("Page Down"
                  :selection-callback 'scroll-down))))
   (:menu-bar file-menu page-menu)
   (:default-initargs :title "Demo"))

(capi:display (make-instance 'demo))
***************************************************************************

I loaded the script on Application builder and set demo as the starting function,
then the building script was made.

*****************************************************************************
;;; Automatically generated delivery script

(in-package "CL-USER")

(load-all-patches)

;;; Load the application:
(load "//Mac/Home/Documents/test3.lisp")

(compile-system 'capi :load t)

(deliver 'demo "//Mac/Home/Desktop/test" 0
         :interface :capi)
*****************************************************************************

I loaded the building script and I tried to build.
But I faced the same error again.

I cannot find the good tutorial of the application builder.
Does anyone know the good tutorial?

I'd appreciate your help.


- Hiroki N.


2017-05-07 20:29 GMT+09:00 Noguchi Hiroki <padds1st@gmail.com>:
Hi,

I use LispWorks HobbyistDV on Windows 10, and I'm trying to build a simple GUI app.


The code is as follows:

***************************************************************
(defpackage "MY-PACKAGE"

 (:add-use-defaults t) (:use "CAPI"))

(in-package :my-package)

(setq interface

      (make-instance 'interface

                     :visible-min-width 200

                     :title "My Interface"))

(setq button

      (make-instance 'push-button

                     :data "Hello" 

                     :callback

                     #'(lambda (&rest args) 

                         (display-message 

                          "Hello World"))))

(contain button)
***************************************************************


And I face with the error as bellow:


***************************************************************
Quitting because of error:
   Trying to use CAPI without Multiprocessing
***************************************************************

Could you tell me how to fix this issue?

I'd appreciate your help.


- Hiroki N.


Updated at: 2020-12-10 08:31 UTC