Hello,
I've written a VSTack extending widget that downloads tweets from Twitter, and shows them in a timeline (I created a Timeline widget that is). I created a custom DataSource that does the hooking up to the Twitter API, to integrate with SmartGWT DataBoundComponents easier.
Now here's the strange thing: it works on development mode, not on deployed mode, eventhough:
1. The SmartClient Dev Console says that the RPC worked, and that the tweets arrived at the client. Also, some log statements tell me there are 20 items in the RecordList.
2. There is definitely code that adds it to a container (Each tweet is a custom Widget, and it definitely gets added to the Timeline VStack)
3. Deployed mode Dev Console says that the DOM is empty, ie. tweets are not added to the VStack.
4. The logs indicate that this loop is not executed, eventhough it should, because the first log statement does say 'Fetched 20 tweets from Twitter':
I am using SmartClient Version: SC_SNAPSHOT-2011-11-10/PowerEdition Deployment (built 2011-11-10)
In similar fashion I implemented a Facebook connection that shows FB messages in a timeline. In fact they get aggregated in a single timeline. And the FB things DO work, while architecture-wise they are similar.
Any idea what this could be? I know this is not a testcase, but are there Developer Console settings that I can use to investigate what happens?
I've written a VSTack extending widget that downloads tweets from Twitter, and shows them in a timeline (I created a Timeline widget that is). I created a custom DataSource that does the hooking up to the Twitter API, to integrate with SmartGWT DataBoundComponents easier.
Now here's the strange thing: it works on development mode, not on deployed mode, eventhough:
1. The SmartClient Dev Console says that the RPC worked, and that the tweets arrived at the client. Also, some log statements tell me there are 20 items in the RecordList.
2. There is definitely code that adds it to a container (Each tweet is a custom Widget, and it definitely gets added to the Timeline VStack)
3. Deployed mode Dev Console says that the DOM is empty, ie. tweets are not added to the VStack.
4. The logs indicate that this loop is not executed, eventhough it should, because the first log statement does say 'Fetched 20 tweets from Twitter':
Code:
Log.debug("Fetched: "+rl.getLength()+ " tweets from Twitter."); //rl.getLength() logs to be '20' tweets.clear(); for(int i = 0; i < rl.getLength(); i++){ Record r = rl.get(i); Log.debug("Tweet with id: "+r.getAttributeAsString("id")); //this statement is never logged. TwitterEntryWidget w = new TwitterEntryWidget(r,post); tweets.put(r.getAttributeAsString("id"), w); timeline.addEntry(r.getAttributeAsDate("createdAt"), w, TWITTER, r.getAttribute("id"), r.getAttribute("tweet")); } //timeline.addEntry does the adding to the VStack, using addMember()
In similar fashion I implemented a Facebook connection that shows FB messages in a timeline. In fact they get aggregated in a single timeline. And the FB things DO work, while architecture-wise they are similar.
Any idea what this could be? I know this is not a testcase, but are there Developer Console settings that I can use to investigate what happens?
Comment