• 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
Loading View in Placeholder upon startup
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Loading View in Placeholder upon startup


  • Subject: Loading View in Placeholder upon startup
  • From: Rick Langschultz <email@hidden>
  • Date: Sun, 25 Nov 2007 21:25:14 -0600

Hello everyone,

I have a document-based application which users a placeholder view that loads a view from MyDocument.nib. When the application loads the window is blank. I want to be able to view the default view when i start up the application, any ideas?

Here is my code to update the view:

- (void)setDocumentView:(id)sender {
NSView *view = documentPlaceholderView;
if (sender) {
NSString *identifier = [sender itemIdentifier];
if ([identifier isEqualToString:SQLViewToolbarItem])
view = sqlModeView;
else if ([identifier isEqualToString:TSDataViewToolbarItem])
view = dataModeView;
else;
}


NSWindow *window = [self window];
if ([window contentView] == view)
return;
NSRect windowRect = [window frame];

   

    [view setHidden:YES];
    [window setFrame:windowRect display:YES animate:NO];
    [window setContentView:view];
    [view setHidden:NO];
}

I tried to use the awakeFromNib method to load this by calling [ApplicationController setDocumentView:SQLViewToolbarItem]; but this didn't work. Then I tried to use windowDidLoad and that didn't work...

I can't figure it out.

Thanks,
Rick

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: XC3: text macros, autocompletion
  • Next by Date: Re: Interface Builder - Classes query
  • Previous by thread: Re: Query object seg. faults on destruction...(wrong forum, sorry)
  • Next by thread: Not sure what "Non-aligned pointer being freed" means...
  • Index(es):
    • Date
    • Thread