Fix pathItems

This commit is contained in:
Gregory John Casamento 2020-05-06 11:44:54 -04:00
parent 3b7be08ade
commit deaae76366
3 changed files with 5 additions and 6 deletions

View file

@ -48,7 +48,6 @@ typedef NSUInteger NSPathStyle;
{
NSPathStyle _pathStyle;
NSColor *_backgroundColor;
NSArray *_pathItems;
NSAttributedString *_placeholderAttributedString;
NSArray *_allowedTypes;
id<NSPathCellDelegate> _delegate;

View file

@ -229,12 +229,12 @@ Class pathCellClass;
- (NSArray *) pathItems
{
return [_cell pathItems];
return _pathItems;
}
- (void) setPathItems: (NSArray *)items
{
[_cell setPathItems: items];
ASSIGNCOPY(_pathItems, items);
[self setNeedsDisplay];
}
@ -352,7 +352,7 @@ Class pathCellClass;
{
NSPathCell *acell = (NSPathCell *)[self cell];
NSArray *array = [acell pathComponentCells];
NSMenu *menu = [[NSMenu alloc] initWithTitle: nil];
NSMenu *menu = AUTORELEASE([[NSMenu alloc] initWithTitle: nil]);
NSPathComponentCell *c = nil;
NSEnumerator *en = [array objectEnumerator];
@ -386,7 +386,7 @@ Class pathCellClass;
RELEASE(i);
[self setMenu: menu];
RELEASE(menu);
// RELEASE(menu);
if (_delegate)
{

View file

@ -68,8 +68,8 @@
- (void) setTitle: (NSString *)title
{
NSAttributedString *attrTitle = [[NSAttributedString alloc] initWithString: title];
AUTORELEASE(attrTitle);
[self setAttributedTitle: attrTitle];
RELEASE(attrTitle);
}
@end