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