Re: CAPI application starting with a prompt; prompt won't return
On Tue, Feb 9, 2010 at 12:00 AM, Joshua TAYLOR <tayloj@cs.rpi.edu> wrote:
> Hi all, I'm trying to deliver an application which, when started,
> will prompt for the type of the first document to be created. (Cf.
> the way in which a word processor might ask what kind of document a
> user wants to start.) A minimal example that reproduces my problem
> follows. I'm on OS X, so the function that starts the application
> creates an application interface, sets it as the application
> interface, and then prompts for some input which is then used in
> creating another interface. My problem is that while the application
> is delivered with no problem, and when I start it, the prompt appears,
> nothing happens when I click "OK" or "Cancel" in the prompt. The
> buttons get pushed, and I can select different elements in the prompt,
> but the prompt is never dismissed. What am I missing? Thanks in
> advance, //JT
An update to those following this:
After a bit more digging, I've discovered some more interesting
behaviors related to this issue. First, if the function that the
application begins with uses multiple-value-bind and the
capi:prompt-with-list rather than capi:with-dialog-results, things
work as expected. The issue with this, of course, is that it means
that I need two "new document" type functions—one for when the
application is started and there's no existing document to own the
prompt, and another for when there is. The issue isn't just with
application startup though. I have the same problem if the "new
document" function is run as a callback from the menu for the
application interface. At least that gives me a better reason to have
duplicated code—it seems that I need almost, but not quite, identical
callbacks for normal interface menus and application interface menus.
Needless to say, it's a bit irritating that I need two sets of
callbacks for a File menu that is conceptually the same for the
application interface and for document interfaces. With any luck,
someone will chime in and tell me what I'm doing wrong.
Thanks in advance, //JT
--
Joshua Taylor, http://www.cs.rpi.edu/~tayloj/