Hi,

I’ve Found it, please see line marked below.

In I change this to:

myCell = (ImageAndTextCell*) [cell copy];                               
//*******************************************************************************************************************

It doesn’t work, which is a bit of a mystery? Because of this, I think there is 
something wrong somewhere else which copying and releasing here is 
working-around the problem, rather than solving at source?

I assume that in the Source Project, under ARC, the value was retained 
auto-magically?

Thanks Again,
Dave



- (void)outlineView:(NSOutlineView *)olv willDisplayCell:(NSCell*)cell 
forTableColumn:(NSTableColumn *)tableColumn item:(id) item
{        
NSImage*                                        iconImage;
NSString*                                       urlStr;
ImageAndTextCell*                       myCell;
ChildNode*                                      myChildNode;

if ([[tableColumn identifier] isEqualToString:COLUMNID_NAME] == NO)
        return;

if ([cell isKindOfClass:[ImageAndTextCell class]] == NO)
        return;

myChildNode = [item representedObject];
if (myChildNode == nil)
        return;

if ([myChildNode class] != [ChildNode class])
        return;

myCell = (ImageAndTextCell*) [cell copy];                               
//*******************************************************************************************************************
myCell.pTextCellImage = nil;
iconImage = nil;        

if (myChildNode.isLeaf == YES)
        {
        urlStr = myChildNode.urlString;
        if (urlStr != nil)
                {
                if ([myChildNode.urlString hasPrefix:HTTP_PREFIX] == YES)
                        {
                        myChildNode.nodeIcon = self.pURLImage;
                        }
                else
                        {
                        iconImage = [[NSWorkspace sharedWorkspace] 
iconForFile:urlStr];
                        myChildNode.nodeIcon = iconImage;
                        }
                }
        }
        
//**
//**    Check if it's a special folder (PLACES or BOOKMARKS), we don't want it 
to have an icon
//**
else
        {
        if ([self isSpecialGroup:myChildNode] == YES)
                {
                myChildNode.nodeIcon = nil;
                }
        else
                {
                myChildNode.nodeIcon = self.pFolderImage;
                }
        }
                        

[myChildNode.nodeIcon setSize:NSMakeSize(kIconImageSize,kIconImageSize)];

iconImage = myChildNode.nodeIcon;
myCell.pTextCellImage = iconImage;

[myCell release];
}



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to