Re: Output of NSHTTPCookieStorage to NSTableView
Re: Output of NSHTTPCookieStorage to NSTableView
- Subject: Re: Output of NSHTTPCookieStorage to NSTableView
- From: Chris Purcell <email@hidden>
- Date: Sun, 29 Jun 2008 21:47:23 -0700
Thank you for the reply. I am a bit of a Cocoa newbie and I'm having
trouble using the objectValueForTableColumn:. My NSTableView is only
one column, but I would like to display all attributes of each key.
This is an example of what is outputting when I display a entry of the
NSArray:
<NSHTTPCookie version:0 name:@"SC" value:@"RV=661339"
expiresDate:@"2038-01-17 11:14:07 -0800" created:@"236061243.432815"
sessionOnly:FALSE domain:@".google.com" path:@"/finance" secure:FALSE
comment:@"(null)" commentURL:@"(null)" portList:(null)>
Is this a dictionary? What would be the easiest way to display each
one of the attributes of the dictionary (version, name, value, etc.)
in a separate column? How could I return just one of the attributes?
Thank you!
On Jun 29, 2008, at 12:56 PM, Jens Alfke wrote:
On 29 Jun '08, at 9:39 AM, Chris Purcell wrote:
Thank you for the reply. I think right now the simplest would be
to convert the cookies array to an array of NSStrings. What would
be the easiest way to do this?
Keep the array as an array of NSHTTPCookies. But your -
objectValueForTableColumn: should look up the cookie object for the
row, and then get the right attribute of the cookie based on the
column identifier. For instance, if the column shows URLs, then you
should get the URL of the cookie and return its absoluteString. If
it shows dates, return an NSDate.
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden