"Visible at Launch" again, with "least" example
"Visible at Launch" again, with "least" example
- Subject: "Visible at Launch" again, with "least" example
- From: Dale Jensen <email@hidden>
- Date: Tue, 3 Jul 2007 15:33:11 -0500
Lacking response the first time, I'll ask again -- how do I, in a
NSDocument based application, prevent the program from displaying
(not opening, I do need it to create the window,) an empty window on
startup?
Very simple to create an example... in Xcode, create a new, Cocoa
Document-based application. Run it. Note the window showing up.
Look at the source, there's no code to display the window. Look at
the Nib, the "Visible at Launch" isn't checked.
Thanks again for any input!
-Original message-
I have a custom browser, using a webkit view in an NSDocument window,
and it has an issue.
Normally, I want an untitled document to open and show automatically
when the application starts up. It currently does this.
However, I also want the ability to open but NOT show the window once
in a while. I cannot get the application to do this -- the best that
I can do is to put a "orderOut:nil" in my window controller class to
hide the window -- the thing seems insistent on being visible, the
result being a very annoying flashing.
To test this, I removed every instance of "display:YES" and
"makeKeyAndOrderFront: nil" out of the code, and it still flashes the
window. The "Visible at Launch Time" flag in IB is UNchecked. I
checked and unchecked it a couple of times to make sure.
I thought to override ShowWindows, ShowWindow or
makeKeyAndOrderFront, but either the window is nil or it's already
created and visible when the call is made.
Subsequent instances of the NSDocument webview window do not seem to
have this problem -- they remain hidden until brought forth
explicitly, but not the initial one. I did a fair bit of archive
scouring and only found messages asking essentially the same
question, without response.
--
a.d. jensen -- email@hidden http://homepage.mac.com/adjensen/
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden