Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    34
    Vote Rating
    0
    pashute is an unknown quantity at this point

      1  

    Default Controller not getting events

    Controller not getting events


    REQUIRED INFORMATION

    Architect Build tested:
    • Build: 442
    Project Type:
    • Touch 2.x
    Description:
    • I'm not sure what I did, but nothing reaches the controller no matter what I do.
    • Each button has an itemID. I have 16 buttons on the page (simulating a phone keypad panel 1-0,*,#, CONTACTS, SEND, DELETE. [i]-- I thought the itemID would give me the xtype
    • Possibly deep nesting of buttons in containers.
    • Possibly during project changes something was lost.
    • Possibly After adding event binding to one of the buttons, the rest of the buttons don't reach the controller.
    • Tried in a new project with itemID and then with ID
    Steps to reproduce the problem:
    • Try all possibilities
    • Start from these: [**] cntrl:kbController, with controller action for Ext.Button Tap event. console.log("kbController: button tapped");[**] Deeply nested view:mainTabPanel / tab: keypad / kbPanel / kbTop + kbGrid[**] kbGrid: / kbPanelRowA: kbBtn1,kbBtn2,kbBtn3; / kbPanelRowB: kbBtn4, kbBtn5, kbBtn6 Note: I figured that the itemId is what I set, so that I get the xtype.And that the itemId would be caught by the controller as the id to look for[**] In the controller action selector try: 'kbBtn12, or 'button kbBtn12' or just 'button'[**] In the kbBtn2 add Id 'kbBtn2' and in selector try: '#kbBtn2'[**] Add an event binding to kbBtn1 for Tap: console.log("btn 1 tapped")
    • Preview in chrome, hit ctrl-shift-i to see console.
    The result that was expected:
    • console to show: 'kbController: button tapped'
    The result that occurs instead:
    • console only shows the kbBtn1 tap if defined
    HELPFUL INFORMATION

    Screenshot, Project, or Video:
    • not attached
    Possible fix:
    • not provided
    Operating System:
    • Win7 and WinXP pro in Preview on Chrome

  2. #2
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Baltimore, MD
    Posts
    1,738
    Vote Rating
    51
    Phil.Strong is a jewel in the rough Phil.Strong is a jewel in the rough Phil.Strong is a jewel in the rough Phil.Strong is a jewel in the rough

      0  

    Default


    Can you share your controller code so I can get a better sense for what your trying?
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

  3. #3
    Sencha User
    Join Date
    May 2012
    Posts
    34
    Vote Rating
    0
    pashute is an unknown quantity at this point

      0  

    Default


    The controller code is simply a BUTTON TAP controller action
    tried different selectors, and none worked.

    The code is:

    Code:
    console.log("button tapped");
    Selectors that I tried: button, #kbButton2, button kbButton2

    None worked


    It seems the kbButton1 with an event binding added action in the VIEW:

    Code:
    console.log("kbButton1 tapped");
    is the cause.

  4. #4
    Sencha User
    Join Date
    May 2012
    Posts
    34
    Vote Rating
    0
    pashute is an unknown quantity at this point

      0  

    Default


    So instructions to reproduce are simpler:

    In Architect 2:

    MainView with two buttons.

    In itemId set to kbBtn1, and the second button's itemId to kbBtn2

    On the first button add Event Binding / basic event for TAP

    Make a Controller and add Actions / Controller Action for button TAP

    The bug occurs.

    Try changing the Controller action's selection: to button. or to kbBtn2 and it won't work.

  5. #5
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Baltimore, MD
    Posts
    1,738
    Vote Rating
    51
    Phil.Strong is a jewel in the rough Phil.Strong is a jewel in the rough Phil.Strong is a jewel in the rough Phil.Strong is a jewel in the rough

      0  

    Default


    Ok so I am able to get it work and I suspect it's because of one thing

    Steps:
    1. create a new touch project
    2. add a form panel
    3. add 2 buttons
    itemId: kbBtn1 and kbBtn2
    4. add a basic event binding to kbBtn1 (config pane, click + next to events, choose basic, and select tap event)
    5. double click tap onkbBtn1Tap (to edit)
    6. add the following code
    Code:
    console.log('normal button tap');
    7. add a controller
    8. add MyFormPanel1 as a view of the controller and select remove (either choice would be fine here)
    9. add a controller action to MyController
    10. targetType: Ext.Button, name: tap (should fill in controlQuery: button, fn: onButtonTap1 for you)
    11. edit tap onButtonTap1 controller action and add the following code
    Code:
    console.log('controller action tap');
    Save the project
    Preview it from a web server e.g. http://localhost/sandbox/pashute/app.html

    Click on button1:
    controller action tap app/controller/MyController.js?_dc=1340031614578:31
    normal button tap app/view/MyFormPanel1.js?_dc=1340031614583:42

    Click on button2 2 times:
    2 controller action tap app/controller/MyController.js?_dc=1340031614578:31
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

  6. #6
    Sencha User
    Join Date
    May 2012
    Posts
    34
    Vote Rating
    0
    pashute is an unknown quantity at this point

      0  

    Default


    So your saying that the missing thing here is that I did not add the MyFormPanel1 in the controller Views ?

    But when I do that, it says: MyFormPanel1 is already defined. Do you wish to replace it? or something like that...

  7. #7
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Baltimore, MD
    Posts
    1,738
    Vote Rating
    51
    Phil.Strong is a jewel in the rough Phil.Strong is a jewel in the rough Phil.Strong is a jewel in the rough Phil.Strong is a jewel in the rough

      0  

    Default


    Yeah that's ok it's asking if you'd like to continue including it in application or not. Typically you would not but choosing to keep it at the app level won't hurt anything

    http://www.sencha.com/forum/showthre...987#post838987
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar