Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
-// $Id$
#include "WOInput.h"
#include "common.h"
WOAssociation *list;
WOAssociation *item;
WOAssociation *selection;
- WOAssociation *string; // WO4
+ WOAssociation *string; // WO4 => use 'displayString'!
WOAssociation *noSelectionString; // WO4
// non-WO:
WOAssociation *singleSelection; // selection contains an item, not an array
WOAssociation *multiple; // multiple selections allowed
WOAssociation *size;
+
+ // TODO: WO 4.5: selectedValues, escapeHTML, selections
}
@end /* WOBrowser */
self->list = OWGetProperty(_config, @"list");
self->item = OWGetProperty(_config, @"item");
self->selection = OWGetProperty(_config, @"selection");
- self->string = OWGetProperty(_config, @"string");
self->singleSelection = OWGetProperty(_config, @"singleSelection");
self->multiple = OWGetProperty(_config, @"multiple");
self->size = OWGetProperty(_config, @"size");
self->noSelectionString = OWGetProperty(_config, @"noSelectionString");
-
+
+ if ((self->string = OWGetProperty(_config, @"displayString")) == nil) {
+ if ((self->string = OWGetProperty(_config, @"string")) != nil) {
+ [self debugWithFormat:
+ @"Note: using deprecated 'string' binding, "
+ @"use 'displayString' instead."];
+ }
+ }
+ else if (OWGetProperty(_config, @"string") != nil) {
+ [self debugWithFormat:@"WARNING: 'displayString' AND 'string' bindings "
+ @"are set, use only one! ('string' is deprecated!)"];
+ }
+
// compatiblity
if (self->noSelectionString == nil)
self->noSelectionString = OWGetProperty(_config, @"nilString");
}
- (void)dealloc {
- RELEASE(self->noSelectionString);
- RELEASE(self->singleSelection);
- RELEASE(self->list);
- RELEASE(self->item);
- RELEASE(self->selection);
- RELEASE(self->string);
- RELEASE(self->size);
- RELEASE(self->multiple);
+ [self->noSelectionString release];
+ [self->singleSelection release];
+ [self->list release];
+ [self->item release];
+ [self->selection release];
+ [self->string release];
+ [self->size release];
+ [self->multiple release];
[super dealloc];
}