1. #1
    Sencha Premium Member
    Join Date
    Dec 2011
    Location
    London, UK
    Posts
    269
    Vote Rating
    13
    bseddon will become famous soon enough

      0  

    Default Am I able to use prepareData?

    When using ExtJS I am able to use the prepareData method to modify variables before they are applied to a template. The Touch dataview documentation indicates there is a prepareData method but when I create a 'Basic Function' as I do when using ExtJS the designer reports

    A valid function must have fn set. In addition, a function of a non top level component must match a configuration.
    Is it possible to use prepareData? Should I create an override?

    Thanks

  2. #2
    Sencha Premium Member
    Join Date
    Dec 2011
    Location
    London, UK
    Posts
    269
    Vote Rating
    13
    bseddon will become famous soon enough

      0  

    Default

    I answered my own question. The component must be promoted to a class.

  3. #3
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,487
    Vote Rating
    140
    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 aconran is a splendid one to behold

      0  

    Default

    Yes, this is a departure from Ext JS, but is the only way that it is possible in Sencha Touch.

    (It's purposefully enforced that you can't override methods at the instance level)
    Aaron Conran
    @aconran

Thread Participants: 1