-
January 21st, 2010, 12:25 PM
#1
Nevertheless I think the getters should be "usable" even before "addTable()", i.e. they would just return "null". If you say "..can't use them before.." it sounds as if that would result in an error, so I just wanted to clarify this point.
right
IMHO it would be even better if there were dedicated callback interfaces similar to "onStart()", something in the line of "onAdd()" and "onRemove()", because
if I'm not mistaken "onStart()" is not necessarily called right away after the "addTable()"-call finishes, but only after the the Lightstreamer server has received and answered the subscription-request. This would mean that "onStart()" wouldn't be called if there's a network problem, even though the HTML cells have been processed by the "addPage()"-call, so the table-objects knows which fields and items the table contains.
And as far as I can tell there's no way at the moment to get notified if a table is removed via "removeTable()", not even a counterpart to "onStart()" like "onStop()".
you don't need such events as:
onAdd would be fired during the addTable execution that's called by you
onRemove would be fired during the removeTable execution that's called by you
onStop would be fired just before an onStatusChange("DISCONNECTED") event or before an onEngineLost() one, so that you already have a place to hndle such event.
In conclusion I think that, at least for the moment, those events will not be included.
By the way, I just noticed that the "onStart()"-callback has no parameter - wouldn't it be a good idea to hand a reference to the table-object to the called function, i.e. change the "onStart()"-definition from [...]
you can use the this from inside the onStart callback to check wich table you're processing
..what happens during the second call to 'addTable()'? Does the Lightstreamer library remember that it already searched through the DOM for that particular table identifier, or is the DOM-search repeated? This would be good to know for the use-case of manipulating the DOM via JavaScript, i.e. adding another table row dynamically..
The library does the search on the DOM each time the addTable is called, so you can remove a table, change the html and re-add the same "null-null" table resulting in a table with a different group/schema.
The only exception is if you give a ScreenTableHelper to the PushPage. In such case the DOM is never searched, so, to change the group/schema of your "null-null" table, you should, remove the table, add new cells to the ScreenTableHelper instance and re add the table.
HTH
Similar Threads
-
By gani in forum Client SDKs
Replies: 1
Last Post: May 19th, 2010, 09:26 AM
-
By jakov.semenski in forum Client SDKs
Replies: 3
Last Post: November 26th, 2008, 05:14 PM
-
By Alessandro in forum General
Replies: 6
Last Post: July 1st, 2008, 02:26 PM
-
By jamesclinton in forum Client SDKs
Replies: 2
Last Post: April 16th, 2007, 12:54 PM
-
By rsouissi in forum Adapter SDKs
Replies: 4
Last Post: January 10th, 2007, 06:11 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 08:17 PM.
Bookmarks