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
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    77
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


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

  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
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    77
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


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

  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
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    77
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    vim pwns!

  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
    16,642
    Vote Rating
    582
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      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
    16
    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