home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / pascal / 7760 < prev    next >
Encoding:
Text File  |  1992-12-30  |  1.8 KB  |  47 lines

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