Titanium Community Questions & Answer Archive

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

focus event not firing when returning to the window

I have a win that calls another secondwin.. when returning to the win, I have a "focus" event that I want to fire.

http://pastebin.com/mhRsrh6z

but its not firing the focus event. any ideas?

— asked November 13th 2010 by vincent youmans
  • focus
1 Comment
  • Vincent

    Would you please state your target platform, whether your code is in the app.js file, and would you also provide a working script that demonstrates the issue?

    Then I'll be happy to help :)

    Cheers

    — commented November 13th 2010 by Paul Dowsett

4 Answers

  • the problem is ANDROID. and its not in app.js I will put together a working script in a couple of minutes.

    — answered November 13th 2010 by vincent youmans
    permalink
    3 Comments
    • Note that by using a comment post for this kind of update rather than the answer post, it makes the discussion much easier to following when it's closed.

      — commented November 13th 2010 by Paul Dowsett
    • i did a demo app to demonstrate the problem. The focus event works on iPHONE but not on ANDROID. I have it zipped up, but I don't know where to send it. perhaps you have a place for it?

      — commented November 13th 2010 by vincent youmans
    • Have you confirm whether or not the bug detailed in the ticket I referenced is affecting your situation?

      — commented November 13th 2010 by Paul Dowsett
  • Vincent

    There may well be a bug with this, so I have updated an closed ticket with some simple code to demonstrate the issue. If you and I haven't made some glaring error, and the bug is confirmed, I imagine that a new ticket will need to be raised. In the meantime watch #727 to keep track of it.

    Do you think you can work around the issue in some other way? If you need help, I will need to see some code to understand what you are trying to achieve.

    Not the answer you probably want, but I hope it is useful to some degree.

    — answered November 13th 2010 by Paul Dowsett
    permalink
    2 Comments
    • Vincent

      I haven't gone through this list exhaustively, so if you spot a solution or workaround that I've missed, then please let us know.

      — commented November 13th 2010 by Paul Dowsett
    • The only ANDROID workaround I can think of at the moment is to add a timer event that refreshes the screen. I have not tried it out yet. Option B would be some kind of picker like what the iPHONE has. But I dont see any pickers on the KS.

      — commented November 13th 2010 by vincent youmans
  • I put together some demo code illustrating the problem that I am having on ANDROID.
    https://gist.github.com/675571

    I am using the Ti.SDK 1.4.2 ANDROID SDK 2.2 iPhone:4.1

    this demo sometimes crashes on iPHONE, as I just tested it.
    i hope this helps deal with the issue.

    — answered November 13th 2010 by vincent youmans
    permalink
    0 Comments
  • I put together some demo code illustrating the problem that I am having on ANDROID.
    https://gist.github.com/675571

    I am using the Ti.SDK 1.4.2 ANDROID SDK 2.2 iPhone:4.1

    this demo sometimes crashes on iPHONE, as I just tested it.
    i hope this helps deal with the issue.

    — answered November 13th 2010 by vincent youmans
    permalink
    0 Comments
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.