• 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: NSView resizing problems.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView resizing problems.


  • Subject: Re: NSView resizing problems.
  • From: Ken Ferry <email@hidden>
  • Date: Mon, 20 Sep 2010 13:20:26 -0700

On Mon, Sep 20, 2010 at 7:52 AM, Keary Suska <email@hidden>wrote:

> On Sep 20, 2010, at 5:45 AM, Geoffrey Holden wrote:
>
> > My problem is that when I load this view into a tab (using the attached
> > code), the textview doesn't fit on the screen.  It covers up the top
> > textfield and seems to have it's top edge somewhere above the tabview (as
> > follows)
>
> The most common reason for this is that you are shrinking the view such
> that it forces the subviews to overlap, which creates an undefined situation
> that the view cannot handle.
>
> > Messenger* messenger = [[Messenger alloc] initWithApp:@"Messenger"
> > :self];
> > [currentConversations setObject:messenger forKey:[NSNumber
> > numberWithInt:convId]];
>
> And here is where you are doing it:
>
> > NSView* newView = [[[NSView alloc] init] autorelease];
>
> This is not the designated initializer. Don't do this.
>

FYI, designated initializers are something subclassers need to be aware of,
not users of class.

You can use whatever init method you want to make an object.

-Ken
Cocoa Frameworks


>
> > [newView setAutoresizesSubviews:YES];
> > [[messenger view] setFrame:[newView frame]];
>
> Why do you expect [newView frame] to return a sensible value?
>
> HTH,
>
> 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
>
_______________________________________________

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: 
 >NSView resizing problems. (From: Geoffrey Holden <email@hidden>)
 >Re: NSView resizing problems. (From: Keary Suska <email@hidden>)

  • Prev by Date: creating docx file
  • Next by Date: NSSavePanel
  • Previous by thread: Re: NSView resizing problems.
  • Next by thread: re; Distributed object vending problem
  • Index(es):
    • Date
    • Thread