Added code to support the disabled tag of GSWCheckBoxList

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@6780 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
karl 2000-06-22 21:05:06 +00:00
parent 04bb407fe7
commit 49a75202da
3 changed files with 17 additions and 0 deletions

View file

@ -1,3 +1,6 @@
2000-06-20 Karl Kraft <karl@nfox.com>
* GSWCheckBoxList.m Added support for the disabled key.
2000-06-20 Karl Kraft <karl@nfox.com>
This is a series of minor bug fixes that I've been meaning to check in for some time.
* GSWAssociations.m Added some exception handling when getting an ivar so that when this raises an exception the name of the ivar causing the exception can be recorded and reported. The exception is then re-raised

View file

@ -37,6 +37,7 @@
GSWAssociation* suffix;
GSWAssociation* displayString;
GSWAssociation* escapeHTML;
GSWAssociation* itemDisabled;
BOOL defaultEscapeHTML;
};

View file

@ -44,6 +44,7 @@ static char rcsId[] = "$Id$";
[_associations removeObjectForKey:suffix__Key];
[_associations removeObjectForKey:selections__Key];
[_associations removeObjectForKey:displayString__Key];
[_associations removeObjectForKey:disabled__Key];
[_associations removeObjectForKey:escapeHTML__Key];
if ((self=[super initWithName:name_
associations:_associations
@ -93,6 +94,10 @@ static char rcsId[] = "$Id$";
withDefaultObject:[displayString autorelease]] retain];
NSDebugMLLog(@"gswdync",@"displayString=%@",displayString);
itemDisabled = [[associations_ objectForKey:disabled__Key
withDefaultObject:[itemDisabled autorelease]] retain];
NSDebugMLLog(@"gswdync",@"itemDisabled=%@",itemDisabled);
escapeHTML = [[associations_ objectForKey:escapeHTML__Key
withDefaultObject:[escapeHTML autorelease]] retain];
NSDebugMLLog(@"gswdync",@"escapeHTML=%@",escapeHTML);
@ -111,6 +116,7 @@ static char rcsId[] = "$Id$";
DESTROY(prefix);
DESTROY(suffix);
DESTROY(displayString);
DESTROY(itemDisabled);
DESTROY(escapeHTML);
[super dealloc];
}
@ -266,6 +272,7 @@ static char rcsId[] = "$Id$";
id _prefixValue=nil;
id _suffixValue=nil;
id _valueValue=nil;
BOOL _disableValue=NO;
NSArray* _listValue=[list valueInComponent:_component];
NSAssert3(!_listValue || [_listValue respondsToSelector:@selector(count)],
@"The list (%@) (%@ of class:%@) doesn't respond to 'count'",
@ -278,6 +285,7 @@ static char rcsId[] = "$Id$";
inComponent:_component];
_prefixValue=[prefix valueInComponent:_component];
_suffixValue=[suffix valueInComponent:_component];
_disableValue=[itemDisabled valueInComponent:_component];
[index setValue:[NSNumber numberWithShort:i]
inComponent:_component];
_displayStringValue=[displayString valueInComponent:_component];
@ -290,6 +298,11 @@ static char rcsId[] = "$Id$";
//TODOV
if ([_selectionsValue containsObject:_valueValue])
[response_ appendContentString:@"\" CHECKED"];
if (_disableValue)
[response_ appendContentString:@"\" DISABLED"];
[response_ appendContentCharacter:'>'];
[response_ appendContentString:_prefixValue];
[response_ appendContentHTMLString:_displayStringValue];