• 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: Newbie. Creating SubViews that aren't associated with NSWindow, or NSPanel?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie. Creating SubViews that aren't associated with NSWindow, or NSPanel?


  • Subject: Re: Newbie. Creating SubViews that aren't associated with NSWindow, or NSPanel?
  • From: Carlos Eduardo Mello <email@hidden>
  • Date: Thu, 11 Dec 2008 00:11:12 -0200

Maybe I 'm getting all this wrong, but from everything I read on this thread, apparently the OP wants to do something simple and is trying to do more work than necessary:

"Now what I want to do is show/hide view1/view2 depending on which
button you click. What I'm confused about is achieving "tab" like
behavior, without using a tab view."

So Aaron,

why don't you just go in IB, create a window, place your toolbar/ buttons and layout both views directly on your window, add outlets to them + actions to the buttons in your app controler, and then just hide/show the correspondding views in the action code? It doesn't really answer your original question, but maybe solves what you declared you want to do.

(something along these lines...)

<untested-incomplete code>

@interface  // ...
{
	IBOutlet NSView * _view1;
	IBOutlet NSView * _view2;
}
- (IBAction)switchToView1;
- (IBAction)switchToView2;
@end

// ...

- (IBAction)switchToView1
{
	[  _view2 setHidden:YES ];
	[  _view1 setHidden:NO ];
	// ...
}

- (IBAction)switchToView2
{
	[  _view1 setHidden:YES ];
	[  _view2 setHidden:NO ];
	// ...
}

</untested-incomplete code>

_______________________________________________

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: Newbie. Creating SubViews that aren't associated with NSWindow, or NSPanel?
      • From: "aaron smith" <email@hidden>
References: 
 >Newbie. Creating SubViews that aren't associated with NSWindow, or NSPanel? (From: "aaron smith" <email@hidden>)
 >Re: Newbie. Creating SubViews that aren't associated with NSWindow, or NSPanel? (From: Brandon Walkin <email@hidden>)
 >Re: Newbie. Creating SubViews that aren't associated with NSWindow, or NSPanel? (From: "aaron smith" <email@hidden>)
 >Re: Newbie. Creating SubViews that aren't associated with NSWindow, or NSPanel? (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: Countdown With NSTimer - Hours, Minutes, Seconds Remaining?
  • Next by Date: Re: Live updating NSPredicateEditorRowTemplate?
  • Previous by thread: Re: Newbie. Creating SubViews that aren't associated with NSWindow, or NSPanel?
  • Next by thread: Re: Newbie. Creating SubViews that aren't associated with NSWindow, or NSPanel?
  • Index(es):
    • Date
    • Thread