The Foundation Kit, or just Foundation for short, is an Objective-C framework in the OpenStep specification. It provides basic classes such as wrapper classes and data structure classes.
Questions tagged [foundationkit]
6 questions
96
votes
7 answers
How does the NSAutoreleasePool autorelease pool work?
As I understand it, anything created with an alloc, new, or copy needs to be manually released. For example:
int main(void) {
NSString *string;
string = [[NSString alloc] init];
/* use the string */
[string release];
}
My question,…

James Sumners
- 14,485
- 10
- 59
- 77
3
votes
0 answers
How does URL's resourceValues(forKeys: [.typeIdentifierKey]) determine the UTI?
I've got a URL, and I'm calling resourceValues(forKeys: [.typeIdentifierKey]) on it, to find out the UTIs it conforms to. Works great.
Does this method simply check whether it's a directory (like with stat(2), to report "public.folder"), and if…

Ssswift
- 916
- 10
- 20
2
votes
1 answer
FoundationKit on gcc/Linux
I am trying to test Objective-C on Linux (Ubuntu 10.04), mainly to decide if it's worth it to get a Mac and XCode. I have to like a language before I seriously consider programming in it (even more so when I have to pay a lot for it)
I am using gcc…

quantumSoup
- 27,197
- 9
- 43
- 57
1
vote
2 answers
OS X: how to watch socket read events with NSRunLoop?
I'm writing a Cocoa app. There is a socket in the application, and whenever the socket becomes readable I want to read data from the socket, process the data, and update the user interface accordingly. I want to integrate the read event check in the…

Hongli
- 18,682
- 15
- 79
- 107
0
votes
1 answer
simultaneous NSURLConnection by using unique delegates for each NSURLConnection
I am try to handle multiple NSURLConnection at the same time by using a different delegate for each connection, for each NSURLConnection I create, I create a new delegate object, but for some reason only one NSURLConnection works at a time, any…

Nathan Day
- 5,981
- 2
- 24
- 40
0
votes
2 answers
NSDate -dateWithNaturalLanguageString: on iPhone?
In the iPhone docset for NSDate, in the discussion area they discuss -dateWithNaturalLanguageString:locale:, however they don't document the method elsewhere on the page.
I've used the method before for iPhone and it worked just fine, although I got…

jbrennan
- 11,943
- 14
- 73
- 115