From owner-freebsd-libh Sun Jun 2 17:39:22 2002 Delivered-To: freebsd-libh@freebsd.org Received: from postal.sdsc.edu (postal.sdsc.edu [132.249.20.114]) by hub.freebsd.org (Postfix) with ESMTP id C574337B400 for ; Sun, 2 Jun 2002 17:39:19 -0700 (PDT) Received: from multivac.sdsc.edu (multivac.sdsc.edu [132.249.20.57]) by postal.sdsc.edu (8.11.6/8.11.6/server/38) with ESMTP id g530dIN00976; Sun, 2 Jun 2002 17:39:19 -0700 (PDT) Received: by multivac (8.11.6+Sun/1.11-SolarisClient) id g530dIZ02790; Sun, 2 Jun 2002 17:39:18 -0700 (PDT) To: The Anarcat Cc: libh@FreeBSD.ORG Subject: Re: cvs commit: libh/include/hui HuiTVObjects.hh libh/lib/hui HuiTVision_ButtonsGroupWidget.cc HuiTVision_CheckBoxesWidget.cc HuiTVision_InputLineWidget.cc HuiTVision_LabelWidget.cc HuiTVision_ListBoxWidget.cc HuiTVision_ProgressIndicatorWidget.cc HuiTVision_RadioMenuWidget.cc References: <20020601074915.C9BFB17407@usw4.freebsd.org> <20020602004111.GC357@lenny.anarcat.ath.cx> <20020602231237.GB288@lenny.anarcat.ath.cx> From: Max Okumoto Date: 02 Jun 2002 17:39:18 -0700 In-Reply-To: The Anarcat's message of "Sun, 2 Jun 2002 19:12:37 -0400" Message-ID: Lines: 41 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG The Anarcat writes: > On Sun Jun 02, 2002 at 02:15:31PM -0700, Max Okumoto wrote: > > I am trying to find bugs in the widget layout code. The only > > time these functions are called is from the constructors. > > No other objects call minSize() or maxSize(), nor can you call > > them from tcl. > > These kind of informations are precious to the project, and should be > recorded in the CVS history. > > > In all cases the results are directly feed into resize() in the > > constructor. But in most cases, the widget constructor already > > sizes the object to the correct size... so its redundent to > > resize it again. The constructors that require resize need to be > > fixed. > > > > FooWidget { > > /** Constructor. */ > > FooWidget() { resize(minSize()); } > > }; > > But why does this *require* removing the whole minSize() functions? > Couldn't these functions be used at some point? > > A. Yes, it doen't require removing the function, but since nobody calls it I think removing unused code is better for maintaining the code readablity. If someone added those functions to the exported API (make it accessable to tcl) then some one might be able to use it. But internally they wouldn't be called. Did you have plans to use it from tcl? If we decided to add some sort of dynamic layout code. We might use minSize() internally. Max Okumoto To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message