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

Re: Loading View in Placeholder upon startup


  • Subject: Re: Loading View in Placeholder upon startup
  • From: Fritz Anderson <email@hidden>
  • Date: Mon, 26 Nov 2007 12:00:19 -0600

The cross-post to xcode-users was unnecessary; I've removed it.

On 25 Nov 2007, at 9:25 PM, Rick Langschultz wrote:

- (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;
	}

...

[window setContentView:view];
...
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 haven't picked through all your code, but it appears SQLViewToolbarItem (which you send as sender) is an NSToolbarItem (you send sender itemIdentifier, and you don't report that sender doesn't find that method). But you treat sender as an NSString (you pass it in isEqualToString:). The isEqualToString: returns NO. So view, as of the setContentView:, is documentPlaceholderView.


I assume this is what you mean by "didn't work," though you don't say what you mean by that.

	— F

_______________________________________________

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: Loading View in Placeholder upon startup
      • From: Rick Langschultz <email@hidden>
References: 
 >Loading View in Placeholder upon startup (From: Rick Langschultz <email@hidden>)

  • Prev by Date: Re: More GC. Now with NSData
  • Next by Date: Re: Custom text via Core Text in a layer.
  • Previous by thread: Loading View in Placeholder upon startup
  • Next by thread: Re: Loading View in Placeholder upon startup
  • Index(es):
    • Date
    • Thread