19 Mar 2008 8:30 AM #1
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.
19 Mar 2008 5:16 PM #2
what would prevent anyone from mistyping that? at least w/ the string method they can force it to lower case.
19 Mar 2008 8:31 PM #3
Hmmm you are right, this is no Java pre-compile checking.
20 Mar 2008 5:00 AM #4
20 Mar 2008 9:01 AM #5
20 Mar 2008 9:04 AM #6
21 Mar 2008 8:00 AM #7
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'.
21 Mar 2008 4:41 PM #8
- Join Date
- Apr 2007
- Sydney, Australia
- Vote Rating
The same could be said about other things, xtypes for instance.
21 Mar 2008 8:20 PM #9
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
Sencha Co-Founder, Ext JS Founder
Original author of Ext JS 1, 2 & 3.