• 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: NSWindow setMinSize: jumps up to current size instead
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWindow setMinSize: jumps up to current size instead


  • Subject: Re: NSWindow setMinSize: jumps up to current size instead
  • From: Jerry Krinock <email@hidden>
  • Date: Fri, 23 Aug 2013 08:22:09 -0700

On 2013 Aug 23, at 07:03, Keary Suska <email@hidden> wrote:

> Just to be sure, is autolayout enabled?

No.

> Anyway, perhaps it is a bug in reconciling minSize with minContentSize.

I know, but I really don't want to go there.  This is NSWindow, for heaven's sake.  From NeXT.  The method setMinSize: has probably been called millions of times around the world, by thousands of apps, since the time I started writing this sentence.

> What happens if you use setMinContentSize instead?

OK, I just tried that, and it seems to work properly.

Lesson: Don't use setMinSize:.  Use setContentMinSize: instead.

So I'm going to put business before science and do that.  It will require a little more logic.

Thanks for the help, Keary.

As to science, I just submitted this Document Feedback on -[NSWindow setMinSize:}

-------------------------------------------------

In -setMinSize:, it says "The minimum size constraint is enforced for resizing by the user as well as for the setFrame... methods other than setFrame:display: and setFrame:display:animate:."

This statement is confusing.  First of all, I don't see any "other" setFrame… methods.  The two methods -setFrame:display: and -setFrame:display:animate: are in fact the *only* setFrame… instance methods in the NSWindow class.  Second, please clarify what is meant by "enforce".  Does this mean that the (present or future?) window size will not change, or that the windowMinSize will not change?  I have seen a case where -setMinSize: will fail to "stick".  That is, immediately after sending this message, -minSize returns a different value than what was set.  This behavior should be explained.

-------------------------------------------------



_______________________________________________

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: NSWindow setMinSize: jumps up to current size instead
      • From: Ken Thomases <email@hidden>
References: 
 >NSWindow setMinSize: jumps up to current size instead (From: Jerry Krinock <email@hidden>)
 >Re: NSWindow setMinSize: jumps up to current size instead (From: Keary Suska <email@hidden>)

  • Prev by Date: Re: NSWindow setMinSize: jumps up to current size instead
  • Next by Date: Re: Static analyser grumbling
  • Previous by thread: Re: NSWindow setMinSize: jumps up to current size instead
  • Next by thread: Re: NSWindow setMinSize: jumps up to current size instead
  • Index(es):
    • Date
    • Thread