Re: Delivered CAPI text input misdirected to stdout

"Matthew Sinclair-Day (as msd at sinclair-day dot com)" <[email protected]>
Newsgroups gmane.lisp.lispworks.general
Message-ID <[email protected]>
Invoking the image from the Terminal might be setting the Terminal as 
the first responder for event handling. Or rather, invoking from the 
Terminal might omit steps usually taken to configure the runtime 
environment (via the app bundle’s info.plist) and set the capi window 
as ‘key’. If you build the image into an app bundle and launch it 
from the Finder, does it work?

Something like this...

```lisp
(deliver 'test-multi-line-text-input-pane
	(create-macos-application-bundle
		"socrates.app"
		:document-types nil
		:identifier "news.synap.socrates")
	0 ; minimal reduction of image size results in image about 2 to 3 GB
	:interface :capi
	:multiprocessing t
	:keep-pretty-printer t)
```


Matthew

On 9 Sep 2025, at 18:02, Lawrence Au (as la at synap dot news) wrote:

> Hi,
>
>    I’m trying to deliver the Capi example function 
> test-multi-line-text-input-pane, in a MacOS image I named 
> ‘socrates.image’.
>
>    Although the test-multi-line-text-input-pane run fine when I call 
> (test-multi-line-text-input-pane) from the Listener in the IDE, when I 
> deliver it via the script below, only the button press features work. 
> When I type text into the multi-line-text-input-pane, the text I type 
> into it goes to the stdout of the MacOS terminal session where I 
> launched the delivered image!  Nothing goes into the 
> multi-line-text-input-pane!  Please help!
>
>   Here’s the script-for-socrates-image-gen.bash script file I used:
>
> "/Applications/LispWorks 8.0 (64-bit)/LispWorks 
> (64-bit).app/Contents/MacOS/lispworks-8-0-0-macos64-universal" -build 
> "~/release/kernel/lisp-images/socrates-build.lisp"
>
>
>   And here’s the socrates-build.lisp file I used:
>
>   (in-package "CL-USER")
> ;; this file was generated by calling put-script-for-capi-delivery at 
> universal-time["zone 5 time 5:38:13 date 2025/9/9"]
> ;; to build a custom lisp image at cur-image-file-path 
> "~/release/kernel/lisp-images/socrates.image"
> ;; load the current LispWorks system code:
> (load-all-patches)
> (load "~/release/kernel/pg-lisp/Installers/quicklisp.lisp")
> (load "/Users/lawrenceau/quicklisp/setup.lisp")
> ;; load the pg-lisp system code:
> (load "~/release/kernel/pg-lisp/pg-lisp.lisp")
> (ensure-directories-exist 
> "~/release/kernel/lisp-images/socrates.image")
> (ensure-directories-exist 
> "~/release/kernel/lisp-images/socrates-build.lisp")
> (format t "lisp load script socrates-build.lisp calling deliver to 
> start function 'test-multi-line-text-input-pane now...
> ")
> (deliver 'test-multi-line-text-input-pane
>   "~/release/kernel/lisp-images/socrates.image"
>   0 ; minimal reduction of image size results in image about 2 to 3 GB
>   :interface :capi
>   :multiprocessing t
>   :keep-pretty-printer t)
>
>
> Lawrence Au
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.