1. #1
    Ext User seymores's Avatar
    Join Date
    Apr 2007
    Posts
    71
    Vote Rating
    0
    seymores is on a distinguished road

      0  

    Default Shouldnt there be static definition for borderlayout -- SOUTH, NORTH, WEST, EAST ?

    Shouldnt there be static definition for borderlayout -- SOUTH, NORTH, WEST, EAST ?


    What do you guys think?

    Just like Ext.Msg.ERROR, Ext.Msg.YESNO, ... etc , should there be something like Ext.Layout.NORTH, Ext.Layout.SOUTH, ...

    If not for catching misspelling bug then at least for consistency sake.

    :-)

    Cheers

  2. #2
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,170
    Vote Rating
    33
    jay@moduscreate.com is just really nice jay@moduscreate.com is just really nice jay@moduscreate.com is just really nice jay@moduscreate.com is just really nice

      0  

    Default


    what would prevent anyone from mistyping that? at least w/ the string method they can force it to lower case.

    Jay Garcia @ModusJesus || Modus Create co-founder
    Ext JS in Action author
    Sencha Touch in Action author

    Get in touch for Ext JS & Sencha Touch Touch Training

    We are also working on Video-based Sencha Touch training: Check it out here.

  3. #3
    Ext User seymores's Avatar
    Join Date
    Apr 2007
    Posts
    71
    Vote Rating
    0
    seymores is on a distinguished road

      0  

    Default




    Hmmm you are right, this is no Java pre-compile checking.

    However having a static definition should help in those auto-complete Javascript IDE right?

  4. #4
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,170
    Vote Rating
    33
    jay@moduscreate.com is just really nice jay@moduscreate.com is just really nice jay@moduscreate.com is just really nice jay@moduscreate.com is just really nice

      0  

    Default


    i suppose. but you're assuming everyone uses an IDE with an Ext plugin.

    Jay Garcia @ModusJesus || Modus Create co-founder
    Ext JS in Action author
    Sencha Touch in Action author

    Get in touch for Ext JS & Sencha Touch Touch Training

    We are also working on Video-based Sencha Touch training: Check it out here.

  5. #5
    Ext User seymores's Avatar
    Join Date
    Apr 2007
    Posts
    71
    Vote Rating
    0
    seymores is on a distinguished road

      0  

    Default


    I use Vim, but I get your point. ;-)

  6. #6
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,170
    Vote Rating
    33
    jay@moduscreate.com is just really nice jay@moduscreate.com is just really nice jay@moduscreate.com is just really nice jay@moduscreate.com is just really nice

      0  

    Default


    vim pwns!

    Jay Garcia @ModusJesus || Modus Create co-founder
    Ext JS in Action author
    Sencha Touch in Action author

    Get in touch for Ext JS & Sencha Touch Touch Training

    We are also working on Video-based Sencha Touch training: Check it out here.

  7. #7
    Sencha User loeppky's Avatar
    Join Date
    May 2007
    Location
    Seattle, WA
    Posts
    230
    Vote Rating
    0
    loeppky is on a distinguished road

      0  

    Default


    seymores: I think you have a valid question. There is some inconsistency between when strings are passed verses a reference to a static variable. I assume passing strings around though is the more accepted behavior because it is less cumbersome than Ext.Layout.NORTH for example. If one ever needed to find all instances of using the north layout region, they could be confident doing a search for Ext.Layout.NORTH but not as confident searching for 'north'.

  8. #8
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    15,242
    Vote Rating
    106
    evant is a splendid one to behold evant is a splendid one to behold evant is a splendid one to behold evant is a splendid one to behold evant is a splendid one to behold evant is a splendid one to behold evant is a splendid one to behold

      0  

    Default


    The same could be said about other things, xtypes for instance.

  9. #9
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    7
    jack.slocum will become famous soon enough

      0  

    Default


    I'd rather save the bytes. If there were statics for everything it would be another 10k+ on the library. Let's use that for something useful.
    Jack Slocum
    Ext JS Founder
    Original author of Ext JS 1, 2 & 3.
    Twitter: @jackslocum
    jack@extjs.com