From: Chris R. <ch...@am...> - 2002-06-28 09:58:22
|
I'm trying to test a component that descends from TIBSQLMonitor. This is an Interbase Monitor that fires an OnSLQ event whenever the IB database receives a SELECT or INSERT, etc. One of my dUnit tests was to see if the OnSQL event fires as expected. However, code in another app that causes the event handler to run (a simple SELECT statement in a Query object) didn't cause the event to fire when used in a dUnit test. Looking at the TIBSQLMonitor source, the method which calls the event handler is checking for a (user defined?) Windows message WM_IBSQL_EVENT ($0401). When I set a breakpoint at the check for the .Msg value, I see that I get a $0401 message in the app, but not when running from within dUnit. Hence the event handler is never called. To try to see where the problme might lie, I had a separate app running at the same time as my dUnit tests, also with a TIBSQLMonitor running. Its event handler *was* fired by the dUnit test code even so this $0401 is floating about somewhere. I confess that I have only a rudimentary understanding of Windows messaging and even less about the internals of dUnit and TIBSQLMonitor. Does anybody have any ideas what the problem (or solution) may be? -- Chris Randle |