Results 1 to 2 of 2
  1. #1

    Question Javascript example needed: func to sub and unsub to an item + func called on new data

    Hi,

    Im new to LS, so far it looks very exiting. Having completed the hallo world, I have the below very basic requests, as I prefer to put all in black-box functions with input and output:

    All using a 2 dimensional array. The array can be of fixed size, ie 100 rows with 4 columns.

    0) A function or code snippet which initiates LS;


    1) A function or code snippet which subscribes to a parameter ( a new row in the 2D array ), for example called with;
    function Subscribe( item_name, row,column);

    2) A function or code snippet which is called each time a value in the array has changed / a new value has been received, for example called with;
    function OnReceive( row,column);

    This is very much appreciated.
    Last edited by JanA; August 4th, 2013 at 01:39 PM.

  2. #2
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    Hi,

    I would suggest to go through our demos and see if there is something resembling your use case: http://www.lightstreamer.com/demos

    I think your case is somewhat similar to what is done here: http://demos.lightstreamer.com/GridDemo/
    The handle on the right commands subscriptions and unsubscriptions

    On the other hand, if subscriptions and unsubscriptions have to be commanded by the adapter itself you may look at thius one: http://demos.lightstreamer.com/PortfolioDemo/

    HTH

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 04:38 AM.