-
October 12th, 2010, 07:36 PM
#1
Example of using a MessageListener with sendMessage
Could you give me some sample js for using the MessageListener with sendMessage? I can't find any examples in the forum, or the demos.
Thanks.
-
October 13th, 2010, 09:18 AM
#2
Hello,
unfortunately there is nothing ready at the moment.
Do you have specific problems?
-
October 13th, 2010, 02:12 PM
#3
Just need to see an example of the syntax for creating/passing the MessageListener to the sendMessage method of the Lightstreamer engine object.
-
October 14th, 2010, 09:26 AM
#4
Hi,
so let's modify the buysell.js file of the PortfolioDemo (source code available in the Lightstreamer distribution).
First of all let's implement the MessageListener interface:
our simple implementation will simply alert us of the result of the request.
Then let's use it in the submitForm method.
First we need a simple counter to identify the messages, so declare a "next" var before the submitForm method:
then create a MyMessageListener instance per each message and pass it to the sendMessage method
Obviously you'll implement the MessageListener interface to fit your needs
That's all.
HTH
-
October 14th, 2010, 06:37 PM
#5
Thanks - that's exactly what I needed.
Similar Threads
-
By michaelvb in forum Adapter SDKs
Replies: 2
Last Post: May 21st, 2008, 01:21 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 10:59 AM.
Bookmarks