• 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: addsubview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: addsubview


  • Subject: Re: addsubview
  • From: Keary Suska <email@hidden>
  • Date: Fri, 20 Apr 2012 12:10:47 -0600

On Apr 20, 2012, at 9:19 AM, koko wrote:

> Here is the code that creates and adds the subview ....The method -makeAndWrapViews is in the custom class of the NSTabViewItem view.
>
> I do get -viewDidMoveToSuperview when addSubview is called.
>
> When the tab is clicked I do get viewdidMoveToWindow
>
> But I never see thev iew!
>
> - (void)makeAndWrapViews
> {
>    NSRect frame = [self frame];

Who is "self" here? Is it the tab view item view? If so, does the tab view item know that you are using a custom subclass? Lastly, what is the origin point (to make sure it isn't being placed outside the viewable area)?

>    frame.size.width = 288;
>    frame.size.height = 259;
>
>    m_text = [[NSPDText alloc] initWithFrame:frame];
>
>  BOOL text = [NSBundle loadNibNamed:@"NSPDText" owner:m_text];
>
>      if (text)
>    {
>        [self addSubview:m_text];
>    }
> }

Does this code work when you substitute NSPDText with a canned cocoa UI object?

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

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: addsubview
      • From: koko <email@hidden>
References: 
 >Re: addsubview (From: koko <email@hidden>)
 >Re: addsubview (From: koko <email@hidden>)

  • Prev by Date: Re: addsubview
  • Next by Date: Re: Updating NSMenu while it's open
  • Previous by thread: Re: addsubview
  • Next by thread: Re: addsubview
  • Index(es):
    • Date
    • Thread