• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
copyWithZone confusion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

copyWithZone confusion


  • Subject: copyWithZone confusion
  • From: Coleman Nitroy <email@hidden>
  • Date: Mon, 10 Jan 2005 20:24:17 -0500

My memory management theory is a little weak in some areas and recently I ran into an error I cannot battle myself.

I am doing this

- (id)outlineView:(NSOutlineView *)ov objectValueForTableColumn:(NSTableColumn *)tableColumn byItem (id)item
{
return item;
}


So that I can do this:

- (void) outlineView:(NSOutlineView *)outlineView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item
{
// determine correct icon
if ( [[item nodeType] compare:@"Brush"] == NSOrderedSame ) {
[cell setImage:[NSImage imageNamed:@"Brush-icon"]];
} else {
[cell setImage:nil];
}
[cell setStringValue:[item nodeName]];
[cell setLeaf:YES];
}


And items are of a class I made called ATMap, for the purpose of this problem it has two NSStrings in it, nodeName and nodeType. When I run this code I get this error message:

*** -[ATMap copyWithZone:]: selector not recognized

How would I implement copyWithZone properly and what is really happening and why does this happen? (Sorry that may be a bit vague)

Thanks.
---
Coleman Nitroy
email@hidden
nitroy.com/cole

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: copyWithZone confusion
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: Revisiting NSTextView bugs in Interface Builder (rant about BugRe porter)
  • Next by Date: Re: copyWithZone confusion
  • Previous by thread: Re: [SOLVED] Re: NSTableColumn headerTitle Bindings
  • Next by thread: Re: copyWithZone confusion
  • Index(es):
    • Date
    • Thread