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