View Full Version : Shouldnt there be static definition for borderlayout -- SOUTH, NORTH, WEST, EAST ?
seymores
19 Mar 2008, 8:30 AM
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
jay@moduscreate.com
19 Mar 2008, 5:16 PM
what would prevent anyone from mistyping that? at least w/ the string method they can force it to lower case. ;)
seymores
19 Mar 2008, 8:31 PM
:">
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?
jay@moduscreate.com
20 Mar 2008, 5:00 AM
i suppose. but you're assuming everyone uses an IDE with an Ext plugin.
seymores
20 Mar 2008, 9:01 AM
I use Vim, but I get your point. ;-)
jay@moduscreate.com
20 Mar 2008, 9:04 AM
vim pwns!
loeppky
21 Mar 2008, 8:00 AM
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'.
evant
21 Mar 2008, 4:41 PM
The same could be said about other things, xtypes for instance.
jack.slocum
21 Mar 2008, 8:20 PM
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. :)
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.