cocoa

Downloading multiple files in iphone app(Objective c)

In my iPhone app I want to download multiple files which are on IIS with authentication. On a button click i want to start the downloading process. I know how to download a file with authentication. NSURLRequest* request = [NSURLRequest requestWithURL:mMovieURL cachePolicy:NSURLRequestU...

How can I use NSLog in main() but outside of NSApplicationMain?

I have read questions/559482/why-doesnt-an-iphone-apps-main-function-ever-get-a-chance-to-finish, which explains why NSApplicationMain never actually returns. The same thing happens (for the same reason) in a desktop cocoa application, which is what I am working on. With that in mind, how would I go about using NSLog to output some fina...

Change background color of NSButton

I have an NSButton in a mac application whose colour I'd like to change programatically but nothing I tried seems to work. I tried to create an output on the NSButtonCell and set the background color there but that didn't work either. Any code snippets would be helpful. ...

why co-cocoa pr-programmers st-stutter...

one of the things i like most about cocoa is the readability factor. but... one of the things that annoys me most is the convention of convenience constructors to stutter. what I mean is this: [NSString stringWithString:s] [NSNumber numberWithDouble:d] [NSValue valueWithInt:i] [NSDictionary dictionaryWithObjectsAndKeys:] etc... ...

Do I have to call super in NSManagedObject didTurnIntoFault ?

Hi, do I have to call super in didTurnIntoFault? I couldn't find any directions in the documentation. - (void)didTurnIntoFault { [super didTurnIntoFault]; // Do I have to call super? // ... } ...

Accessing Web Service from iPhone

Questions on calling web services from iPhone? Anyone have any recommended tutorials on doing this? Anyone have any best practices on implementing security with these calls? Has anyone made or seen any shared libraries or wrappers for easy web service calls from the iPhone? ...

Awaking Mac programatically

I want to write a custom alarm for a Mac that awakes the mac from sleep. I think it should be done as the Aurora app seems to do it. What methods/classes do I need to use? ...

Remote Desktop Protocol C or Objective-C Library

Does anyone know of a library for RDP that's written in C or Objective-C that is not GPLed? ...

What's missing in Cocoa?

If you could add anything to Cocoa, what would it be? Are there any features, major or minor, that you would say are missing in Cocoa. Perhaps there is a wheel you have had to invent over and over because of an omission in the frameworks? ...

CheckBox in tableview

Hai all, I am facing a trouble in putting check boxes into a table view. I am posting a part of my code here.. - (NSCell *)tableView:(NSTableView *)tableView dataCellForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { NSButtonCell *cell=[[NSButtonCell alloc] init]; NSString *strDisplayPlaylistName; strDisplayP...

CGPathRef intersection

Hi all, Is there a way to find out whether two CGPathRefs are intersected or not. In my case all the CGPaths are having closePath. For example, I am having two paths. One path is the rectangle which is rotated with some angle and the other path is curved path. Two paths origin will be changing frequently. At some point they may inters...

What is the type for boolean attributes in Core Data entities?

I am using Core Data programmatically (i.e. not using .xcdatamodel data model files) in much the same manner as depicted in Apple's Core Data Utility Tutorial. So my problem is that when I try to add an attribute to an entity with the type NSBooleanAttributeType, it gets a bit buggy. When I add it to my NSManagedObject subclass header fi...

Why does an NSWindow or NSView instance handle its own key events, and not its delegate?

As a newcomer to Cocoa, I am struggling to understand why the generic NSResponder subclasses implement key events the way they seem to do. In my program, I have an NSWindow subclass which takes up the whole screen, and must necessarily handle key events. There are several major commands which can change the whole state of the program (...

iPhone address book - auto-select Phone owner

In 3.0 they have Auto-Fill for Safari. You go into the settings app to turn it on, and it needs to tie into an entry in the Address Book. I went into the Settings app to set up mine, and I noticed that it already had guessed who I was. Was it doing this using something in the API? If so, how do I access this function? My iPhone syncs ...

Maintain margins for drawing after window resize.

I'm writing an application draws in another application's window (this is under OS X with Cocoa, but the question is general enough that I hope it won't be bogged down by operating system / framework issues), and I'm running into a problem which seems like it should have a simple answer, but it's driving me absolutely insane. Here's th...

NSOutlineView, NSTreeController and willDisplayCell

Hello, I'm pretty new to Obj-C and Cocoa stuff, so forgive any stupidity. I'm using an NSOutlineView with an NSTreeController that provides an array of my own objects to it. My delegator is using the outline view's willDisplayCell to set the icon of the cell (I'm using NSBrowserCell). I cannot figure out for the life of me how to get m...

Delete object from array in NSTableView

Quick one. I'm overlooking something... I have a grouped table view that is built from arrays in an NSDictionary. Each array is a section of the table. When in editing mode and a user clicks "delete" I call - (void)removeObject:(MyClass *)myObject how can i determine which array to send the message [myArray removeObject:myObject]? N...

NSScanner - Scan Next Line into String

I am working with NSScanner to parse data that is both comma and line delimited. It was fairly straightforward to implement, but I am running into a very simple issue. I would like to scan in the next line, even if it is empty. The problem I am having now is that if there is an empty line, it will skip it and read the next line in. Then ...

Reading NSDictionary Keys from property lists

in my project i'm using a propertyList for maintaining data. the plist file is named "DataBase.plist". the Root for DataBase.plist is a dictionary which contains 5 dictionaries as child items... now the sub Dictionary contains 4 strings out of which one is always a webaddress with key "URL" (Without the quotes).... i'm running the foll...

Accesing A NSArray.

I have some code which needs to access a NSArray to work. I have a NSArray which I am using with core data and will have data in it. But i am unsure how to make it access the NSArray. I can't just simply declare it in the Header file like this: NSArray *objectArray; because it does not know how or which NSArray to Access. How exactly wou...