• 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: "aaron smith" <email@hidden>
  • Date: Wed, 10 Dec 2008 23:35:46 -0800

Thanks Carlos, that should work too.

On Wed, Dec 10, 2008 at 6:11 PM, Carlos Eduardo Mello
<email@hidden> wrote:
> 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

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>)
 >Re: Newbie. Creating SubViews that aren't associated with NSWindow, or NSPanel? (From: Carlos Eduardo Mello <email@hidden>)

  • Prev by Date: Re: Core Data warning: to-many relation does not have an inverse
  • Next by Date: Update to xcode 3.1. copystrings failing, returning error code 71?
  • Previous by thread: Re: Newbie. Creating SubViews that aren't associated with NSWindow, or NSPanel?
  • Next by thread: Setting A Background Image On A Window
  • Index(es):
    • Date
    • Thread