Lisp HUG Maillist Archive

Initializing dialogs

Hi folks,

I'm struggling with dialogs (again). I want to initialize a dialog before it is shown on screen, but I can't do image generation, font lookups, or measure the panes before the dialog is displayed (i.e. have a screen representation). When displaying "normal" interfaces using capi:display, I have two options:

1) Creating the interface with :display-state :hidden, display it, make my initialization, and then calling capi:show-interface
2) Implementing a interface-display :after method

None of these options are available when using display-dialog. Is there really no way to hook into that process??

Erik


PS.
Actually, I found a really ugly way, which sort of works: adding an "invisible" (e.g. 1x1 pixel) output-pane to the dialog, and call the initialization from its display-callback. But apart from its ugliness, it's also a bad solution if initialization takes some time, which makes the dialog "flicker" when it is redrawn

PPS.
This thread was interesting, as it could provide an alternative solution:
http://osdir.com/ml/lisp.lispworks.general/2005-08/msg00136.html
However, the wait-processing-events doesn't work on Cocoa, as it blocks the main event loop and hangs the application :(


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Initializing dialogs

>>>>> On Tue, 30 Jul 2013 22:46:27 +0200, Erik Ronström said:
> 
> Hi folks,
> 
> I'm struggling with dialogs (again). I want to initialize a dialog before it is shown on screen, but I can't do image generation, font lookups, or measure the panes before the dialog is displayed (i.e. have a screen representation). When displaying "normal" interfaces using capi:display, I have two options:
> 
> 1) Creating the interface with :display-state :hidden, display it, make my initialization, and then calling capi:show-interface
> 2) Implementing a interface-display :after method
> 
> None of these options are available when using display-dialog. Is there really no way to hook into that process??

Have you tried the :create-callback, either in the dialog interface or an
output-pane if you have one already?

-- 
Martin Simmons
LispWorks Ltd
http://www.lispworks.com/

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Initializing dialogs

Hello,

I asked something like that a while ago. This link was recommended to me:

http://www.plasticki.com/show?ERA

Maybe it helps you.

regards,
Phil

On Thu, Aug 1, 2013 at 5:56 PM, Martin Simmons <martin@lispworks.com> wrote:

>>>>> On Tue, 30 Jul 2013 22:46:27 +0200, Erik Ronström said:
>
> Hi folks,
>
> I'm struggling with dialogs (again). I want to initialize a dialog before it is shown on screen, but I can't do image generation, font lookups, or measure the panes before the dialog is displayed (i.e. have a screen representation). When displaying "normal" interfaces using capi:display, I have two options:
>
> 1) Creating the interface with :display-state :hidden, display it, make my initialization, and then calling capi:show-interface
> 2) Implementing a interface-display :after method
>
> None of these options are available when using display-dialog. Is there really no way to hook into that process??

Have you tried the :create-callback, either in the dialog interface or an
output-pane if you have one already?

--
Martin Simmons
LispWorks Ltd
http://www.lispworks.com/

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


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