Hello,
Not sure where my problem is I've tried a few things and no success. I am trying to output NSHTTPCookieStorage *cookies array to a table view. Whenever I call the objectValueForTableColumn:row method the app errors out, but if I leave it out the app launches displaying the correct number of rows with nothing in it (as expected since I left out the other method).

Here is the code to get the cookies array:

NSHTTPCookieStorage* sharedCookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
        cookies = [sharedCookieStorage cookies] ;

Here is the code to output the data to the table view:

- (int)numberOfRowsInTableView:(NSTableView *)tableView
{
        return [cookies count];
}
        

- (id)tableView:(NSTableView *)tableView
objectValueForTableColumn:(NSTableColumn *)tableColumn
                        row:(int)row
{
    return [cookies objectAtIndex:row];
}


Here is the output in the console:

2008-06-28 21:45:01.997 Cookie Monster[25168:10b] You have 362 cookies. 2008-06-28 21:45:02.020 Cookie Monster[25168:10b] *** -[NSHTTPCookie copyWithZone:]: unrecognized selector sent to instance 0x14b0c0 2008-06-28 21:45:02.021 Cookie Monster[25168:10b] An uncaught exception was raised 2008-06-28 21:45:02.021 Cookie Monster[25168:10b] *** -[NSHTTPCookie copyWithZone:]: unrecognized selector sent to instance 0x14b0c0 2008-06-28 21:45:02.021 Cookie Monster[25168:10b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** - [NSHTTPCookie copyWithZone:]: unrecognized selector sent to instance 0x14b0c0'
2008-06-28 21:45:02.022 Cookie Monster[25168:10b] Stack: (
    2523074891,
    2460709115,
    2523104074,
    2523097420,
    2523097618,
    2461744868,
    2461827850,
    2461827587,
    2462515572,
    2462515044,
    2462512282,
    2462140684,
    2462135280,
    2462726532,
    2462721147,
    2462722066,
    2462722066,
    2462722066,
    2462722066,
    2462715345,
    2462713619,
    2462700087,
    2461916303,
    2461915197,
    2462684049,
    2462682600,
    2462887525,
    2461711615,
    2461670930,
    2461669236,
    2461668279,
    2461668085,
    2461667236
)

Thanks!  Any help would be appreciated!


_______________________________________________

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]

Reply via email to