Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Keep Default.png splash displayed until app is ready

I found the Q&A about delaying the tabGroup.open() by using the setTimeout() function. My problem, though, is that it seems like none of my code in my primary window is being processed while the default screen is displayed. So the app isn't ready no matter how long I set the timeout for. Does anyone have an idea for how to accomplish this?

— asked July 6th 2010 by Donald Hughes
  • default
  • iphone
  • splash
0 Comments

2 Answers

  • I don't think you can have code in other window's processed while the default screen is shown. However, I would expect you could run code in the main app.js. Doesn't that work?

    — answered July 8th 2010 by Martijn Pannevis
    permalink
    1 Comment
    • What I'm experimenting with right now is having a window that looks like the splash open first and stay displayed until another piece of code is finished. But it the moment it just hangs indefinitely. I'll need to add some debugging info to see where the hangup is. Somehow I'm not getting cross-window communication with this piece.

      I'm trying to avoid putting very much code in the app.js since the app I'm working on will have several variants and I want to avoid maintaining shared code in multiple places.

      This is one of those things that just seemed to work out of the box in objective-c (though I have no desire to return to that unhappy place).

      — commented July 8th 2010 by Donald Hughes
  • Open a first window that only display the same image as Default.png, maybe with a loading indicator to show the user something is happening.
    After your app is loaded get rid of this window.

    — answered July 8th 2010 by Dan Tamas
    permalink
    1 Comment
    • Thanks, that's actually what I'm trying to get working right now.

      — commented July 8th 2010 by Donald Hughes
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.