Saturday, August 31, 2013

Post #25 Sencha! Sencha!

When I decided to go with Sencha, I knew the learning curve will be steep. Learning vs reward is high. The documentation is adequate to get you started. To lure you in. But once you get in, you can get into a quagmire of intricacies that can ruin your schedule.

Since 5 in the evening I've been working on changing the title of the chart. It was harrowing... Things I learnt
- Unless you set the title in the config, setTitle won't work
- Real time waste was changing the Title of Charts. I have a TabPanel. Within that I have a list. On Tap, I bring up the Charts. This is an overlay on the list. There are 3 Charts in a Carousel. Each with a different title.As I browse through the carousel, the title wouldn't change. When setting the first title, I could do so easily. But changing... No Sir! After a lot of going round in circles, I finally read a line in one of the forums. Reference the navigation bar. Though it was under a different context, I thought it worth while to try that out. Afterall, I was't going forward at all.
It worked. So, to change the title after the carousel starts is to go up to the navifationBar and change the title.

There was similar agony, when I tried updating BadgeText. Simply updating the TabPanel's BadgeText, would not do. I had to put a .tab. in the middle to get there. Again I spent a lot of time and a one liner in some forum rescued me.

There was another one related to JsonP. Not so much Sencha, but as I was using Sencha learning tutorial, I'll put it on Sencha. When dealing with JsonP, one needs to wrap the Json response in a callback function. I did not know it. I would if I had worked on it earlier or tried to learn it. But the lesson was on Sencha. It took me good amount of time to get around it.

All in all, there are landmines in there. Be careful. Learning curve is steep.

Nonetheless, I'm moving fwd.

No comments: