spazproject / Spaz-Enyo

A version of Spaz targeted for tablet devices
http://getspaz.com
Other
45 stars 10 forks source link

Delay initial rendering until preferences load #18

Closed funkatron closed 13 years ago

funkatron commented 13 years ago

We need to not render anything until the preferences load. How to we delay this?

dcousineau commented 13 years ago

In the create method for the Spaz kind, anything that blocks the self.inherited(arguments); blocks rendering, once SpazPrefs.load() gets fleshed out, initAppObject() could pass in a callback with some kind of failover?

funkatron commented 13 years ago

Yeah, you could pass the callback and make sure it goes into the callback for prefs.load(). Wanna try that?

dcousineau commented 13 years ago

I can toss something together and just have SpazPrefs.load just trigger a callback since it's a stub anyways

dcousineau commented 13 years ago

Yeah, I'll add success and fail callbacks to SpazPrefs.load later tonight, I experimented and got it to completely block loading of Spaz until prefs were loaded.

funkatron commented 13 years ago

Perfect, thanks. Also need to think about how we're storing prefs (thinking Lawnchair using webSQL) but that's another issue

willhoney7 commented 13 years ago

We should be able to do this stuff in index.html before calling "new Spaz().renderInto(document.body);"

funkatron commented 13 years ago

I think it would be better to keep it within the Spaz kind code if possible.

willhoney7 commented 13 years ago

Sure. We will have to do the multi-stage stuff in the index.html, so it may be better to separate too.

dcousineau commented 13 years ago

080633587c5780230603a71202a71b280243135c should take care of this quite nicely for now.