Lisp HUG Maillist Archive

Save-image (mac os x)

Hi,

After saving an image on an intel mac, (LW 5.02) I have these two problems :

(load-all-patches)
(load "my-application.lisp")
(save-image "my-application :restart-function #'cp::startup-function
:multiprocessing t :environment t)
(quit)

1)
After running this script in a shell, and restart with the Terminal
application (I didn't find another way to launch the new image... ?), the LW
IDE doesn't appears. I have to open manually some listener and editor. But
at this point the *standard-output* is a synonym-stream to *terminal-io*
rather than to the "background output" of the Editor. So the output is
redirect to the Terminal Shell and doesn't appear in the LW IDE. Is it a way
to change that ?

2)
Some functions of my application, witch change the mouse cursors via the
objective-c bridge, doesn't work anymore. These mouse cursors are "non mac"
cursors : they are created by the function below and stored in a hash table.
The cursor is changed with the objc "set" method.

(defun make-mouse-cursor (image-path &optional point)
    (let ((image (objc:invoke  "NSImage" "alloc"))
         (cursor (objc:invoke  "NSCursor" "alloc")))
    (objc:invoke  image "initByReferencingFile:"  (pathname2string
image-path t))
    (objc:invoke cursor "initWithImage:hotSpot:" image
                  (make-array 2 :initial-contents point))
    (objc:invoke  image "release")
    cursor))

The pointers to these cursors are created normally. But, in this new image,
the cursor doesn't change it aspect when the "set" method occurs...  When in
the "normal" LW image, the same works perfectly.

Any suggestion will be very appreciated

Thanks

Denis


-------------------------------------------------------
Denis Pousseur
70 rue de Wansijn
1180 Bruxelles, Belgique

Tel : 32 (0)2 219 31 09
Mail :  denis.pousseur@gmail.com
-------------------------------------------------------



Re: Save-image (mac os x)


Denis Pousseur <denis.pousseur@gmail.com> writes:
> After running this script in a shell, and restart with the Terminal
> application (I didn't find another way to launch the new image... ?), the LW
> IDE doesn't appears. I have to open manually some listener and editor. But
> at this point the *standard-output* is a synonym-stream to *terminal-io*
> rather than to the "background output" of the Editor. So the output is
> redirect to the Terminal Shell and doesn't appear in the LW IDE. Is it a way
> to change that ?

You could try looking at

  ftp://ftp.lispworks.com/pub/software_tools/reference/lw50/readme-5-0.pdf

particularly section 7.4.

I don't build gui images anymore (all tty only for me), but when I
used to build them we used:

    ;;; ...
    #+:cocoa 
    (compile-file-if-needed 
     (sys:example-file "configuration/macos-application-bundle")
     :load t)

    #+:motif
    (capi:ensure-motif-libraries)

    (save-image
     #+:cocoa 
     (write-macos-application-bundle
      (merge-pathnames "lispworks-gui-dev" (hcl:get-working-directory)))

     #-:cocoa "lispworks-gui-dev"

     :environment t :multiprocessing t
     :restart-function 'env:start-environment)

    (quit)

Good luck.

Cheers,
Chris Dean


:pane-menu doesn't work for simple-pane

Even though the documentation describes :pane-menu for simple-pane, I can't
get it to pop up with a right mouse click. It works fine for display-pane
and list-panel.

Mitch

Example:

(capi:contain (make-instance
               'capi:display-pane
               :pane-menu 
               (make-instance 'capi:menu :items
                              (list (make-instance 'capi:menu-item
                                                   :title "One")
                                    (make-instance 'capi:menu-item
                                                   :title "Two")))
               :visible-min-width 100
               :visible-min-height 100))

(capi:contain (make-instance
               'capi:simple-pane
               :pane-menu 
               (make-instance 'capi:menu :items
                              (list (make-instance 'capi:menu-item
                                                   :title "One")
                                    (make-instance 'capi:menu-item
                                                   :title "Two")))
               :visible-min-width 100
               :visible-min-height 100))


Re: Save-image (mac os x)

It resolves all the problems I had : Thanks a lot !

Denis


Le 1/05/07 0:00, « [NOM] » <[ADRESSE]> a écrit :

> 
> Denis Pousseur <denis.pousseur@gmail.com> writes:
>> After running this script in a shell, and restart with the Terminal
>> application (I didn't find another way to launch the new image... ?), the LW
>> IDE doesn't appears. I have to open manually some listener and editor. But
>> at this point the *standard-output* is a synonym-stream to *terminal-io*
>> rather than to the "background output" of the Editor. So the output is
>> redirect to the Terminal Shell and doesn't appear in the LW IDE. Is it a way
>> to change that ?
> 
> You could try looking at
> 
>   ftp://ftp.lispworks.com/pub/software_tools/reference/lw50/readme-5-0.pdf
> 
> particularly section 7.4.
> 
> I don't build gui images anymore (all tty only for me), but when I
> used to build them we used:
> 
>     ;;; ...
>     #+:cocoa 
>     (compile-file-if-needed
>      (sys:example-file "configuration/macos-application-bundle")
>      :load t)
> 
>     #+:motif
>     (capi:ensure-motif-libraries)
> 
>     (save-image
>      #+:cocoa 
>      (write-macos-application-bundle
>       (merge-pathnames "lispworks-gui-dev" (hcl:get-working-directory)))
> 
>      #-:cocoa "lispworks-gui-dev"
> 
>      :environment t :multiprocessing t
>      :restart-function 'env:start-environment)
> 
>     (quit)
> 
> Good luck.
> 
> Cheers,
> Chris Dean

-------------------------------------------------------
Denis Pousseur
70 rue de Wansijn
1180 Bruxelles, Belgique

Tel : 32 (0)2 219 31 09
Mail :  denis.pousseur@gmail.com
-------------------------------------------------------




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