|
Well, that did work (after I fixed a bunch of other issues) so thanks indeed :)
On Aug 3, 2007, at 4:11 PM, Bruce Johnson wrote: I started here to get the carbon-cocoa stuff going: http://developer.apple.com/documentation/Cocoa/Conceptual/CarbonCocoaDoc/index.html?http://developer.apple.com/documentation/Cocoa/Conceptual/CarbonCocoaDoc/Articles/CarbonCocoaComm.html
and then in a c-wrapper function: OSStatus orderWindowFront(Boolean makeKey) { NSAutoreleasePool *localPool; localPool = [[NSAutoreleasePool alloc] init]; [[myController sharedController] showWindow: makeKey]; [localPool release]; return noErr; }
and then in the cocoa controller class:
- (void) showWindow: (Boolean) makekey { [NSApp beginSheet: myWindow modalForWindow: nil modalDelegate: nil didEndSelector: nil contextInfo: nil]; ........ [NSApp runModalForWindow: myWindow]; // Dialog is up here. }
On 8/3/07, Óscar Morales Vivó <email@hidden> wrote: It's not a sheet that I want, but an actual app-level modal dialog/ panel.
On Aug 3, 2007, at 11:04 AM, Frederick Cheung wrote:
> > On 3 Aug 2007, at 15:49, Óscar Morales Vivó wrote: > >> Sorry if I've posted this one already, I think it silently died in >> a Mail.app glitch but I might be wrong. >> >> I'm trying to present a modal cocoa window within a carbon app, and >> I'm not sure how to proceed about it. Trying to run using the Cocoa >> method ([NSApp runModalForWindow:]) won't work at all, not even >> making the window appear. I guess it must be something related to >> the run loop being a carbon one, but I haven't found anything in >> the docs to guide me there. >> >> Any help will be greatly appreciated. >> > Attaching a cocoa sheet to a carbon window (or vice versa) doesn't > really work. You can get it to display but there are all sorts of > things that don't work (there was a thread about this a few weeks > ago) I seem to recall reading here that this would be fixed in Leopard > > Fred
_______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list ( email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden
-- ---- Bruce Johnson email@hidden _______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden
|