home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / pascal / 6754 < prev    next >
Encoding:
Internet Message Format  |  1992-11-19  |  2.2 KB

  1. Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!usc!rpi!uwm.edu!linac!att!cbnewsi!cbnewsh!att-out!oucsboss!oucsace!tswingle
  2. From: tswingle@oucsace.cs.ohiou.edu (Tom Swingle)
  3. Newsgroups: comp.lang.pascal,comp.lang.os.msdos.programmer
  4. Subject: Broadcast messages aren't getting through in Turbo Vision
  5. Message-ID: <1992Nov20.051126.23961@oucsace.cs.ohiou.edu>
  6. Date: 20 Nov 92 05:11:26 GMT
  7. Organization: Ohio University CS Dept,. Athens
  8. Lines: 34
  9.  
  10.  
  11. I am using Turbo Vision under Turbo Pascal 6.0.  Here is my problem:
  12.  
  13. I have a window type that is descended from TWindow.  Each of these windows
  14. contains a unique, non-nil PString for its title.  In my code to open this
  15. type of window, I first have it check to see if a window with an identical
  16. title is already open before proceeding; if so, this is reported as an error.
  17. I am proceeding as described on pages 128-129 of the Turbo Vision Guide.
  18.  
  19. I have defined a constant called cmAcknowledge that represents the command to
  20. report that a window of this type is open.  My message looks like this:
  21.  
  22.     Message(DeskTop,evBroadcast,cmAcknowledge,@Title)
  23.  
  24. where Title is the string to be checked against.  Thus, the InfoPtr field of
  25. the event generated becomes a PString containing the title to be checked 
  26. against.  Upon receiving the cmAcknowledge command, the view checks to see if
  27. PString(InfoPtr)^=Title^ and if so, clears the event to signify that it has
  28. handled it.
  29.  
  30. All this is set up correctly.  I am able to successfully generate the event
  31. with the parameters desired, but the event is being cleared prematurely.  The
  32. first line of my HandleEvent method calls TWindow.HandleEvent(Event), and
  33. when it does, the event gets cleared.  This happens regardless of what value
  34. I choose for cmAcknowledge.  The Turbo Vision Guide says TWindow only responds
  35. to broadcast events of cmSelectWindowNum.  Why would this particular event get
  36. cleared?  Am I missing something?
  37.  
  38. Any advice or suggestions would be appreciated.  Thanks in advance.
  39. -- 
  40. "The problem you are experiencing is  |  "To be sure of hitting the target, 
  41. not with the network nor with the     |  shoot first and, whatever you hit, 
  42. station.  Please adjust your set."    |  call it the target." 
  43. More ramblings from: tswingle@oucsace.cs.ohiou.edu/tswingle@bigbird.cs.ohiou.edu
  44.