From: Lane S. <la...@op...> - 2004-03-09 16:50:05
|
Eric Ridge wrote: > On Mar 8, 2004, at 5:47 PM, Keats wrote: > > <snip> > >> 2) FormTool >> >> Added the ability to set default values for all form elements and/or for >> each form element, eg, >> >> $Form.DefaultValue = null >> $Form.Name.Default = "Guest" >> >> (The default DefaultValue is now the empty string.) > > > I really don't like the default value being the empty string. Means > one can no longer do this: > #if($Form.SOME_PARAMETER) { > You sent me SOME_PARAMETER=$Form.SOME_PARAMETER > } good point, ebr! > > >> I deprecated "getPossibleForm" and added a new version called >> "getIgnoreCase", so: >> >> $Form.IgnoreCase.NAME, will retrieve an element called "name", >> "Name", >> "NAME" etc. (The first one it finds.) > > > I don't like this either. :) It goes against every web/cgi > "framework" I've ever used... HTTP parameters are case sensitive. I > don't want to see WM promote non-standard usages for something so basic. Again, this is for really lazy programmers and should probably not be in WM because of the unintended consequences. > > > >> I also added isExists(), so the following works regardless of the >> default >> values: >> >> #if ($Form.Exists.Name){ ... > > > You need this only because the default value changed. :( > > When I upgrade our product to WM 2.0, this change alone is going to > make me about as upset as Tim is with Melati. I can deal with all the > FastWriter/api changes, but this one really bugs me. :) It means > re-training my designers on something they've used for about 4 years now. I second this reasoning. > > >> 3) #try directive > > > <snip> > >> I remember Eric saying he did this a while ago, but then Brian talked >> him >> out of it. I'd like to hear the reasoning. I find it quite useful for >> validation and debugging. > > > Reason being that nothing you do in a template should actually throw > an exception. And if it does, you want it reported. I see this as > very similar to the "On Error Resume Next" construct of VisualBasic... > very very bad. good calls, ebr. -Lane > > > eric > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Webmacro-devel mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-devel > -- Lane Sharman For Protection from SPAM and Virus, Extend to the Network Your Perimeter of Defense: http://www.opendoors.com 858-755-2868 |