#import "BrowsableObject.h"
#import <objc/HashTable.h>

@implementation BrowsableObject

+ newName: (const char *) newname
{
    self = [self new];
    [self setStringValue: newname];
    return self;
}

- (const char *) stringValue { return name; }

- setStringValue: (const char *) newname
{
    if (name) free(name);
    name = NXCopyStringBuffer(newname);
    return self;
}

- free
{
    if (name) {
	free(name);
	name = NULL;
    }
    return [super free];
}

@end
