You found a bug! We've classified it as TOUCH-2702 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Jul 2011
    Posts
    14
    Vote Rating
    0
    mikerudra is on a distinguished road

      0  

    Default Loosing listener after popping

    Loosing listener after popping


    Hi, here is what I have, am not sure is my mistake or a bug:

    1. create a main app with controller and view etc.
    2. add a container, auto-created from a reference in the main controller
    3. push this container at a certain moment and listening to one of its button tap events

    what happens
    1. the reference is set to autocreate, so I push it to the navigationview, works good, the container pops, the event of the button tap is sent to the controller
    2. I pop out this container
    3. I push it again and the event is not catched anymore in the controller, however, I added a local event to the button, and AFTER the first push the event is triggered in the local button events.

    I want to be able to catch this event form the controller all the times as normal. I get the feeling somewhere the autocreate / autodestroy clear my listeners or something. Please help.
    Thanks.

  2. #2
    Sencha User
    Join Date
    Jul 2011
    Posts
    14
    Vote Rating
    0
    mikerudra is on a distinguished road

      0  

    Default Getting back with the project example, please help!!!

    Getting back with the project example, please help!!!


    Check out the attachment.
    Attached Files

  3. #3
    Sencha User jjohnston's Avatar
    Join Date
    Sep 2010
    Posts
    567
    Vote Rating
    20
    jjohnston will become famous soon enough jjohnston will become famous soon enough

      0  

    Default


    Hi, thanks for posting. The .xds file alone doesn't hold the data needed to open your project, could you please send us an archive of your entire project directory so we can open it? Thanks.
    Jason Johnston
    @lojjic
    Sencha Architect Development Team

  4. #4
    Sencha User
    Join Date
    Jul 2011
    Posts
    14
    Vote Rating
    0
    mikerudra is on a distinguished road

      0  

    Default Yeah sorry about that, forgot about the metadata :D

    Yeah sorry about that, forgot about the metadata :D


    Here is the archive with my example. Thanks guys! (btw... I could not add it in .tgz format. What kind of limitation is that?) :o)
    Attached Files

  5. #5
    Sencha User jjohnston's Avatar
    Join Date
    Sep 2010
    Posts
    567
    Vote Rating
    20
    jjohnston will become famous soon enough jjohnston will become famous soon enough

      0  

    Default


    Thanks, I see the issue you are talking about. This doesn't seem to be particular to using Designer, so I've moved it into the Touch 2.x forum so that the Touch team can take a look at your example.
    Jason Johnston
    @lojjic
    Sencha Architect Development Team

  6. #6
    Sencha User
    Join Date
    Jul 2011
    Posts
    14
    Vote Rating
    0
    mikerudra is on a distinguished road

      0  

    Default jjohnston

    jjohnston


    Thanks, I will follow it there... I mean here

  7. #7
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,642
    Vote Rating
    899
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    I recommend against the usage of id. There are much better ways to resolve components using ComponentQuery. For instance replace id with action : 'test' on your button and updating the controller to use 'button[action=test] it will work no problems.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  8. #8
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    18
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    We'll take a look at it.

    Sencha Inc

    Jamie Avins

    @jamieavins

  9. #9
    Sencha User
    Join Date
    Jul 2011
    Posts
    14
    Vote Rating
    0
    mikerudra is on a distinguished road

      0  

    Default


    Here is my workaround for this too:

    - I actually reassigned the tap events to the buttons just after I used them the first time and I am keep assigning them after every use... lame, I know, but efficient, at least it works.
    - You should check your "single" property, looks to me it triggers even tho is not set... just thinking loud here...