diff options
author | Andrew Haines <andrewd207@aol.com> | 2010-08-15 09:22:59 -0400 |
---|---|---|
committer | Andrew Haines <andrewd207@aol.com> | 2010-08-15 09:22:59 -0400 |
commit | 917a2daf4ff769ad27631e6c71a7b919c47e4ecb (patch) | |
tree | c524983404bd70c97c17395995f962cdf41899cc /src/corelib/fpg_msgqueue.inc | |
parent | 77245bbf79e8568ba143cd7654e8aba352253a81 (diff) | |
parent | 59df247d7a5ff46cc8ac697526510b2ff6cbe5d2 (diff) | |
download | fpGUI-917a2daf4ff769ad27631e6c71a7b919c47e4ecb.tar.xz |
Merge branch 'master' of ssh://fpgui.git.sourceforge.net/gitroot/fpgui/fpgui
Diffstat (limited to 'src/corelib/fpg_msgqueue.inc')
-rw-r--r-- | src/corelib/fpg_msgqueue.inc | 35 |
1 files changed, 10 insertions, 25 deletions
diff --git a/src/corelib/fpg_msgqueue.inc b/src/corelib/fpg_msgqueue.inc index 80e0be96..386178d9 100644 --- a/src/corelib/fpg_msgqueue.inc +++ b/src/corelib/fpg_msgqueue.inc @@ -171,12 +171,7 @@ begin m.Dest := Dest; m.Params := aparams; -// try - m.Dest.Dispatch(m) -// except -// on E: Exception do -// {$IFDEF DEBUG}writeln('fpgSendMessage Caught Exception: ' + E.Message){$ENDIF}; -// end; + fpgDeliverMessage(m); end; procedure fpgSendMessage(Sender, Dest: TObject; MsgCode: integer); overload; @@ -190,12 +185,7 @@ begin m.Sender := Sender; m.Dest := Dest; -// try - m.Dest.Dispatch(m) -// except -// on E: Exception do -// {$IFDEF DEBUG}writeln('fpgSendMessage Caught Exception: ' + E.Message){$ENDIF}; -// end; + fpgDeliverMessage(m); end; procedure fpgDeliverMessage(var msg: TfpgMessageRec); @@ -207,21 +197,16 @@ begin msg.Dest.Free else begin -// try - msg.Dest.Dispatch(msg); - if fpgApplication.FMessageHookList.Count > 0 then + msg.Dest.Dispatch(msg); + if fpgApplication.FMessageHookList.Count > 0 then + begin + for i := 0 to fpgApplication.FMessageHookList.Count - 1 do begin - for i := 0 to fpgApplication.FMessageHookList.Count - 1 do - begin - oItem := TMsgHookItem(fpgApplication.FMessageHookList.Items[i]); - if (msg.Dest = oItem.Dest) and (msg.MsgCode = oItem.MsgCode) then - oItem.Listener.Dispatch(msg); - end; + oItem := TMsgHookItem(fpgApplication.FMessageHookList.Items[i]); + if (msg.Dest = oItem.Dest) and (msg.MsgCode = oItem.MsgCode) then + oItem.Listener.Dispatch(msg); end; -// except -// on E: Exception do -// {$IFDEF DEBUG}writeln('fpgDeliverMessage Caught Exception: ' + E.Message){$ENDIF}; -// end; + end; end; end; |