discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBox bug?


From: Adam Fedor
Subject: Re: NSBox bug?
Date: Thu, 06 Mar 2003 20:30:31 -0700
User-agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.1) Gecko/20020905



Marko Riedel wrote:
Hi folks,

there seems to be a bug in NSBox's "sizeToFit": as far as I can see,
there are three cases:

(1) if the contentView responds to sizeToFit, then pass it on (this is
okay)

(2) if the contentView has at least one subview, then union the frames
of the subviews (this too is okay)

or

(3) otherwise zap the frame of the contentView.


The bug is caused by (3), namely if the contentView is a perfectly
well-behaved view with no subviews its frame is zapped! In this case
NSBox should leave the frame as is.


I don't know. The documentation is a little ambiguous, but it does say that if the content view does not respond to sizeToFit, then the box sizes the view itself, so perhaps it really should be something like:


      else // _content_view has no subviews
        {
          [_content_view setFrame: [self calcSizesAllowingNegative: NO]];
        }


Do you have an example where this is does not work right?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]