From owner-freebsd-libh Sun Jun 2 17:46:30 2002 Delivered-To: freebsd-libh@freebsd.org Received: from tomts17-srv.bellnexxia.net (tomts17.bellnexxia.net [209.226.175.71]) by hub.freebsd.org (Postfix) with ESMTP id DADD037B405 for ; Sun, 2 Jun 2002 17:46:24 -0700 (PDT) Received: from shall.anarcat.ath.cx ([65.94.145.70]) by tomts17-srv.bellnexxia.net (InterMail vM.5.01.04.19 201-253-122-122-119-20020516) with ESMTP id <20020603004624.QEZI2581.tomts17-srv.bellnexxia.net@shall.anarcat.ath.cx>; Sun, 2 Jun 2002 20:46:24 -0400 Received: from lenny.anarcat.ath.cx (lenny.anarcat.ath.cx [192.168.0.4]) by shall.anarcat.ath.cx (Postfix) with SMTP id 4DE1D5; Sun, 2 Jun 2002 20:50:05 -0400 (EDT) Received: by lenny.anarcat.ath.cx (sSMTP sendmail emulation); Sun, 2 Jun 2002 20:44:43 -0400 Date: Sun, 2 Jun 2002 20:44:43 -0400 From: The Anarcat To: Max Okumoto Cc: The Anarcat , 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 Message-ID: <20020603004443.GE288@lenny.anarcat.ath.cx> References: <20020601074915.C9BFB17407@usw4.freebsd.org> <20020602004111.GC357@lenny.anarcat.ath.cx> <20020602231237.GB288@lenny.anarcat.ath.cx> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eDB11BtaWSyaBkpc" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.99i 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 --eDB11BtaWSyaBkpc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun Jun 02, 2002 at 05:39:18PM -0700, Max Okumoto wrote: > 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. > >=20 > > These kind of informations are precious to the project, and should be > > recorded in the CVS history. > >=20 > > > 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()); } > > > }; > >=20 > > But why does this *require* removing the whole minSize() functions? > > Couldn't these functions be used at some point? > >=20 > > A. >=20 > 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. Ok, I guess. > 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? Nope. =20 > If we decided to add some sort of dynamic layout code. We might > use minSize() internally. And we can fetch it from CVS history. Fine, case closed. :) A. --=20 The idea that Bill Gates has appeared like a knight in shining armour to lead all customers out of a mire of technological chaos neatly ignores the fact that it was he who, by peddling second-rate technology, led them into it in the first place. - Douglas Adams (1952-2001) --eDB11BtaWSyaBkpc Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE8+rv6ttcWHAnWiGcRArXyAKCDMK3g/fnS0T+xrKlyw3t2JlAiVQCfaDj1 uZD3dBQ/26nZq/9gHg12uAQ= =OxaC -----END PGP SIGNATURE----- --eDB11BtaWSyaBkpc-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message