Results 1 to 2 of 2

Thread: Touch 2.0.0.pr3 and Ext.draw.Component

  1. #1
    Ext JS Premium Member meditecsports's Avatar
    Join Date
    Oct 2010
    Vote Rating

    Default Touch 2.0.0.pr3 and Ext.draw.Component

    I'm trying to port an existing piece of code that worked using "Ext.draw.component" to work with Touch 2pr3. However, things don't look promising here. Specifically:

    Rendering a widget using
    results in a huge pile of deprecation warnings:

    [DEPRECATE][Ext.draw.Component#constructor] onRender() is deprecated, please put your code inside initialize() insteadsencha-touch-all-debug.js:21340[DEPRECATE][Ext.draw.Component#createSurface] 'el' is deprecated, please use 'element' insteadsencha-touch-all-debug.js:21340[DEPRECATE][Ext.draw.Surface.create] Ext.supports.Svg is deprecated, please use Ext.feature.has.Svg insteadsencha-touch-all-debug.js:21340[DEPRECATE][Ext.draw.Surface.create] Ext.supports.Vml is deprecated, please use Ext.feature.has.Vml insteadsencha-touch-all-debug.js:21340[DEPRECATE][Ext.draw.Component#constructor] initComponent() is deprecated, please put your code inside initialize() insteadsencha-touch-all-debug.js:21340[DEPRECATE][Ext.draw.Component#addEvents] addEvents() is deprecated. It's no longer needed to add events before firing

    and subclassing it, like I used to do in ExtJS4:
        extend: 'Ext.draw.Component',
        config: {
            width:          640,            // width of the draw.Component
            height:         480,            // height of the draw.Component
        constructor: function(cfg) {
    results in getting lost in:

    Uncaught TypeError: Cannot call method 'setWidth' of nullExt.define.doSetWidthsencha-touch-all-debug.js:37766(anonymous function)sencha-touch-all-debug.js:29640Base.implement.initConfigsencha-touch-all-debug.js:2845Ext.define.constructor...

    Seeing this, I got the impression, that the "Ext.draw" tree of Touch is not really usable at this time (in pr3). Am I right?

    And: If so, do you have an advise on how to proceed or what to wait for?

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL
    Vote Rating


    PR stages so expect a bumpy road still. Not sure why you are calling initConfig in the constructor, ST2 will do this for you.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2

    Think my support is good? Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts