Running a modal session
Running a modal session
- Subject: Running a modal session
- From: Michael Becker <email@hidden>
- Date: Thu, 22 Apr 2004 12:03:35 +0200
Hello!
I have a window, where I programmatically change the contentViews,
depending on the buttons clicked by the user (it's a wizard-like "back"
and "next" thing). Now I want this window to be a modal window for my
application. When the window is first opened, it displays a progress
indicator while the application connects to a server. When it is
connected, it should display the following contentView.
However:
If I use "[NSApp runModalForWindow:[ self window]];" the window is
modal (that is, a click in the main application window results in
nothing but a "pling" sound, which is exactly what I want), but the
application will keep showing the spinning progress indicator. Most
obviously this is so, because the code to show the next contentView is
not directly associated to the window.
And if I set up a session like that:
session = [NSApp beginModalSessionForWindow:[ self window]];
[ NSApp runModalSession:session];
everything works fine, except that I can now still click and operate on
my main application window, which stays in the background.
I hope that it is pretty clear what I want to achieve ("wizard"-like
view-flipping without being able to click around in the main
application window). What is the best way to do this?
Best regards,
Michael
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.