That did the trick, thanks a lot. Seems like I need to review a few concepts here.
-----Ursprüngliche Nachricht----- Von: chaitanya pandit [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 26. September 2008 12:25 An: Tilo Villwock Cc: cocoa-dev@lists.apple.com Betreff: Re: objc_msgSend_ptr if your sizeOfFile: method is returning an integer, then you should convert it to NSNumber like: object = [NSNumber numberWithInt:[[files objectAtIndex:rowIndex] sizeOfFile]]; hth, Chaitanya On 25-Sep-08, at 5:22 PM, Tilo Villwock wrote: > i have the following piece of code in my controller class: > > - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn: > (NSTableColumn *)aTableColumn row:(int)rowIndex{ > id object = nil; > if([tableView columnWithIdentifier:[aTableColumn identifier]] == 1){ > object = [[files objectAtIndex:rowIndex] name]; > } > if([tableView columnWithIdentifier:[aTableColumn identifier]] == 2){ > object = (id)[[files objectAtIndex:rowIndex] sizeOfFile]; > } > return object; > } > > it provides the NSTableView in my app with content. For some reason > i cannot assign: > > object = (id)[[files objectAtIndex:rowIndex] sizeOfFile]; > > or at least an error occurs i cannot figure out. In the debugger the > last item on top of the stack is something like "objc_msgSend_ptr". > Now "files" here is an instance of NSMutableArray and the method > "sizeOfFile" belongs to a custom class and returns the size properly. > > I'm pretty new to Cocoa and Objective-C and being used to java, i'm > not quite familiar with memory management (alloc/release/retain > etc.). Maybe there is something i'm missing here. I'm running 10.4 > Tiger. > > Thanks in advance. > > Tilo > _______________________________________________ > > 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: > http://lists.apple.com/mailman/options/cocoa-dev/chaitanya%40expersis.com > > This email sent to [EMAIL PROTECTED] _______________________________________________ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]