1. #1
    Sencha User
    Join Date
    Feb 2008
    Posts
    36
    Vote Rating
    0
    yozefff is on a distinguished road

      0  

    Default Sencha Touch 2 Controller control

    Sencha Touch 2 Controller control


    Hi,

    I'm tryin the new Designer to generate a Sencha Touch 2 app ...

    So I've created a controller in Designer and also added a ref. But now I want to add a "control" , but I don't know where to do it in Designer ... So want this generated (the control part):

    Code:
        config: {
            refs: {
                sliderRange: '#mysliderfield'
            }
        },
        
        control : {
        	sliderRange : {
        		change : "onSliderChange"
        	}
        }
    any help?

  2. #2
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,181
    Vote Rating
    77
    ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough

      0  

    Default


    Thats isn't the SD's way.

    Use controller action component.

    Regards.
    UI: Sencha Architect 3.x / ExtJS 4 MVC
    Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
    Application Server: Glassfish 3.1.x
    Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5

    If you like my answer please vote!

  3. #3
    Sencha User
    Join Date
    Feb 2008
    Posts
    36
    Vote Rating
    0
    yozefff is on a distinguished road

      0  

    Default


    uhm .. okey?

    So I click on the controller in SD , I try to add an Action (clicked the plus icon) , then a selectbox appears with a text "Please choose an eventname by name" , but this is empty?

  4. #4
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,181
    Vote Rating
    77
    ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough

      1  

    Default


    Nope.

    (1) D&D a "Controller Action" from toolbox then (2) fill targetType (I'm guessing is a Ext.field.Slider because the itemId you give in "refs"), (3) name (select "change"), (4) controlQuery ("
    #mysliderfield
    "), (5) give to the function whatever name you want (by default SD will set "onSliderfieldChange") then finally (6) wrote the code:

    x1.jpg
    UI: Sencha Architect 3.x / ExtJS 4 MVC
    Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
    Application Server: Glassfish 3.1.x
    Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5

    If you like my answer please vote!

  5. #5
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,883
    Vote Rating
    102
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Thanks for the help ssamayoa.

    This is the correct workflow. Note that this will be drastically improving (much more intuitive) in the coming builds.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  6. #6
    Sencha User
    Join Date
    Feb 2008
    Posts
    36
    Vote Rating
    0
    yozefff is on a distinguished road

      0  

    Default


    thnx!

    worked like a charm

Thread Participants: 2

Tags for this Thread

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