1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    81
    Vote Rating
    5
    mpost is on a distinguished road

      0  

    Default Requires for ExtJS classes?

    Requires for ExtJS classes?


    If we plan to use Sencha Cmd, should we have requires statements for internal ExtJS classes or will Cmd figure it out? For example, if I have a view that displays a button, do I need to manually require Ext.button.Button for the minimization to work correctly?

  2. #2
    Sencha Premium Member
    Join Date
    May 2011
    Posts
    47
    Vote Rating
    0
    bdvr is on a distinguished road

      0  

    Default


    Afaik, it's not sophisticated enough yet to detect what classes are being used without being told. The fact that the new version of Sencha Cmd is doing code analysis is pretty cool, and I can imagine that it's technically feasible for the analyzer look for Ext.create, xtype, etc., and determine the list of classes that way. I can also imagine there would be a lot of scenarios to cover.

    I'd be very interested to know whether something like this is in the roadmap. It's definitely a nuissance to have to require individual classes from other classes, and it's also very error-prone. Obviously, requiring whole namespaces, especially in a central place like app.js, gets around this, but is wasteful.

  3. #3
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,229
    Vote Rating
    114
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all

      0  

    Default


    In 3.0.0.181 we fixed SDKTOOLS-157 (Sencha Cmd does not auto-detect xtype/xclass dependencies) which is code-speak for detecting dependencies of these forms:
    • Calls to Ext.create
    • Calls to Ext.widget
    • Use of 'xtype' property in object literals
    • Use of 'xclass' property in object literals (full classname supported by Ext.create).
    • Use of class name with operator new (as in, "new Ext.panel.Grid")
    • Use of static class members (as in, "Ext.foo.Bar.someStatic")

    For now these dependencies are injected as "requires". We hope to improve that (to avoid injecting circular requires) and offer the ability to switch between full auto-dependency mode or strict-requires-only mode where these dependencies are reported as warnings/errors.

    This should mean that if you are using "ext-all*.js" as your bootstrap, you won't need to religiously use "requires" and "uses" for Ext classes ... unless you want that level of control.

    For your own classes, since these are not built in to the bootstrap file, you will need to use these to run without compilation (typical "dev mode").

    Clear as mud?
    Don Griffin
    Ext JS Development Team Lead

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  4. #4
    Sencha Premium Member
    Join Date
    May 2011
    Posts
    47
    Vote Rating
    0
    bdvr is on a distinguished road

      0  

    Default


    Oh, wow!

Thread Participants: 2

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