cocoa

How to Call JAX-WS Web Service in Iphone

Hello, How to use JAX-WS Web service in Iphone Sdk, anyone has idea then please let me know. Thank You. ...

Memory management for a convenience class to do asynchronous web requests

Inspired by Apple's LazyTables sample, I've just built myself a class called ImageLoader. It's agonizingly clever of me. And as is often the case when I'm agonizingly clever, I'm up against the limits of my wisdom about how to handle the memory of this object. The thing gets instantiated from a UIViewController subclass inside viewDidLo...

How to make installer set up of Cocoa project?

I have make one application Cocoa using XCode. Now I want to make setup file of project. So other user can install this project directly in his system. ...

How can I check that the NSPasteboard is updated?

I'm automating a copy command to place some text on the pasteboard every second or so - unfortunately this is my only way of accessing the text, which is in another application. After copying, I access the pasteboard text and process it. Sometimes, the copy command will be sent when nothing is selected - for example in textEdit, if the...

Dismissing UIImagePickerController from UITabBarController

I have a tab bar application whereby one tab uses a navigation controller to move through a series of views. On the final view, there is a button to add a photo, which presents a UIImagePickerController. So far, so good - however when I finish picking the image, or cancel the operation, the previous view is loaded, but without the tab ...

EXC_BAD_ACCESS when trying to release an ABRecordRef

I've got the following class that is a wrapper around an ABPerson (ABRecordRef): @interface Recipient : NSObject { ABRecordRef person; } - (id)initWithPerson:(ABRecordRef)person; @end @implementation - (id)initWithPerson:(ABRecordRef)_person { if(self = [super init]) person = CFRetain(_person); return self; } - (void)dealloc { ...

How to get macosx Log-in User Name in objective-c

please let me know how to get the currently logged in user's name or mac machine name (if possivle) in objective-c. Thanks ...

Change window title to the one in text box in Objective-C?

I'm just getting started with Objective-C and I'm writing a simple application. I made two outlets : wnd - main window display - the text box Then I've tried using this code: [wnd setTitle:[display value]]; Unfortuanately it didn't work ... The debugger said : 2010-05-22 XX:XX:08.577 HelloWorld[2536:a0f] -[NSTextField va...

Sending a message from Objective-C and getting the return value?

I have this code NSString *tr = [self sendUrl:@"http://google.com/"]; But for some reason 'tr' will remain nil after it is executed. What am I doing wrong? sendUrl : - (NSString *)sendUrl:(NSString *) uri { NSLog(@"Requesting URI 1 ..."); // Prepare URL request to download statuses from Twitter NSURLRequest *request = [NSURLRe...

Offline copy of Mac OS X Reference Library?

Is there an offline copy of Mac OS X Reference Library for download? My connection is not always available so it would be useful to have a local copy. ...

How to stop huge Prefix.pch.gch file from being copied into application bundle

For some reason, XCode has decided to start copying a huge Prefix.pch.gch file into my application's resources folder when building. This file is not in the Copy Bundle Resources build phase, nor can I find any other project setting that should tell XCode to do this. Has anyone seen this before and know what's going on? ...

Setting Position of NSWindow before Display

Right now I'm setting the position of a window that is about to open like this: -(void) setActiveNodeDialog:(ISKNodeDialogController *)dialog { if (activeNodeDialog) [[activeNodeDialog window] close]; activeNodeDialog = dialog; if (activeNodeDialog) { [activeNodeDialog setMainWindowController:self]; N...

Cocoa: SBJSON check if field exists

How can I check if a field exists? ...

What does NSXMLParserUndeclaredEntityError mean?

When using NSXMLParser, what does NSXMLParserUndeclaredEntityError mean? Apples documentation is completely unhelpful ...

How can I get a nstableview to send an action when the user double-clicks an editable cell

I am trying to emulate the behavior found in finder and itunes. Single click on a selected object edits it. Double click opens the object. I have set the doubleAction of the tableView but like it says in the documentation. "If the double-clicked cell is editable, this message isn’t sent and the cell is edited instead." I dont want this...

Singleton array deallocated? EXC_BAD_ACCESS

Ok, so I have this singleton object and in it is an array that needs to be shown in a tableview. The thing is that it deallocates and after the first show, i get EXC_BAD_ACCESS in cellForRowAtIndexPath - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [[dataBase shareddataBase].dateActive...

Why are some constants prefixed with "k" in the Cocoa framework?

Possible Duplicates: What does the k prefix indicate in Apples APIs? Lower case k in Cocoa Why are some constants prefixed with "k" in the Cocoa framework? ...

Convert charset name to NSStringEncoding

Given a charset string, such as "utf-8", "iso-8859-1", "us-ascii" etc, is there any built-in way to get the appropriate NSStringEncoding in Cocoa? Right now I'm looking at just building a NSDictionary containing a canonicalized version of the name mapped to the NSStringEncoding, then having a lookup mechanism that canonicalizes the inpu...

Comparing against NSLocalizedString safe?

Hi, Sometimes I need to compare interface elements to other objects. At the moment I'm doing it by comparing their titles against a localized string. Am I right that I better compare my objects against IBOutlets? Tags are out of the question because I'm using NSMenu. ...

Execute something on application startup?

I have a class in my application which handles all the controls and all the functions and variables are stored in it. How can I add a function which handles the application startup to it? So basically I need to handle 'applicationDidFinishLaunching' in my class as well as in the application delegate. How do I do that? ...