site_archiver@lists.apple.com Delivered-To: pro-apps-dev@lists.apple.com - (BOOL)frameSetup:(FxRenderInfo)renderInfo hardware:(BOOL*)canRenderHardware software:(BOOL*)canRenderSoftware { static BOOL sWindowHasBeenShown = NO; if (!sWindowHasBeenShown) { sWindowHasBeenShown = YES; [controller showWindowModally]; } *canRenderSoftware = NO; *canRenderHardware = YES; return YES; } On May 30, 2008, at 5:26 PM, Micah Sharp wrote: Micah Hey Team. I'm currently using [NSApplication sharedApplication]. Has anyone done this, or something like this? I'd appreciate any advice or sample code regarding showing a modal dialog when an effect starts. Thanks. Matt Rhodes Zaxwerks, Inc. _______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (Pro-apps-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/pro-apps-dev/site_archiver%40lists.ap... I wouldn't suggest displaying a window in -initWithAPIManager: since that can get called rather early in the startup process when the host app may not be ready to deal with an unexpected window. A better place would be in -frameSetup:hardware:software: since by then the world is set up and the user has just selected your effect. I tried this in a little test plugin and it seemed to work just fine: TestFxPlugWindowController* controller = [[TestFxPlugWindowController alloc] initWithWindowNibName:@"TestFxPlug"]; We don't do it at startup, but we do insert an Options button that brings up a carbon dialog. Not sure if that is helpful, but we've seen no problems. On Fri, May 30, 2008 at 4:59 PM, Matt Rhodes <matt@zaxwerks.com> wrote: We have the need to show a modal dialog box when our effect is first displayed. Is there a recommended place to do this? We're currently doing this in -initWithApiManager I'm trying to use -runModalForWindow for the modal dialog. I grab an NSWindow in a .xib (.nib) file and can display it with -runModalForWindow. I'm getting some random crashes after showing the dialog. The problem seems to be that as an effect I don't really have an NSApplication to hang onto and -runModalForWindow requires it. This email sent to site_archiver@lists.apple.com