objective-c

What is the best book for learning objective-c?

What is the best book or resource for learning objective-c for someone from a predominantly C#/Java background and not having touched C for 7 years? ...

What's a good way to write a Cocoa front-end to an Erlang application?

I'm exploring the possibility of writing an application in Erlang, but it would need to have a portion written in Cocoa (presumably Objective-C). I'd like the front-end and back-end to be able to communicate easily. How can this best be done? I can think of using C ports and connected processes, but I think I'd like a reverse situation ...

Up-to-date libFoundation alternative

I was wondering if there is a more up to date alternative to libFoundation (which hasn't been updated since 2001) to develop modern cross-platform Obj-C applications. I don't need appKit features, only Foundation is needed. I know about GNUStep, but I've only heard bad things about it. The Cocotron seems nice, but doesn't seem like it ...

Opening a non-standard URL in a Cocoa app

In an application that I'm writing I have some code like this: NSWorkspace* ws = [NSWorkspace sharedWorkspace]; NSString* myurl = @"http://www.somewebsite.com/method?a=%d"; NSURL* url = [NSURL URLWithString:myurl]; [ws openURL:url]; The main difference being that myurl comes from somewhere outside my control. Note the %d in the URL ...

How can I use Core Animation to interpolate property values over time on my own classes?

Specifically, I am looking to use CA on properties of types other than integers and doubles CGRect, CGPoint, CGSize, and CGAffineTransform structures CATransform3D data structures CGColor and CGImage references and in objects other than CALayers or NSViews ...

When to create Interface Builder plug-in for custom view?

When do you recommend integrating a custom view into Interface Builder with a plug-in? When skimming through Apple's Interface Builder Plug-In Programming Guide I found: Are your custom objects going to be used by only one application? Do your custom objects rely on state information found only in your application? Would it be...

How do you set your Cocoa application as the default web browser?

How do you set your Cocoa application as the default web browser? I want to create an application that is launched by default when the user clicks on an HTTP or HTTPS link in other applications (Mail, iChat etc.). ...

Can anyone recommend a complete ObjC/Cocoa or Cocoa-Touch tutorial?

I went though "Become an Xcoder", which was very useful, but it ended very abruptly, just as I started to understand about ObjC's syntax, and about Inlets/Outlets and such in Interface Builder. I've looked around, and found a bunch of tutorials that cover writing an application, but these either seem to be "Open Interface Builder, add a...

Creating MP4/M4A files with Chapter marks

I am trying to join together several audio files into one mp4/m4a file containing chapter metadata. I am currently using QTKit to do this but unfortunately when QTKit exports to m4a format the metadata is all stripped out (this has been confirmed as a bug by Apple) see sample code. I think this rules QTKit out for this job, but would be...

Sending messages to objects while debugging Objective-C in gdb, without symbols.

I'm trying to send messages to Objective-C objects in gdb. (gdb) p $esi $2 = (void *) 0x1268160 (gdb) po $esi <NSArray: 0x1359c0> (gdb) po [$esi count] Target does not respond to this message selector. I can't send any message to it. Am i missing something? Do I really need the symbols, or something else? Thanks in advance! ...

What's the Best Way to Shuffle an NSMutableArray?

If you have an NSMutableArray, how do you shuffle the elements randomly? (I have my own answer for this, which is posted below, but I'm new to Cocoa and I'm interested to know if there is a better way.) ...

Objective C for Windows

What would be the best way to write Objective-C on the Windows platform? Cygwin and gcc? Is there a way I can somehow integrate this into Visual Studio? Along those lines - are there any suggestions as to how to link in and use the Windows SDK for something like this. Its a different beast but I know I can write assembly and link in th...

Do I need to release xib resources?

If I have something like a UILabel linked to a xib file, do I need to release it on dealloc of my view? The reason I ask is because I don't alloc it, which makes me think I don't need to release it either? eg (in the header): IBOutlet UILabel *lblExample; in the implementation: .... [lblExample setText:@"whatever"]; .... -(void)deal...

How can I write an iPhone app entirely in JavaScript without making it just a web app?

I don't want to take the time to learn Obj-C. I've spent 7+ years doing web application programming. Shouldn't there be a way to use the WebView and just write the whole app in javascript, pulling the files right from the resources of the project? ...

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, though, is wouldn't this be just as valid?: int main(void) { NSAutoreleasePool *poo...

Setting movie metadata with QTKit

I'm trying to convert old QuickTime framework code to the 64-bit Cocoa-based QTKit on OS X, which means that I can't drop down to the straight C function calls at any time. Specifically, I'm trying to find a way to write QuickTime VR movies with QTKit, as they require some special metadata to set the display controller. How can I do th...

Other than Xcode, are there any full functioned IDEs for Objective C?

I know and have XCode, but I was wondering if there were any other complete development environments that support Objective C? I'm not looking for solutions with vim or emacs, nor editors like BBEdit that support syntax highlighting, but a full fledged IDE with: code completion compilation debugging refactoring Extra points for being...

Why am I getting this objective-c error message: invalid conversion from 'objc_object*'

This error message had me stumped for a while: invalid conversion from 'objc_object*' to 'int' the line in question was something like this: int iResult = [MyUtils utilsMemberFunc:param1,param2]; ...

Connecting delegate classes in Objective-C

I've got two controls in my Interface Builder file, and each of those controls I've created a separate delegate class for in code (Control1Delegate and Control2Delegate). I created two "Objects" in interface builder, made them of that type, and connected the controls to them as delegates. The delegates work just fine. My problem is, I ne...

CPAN/gem-like repository for Objective-C and Cocoa?

Is there any centralized repository of useful Objective-C / Cocoa libraries as there is for Perl, Ruby, Python, etc.? In building my first iPhone app, I'm finding myself implementing some very basic functions that would be just a quick "gem install" away in Ruby. ...