I'm writing an export plugin that will upload to a website (another one of these...). When the plugin is opened, it checks whether the log-in information for the website could be read from the preferences. If not, I want to show a sheet where the user can enter that information.
Unfortunately, I don't seem to be able to find the correct place for
[NSApp beginSheet:loginWindow modalForWindow:[_exportManager window] modalDelegate:nil didEndSelector:nil contextInfo:nil];
as the sheet attaches to the main workspace instead of to the plugin window. When I open the sheet via a button in the GUI of the plugin, it works as expected.
Is there a way to find out, when the plugin window has been opened and the focus has changed?
Thanks!
Daniel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Aperture-dev mailing list (Apertu...@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/aperture-dev/aperture-dev%2Bgarchive-9674%40googlegroups.com
This email sent to aperture-dev+...@googlegroups.com
Which places have you tried? Have you tried putting it in awakeFromNib?
Steven
> https://lists.apple.com/mailman/options/aperture-dev/steven%40bluecrowbar.com
>
> This email sent to ste...@bluecrowbar.com
One option is listen for a notification when the window becomes the key window, then show the sheet, in your initWithAPIManager method add the listener.
Something like:
[[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector(exportWindowDidBecomeKey:)
name: NSWindowDidBecomeKeyNotification
object :nil];
I hope that helps.
Richard
> https://lists.apple.com/mailman/options/aperture-dev/rlaing%40mac.com
>
> This email sent to rla...@mac.com
Richard Laing
-------------------
Thanks for your help! After sending the email to the list last night, I consulted my Cocoa book (something I should have done before...) and also found the option of listening to the notifications from the export window. So, that's what I've implemented now, and it seems to work :)
Cheers from Switzerland
Daniel