home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!spool.mu.edu!news.nd.edu!mentor.cc.purdue.edu!pf@bilbo.bio.purdue.edu
- From: pf@bilbo.bio.purdue.edu (Paul Furbacher)
- Subject: Re: TVision : BUG in my head or in TV?
- Message-ID: <C03wrE.MH@mentor.cc.purdue.edu>
- Sender: news@mentor.cc.purdue.edu (USENET News)
- Organization: Purdue University
- References: <30DEC92.02825818.0033@music.mus.polymtl.ca> <dmurdoch.262.725736007@mast.queensu.ca>
- Distribution: comp.lang.pascal
- Date: Thu, 31 Dec 1992 04:35:38 GMT
- Lines: 34
-
-
- Step wrote:
- > >What happens is this : I found out (after many bugs with this), that
- > >EndOfStatic (my before-adding-spaces-to-AText-length) is set to 0
- > >after the call to TStaticText.Init! Why is this so?
-
- Duncan Murdoch wrote in response:
- > This is a nasty surprise designed into TurboVision. TObject.Init zeroes out
- > all fields of any descendant. It's not done that way in OWL, and shouldn't
- > be in TurboVision, but Borland won't change it now because they're afraid of
- > breaking existing code.
-
- I'm sometimes slow to pick up on why some things are
- problems. There are pieces of advice here and there in
- the manual that the fields are set to zero, and that one
- should not set any field before calling the ancestor's
- Init() method. As long as one follows that prescription,
- no problems are encountered.
-
- Please give me an example of why one would have to set a
- field *before* calling the ancestral Init(). It seems to
- me to be unlikely that this would be necessary in 99.9999999%
- of all cases. (I would have added a few more 'nines' but
- the nine key broke. Don't use toooo much of a gooooood thing.)
-
- Seriously, if you have to do something with the value of
- a parameter passed to Init(), you could save it to a local
- variable, manipulate it, call the ancestor, and then set
- the field. Or something like that.
-
- PF
-
-
-
-