Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
-glen- #1
Member since Sep 2009 · 16 posts
Group memberships: Members
Show profile · Link to this post
Subject: OnMessage Function Sometimes Not Firing
Hello There,

         I just like to clarify if all received messages will pass through the OnMessage Function..because sometimes it will not pass.It will directly call the IncomingMessage in my chat Form..

Thank you in advanced..
glen
Avatar
Alex #2
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
all message stanzas fire the OnMessage callback. I assume your IncomingMessage handler in the chatform is also a OnMessage callback. Its possible that you have an unhandled exception in your code which stops the handlers.

Alex
Avatar
-glen- #3
Member since Sep 2009 · 16 posts
Group memberships: Members
Show profile · Link to this post
Hi sir,
      i just following the minclient example..did the miniclient example provide 2 messagecallback...because i found 2callback..the OnMessageCallback in the mainForm and MessageCallback in the chatForm..
Avatar
-glen- #4
Member since Sep 2009 · 16 posts
Group memberships: Members
Show profile · Link to this post
Subject: hello!
Hi There sir,

i just like to up this question again.i cant get this work,i copy the miniclient vb code..what i want to do is everytime i received a message i want it to pass always in OnMessage() in my MainForm..currently,sometimes it will not pass in OnMessage..it will directly go to my ChatForm..in MessageCallback i just copy the miniclient vb code..

please any suggestion sir.

thank you.
Avatar
Alex #5
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
  • The OnMessage handlers fires on all messages.
  • The MessageGrabber fires only on messages which apply to the filter you set.
  • unhandled exceptions in your code can stop the event queue. So check if there is an unhandled exception, or add try catch blocks.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS