• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: "Visible at Launch" again, with "least" example
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Visible at Launch" again, with "least" example


  • Subject: Re: "Visible at Launch" again, with "least" example
  • From: PGM <email@hidden>
  • Date: Tue, 3 Jul 2007 22:04:37 -0400


The NSDocument holds a webview that loads while the program loads. The instance where I want to not show the window is when the user needs to agree to a EULA. They can't have access to what's in the NSDocument window until they've followed through that process.


I can, I suppose, rewrite it to not open an untitled window on startup if they need to okay the EULA, then have the application open the untitled window once they're beyond that, but it seems a lot of extra code and potential failure points to correct a minor error in behaviour.


How about using a modal panel to show the EULA? If you do this in your document's windowControllerDidLoadNib method, the modal will appear before the window appears (if I recall correctly).


A very ugly hack that I have used to make a document window disappear before it is shown (without a flash) is by calling the following method in windowControllerDidLoadNib.

-(void)disappear
{
//simply make the window fully transparent, then close document
[theWindow setAlphaValue:0.0];
[self close];
//make frontmost document the key window (does not work without delay)
if([[NSApp orderedDocuments] count] > 0){
[[[[NSApp orderedDocuments] objectAtIndex:0] window] performSelector:@selector(makeKeyAndOrderFront:) withObject:nil afterDelay:0.001];
}
}


Hope this helps, Patrick
_______________________________________________

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


  • Follow-Ups:
    • Re: "Visible at Launch" again, with "least" example
      • From: Dale Jensen <email@hidden>
References: 
 >"Visible at Launch" again, with "least" example (From: Dale Jensen <email@hidden>)
 >Re: "Visible at Launch" again, with "least" example (From: Scott Anguish <email@hidden>)
 >Re: "Visible at Launch" again, with "least" example (From: Dale Jensen <email@hidden>)
 >Re: "Visible at Launch" again, with "least" example (From: Scott Anguish <email@hidden>)
 >Re: "Visible at Launch" again, with "least" example (From: Dale Jensen <email@hidden>)

  • Prev by Date: Re: Core Data and Document Packages
  • Next by Date: Re: Core Data: first NSKeyValueObservingOptionOld is Null
  • Previous by thread: Re: "Visible at Launch" again, with "least" example
  • Next by thread: Re: "Visible at Launch" again, with "least" example
  • Index(es):
    • Date
    • Thread