cocoa

How to Write OS X Finder plugin

I'm looking for a guide or sample code for writing Mac OS X Finder plugins? It would like to know how to do some simple actions: adding image overlayers to icons adding context menu items listen to file changes I found the following two resources: Writing Contextual Menu Plugins for OS X: An outdated document from 2002 that uses t...

iPhone SDK Quick Reference

Is there a quick-reference guide to the iPhone SDK that's as fast and easy to use as one of those little O'Reilly books, or JavaDoc? I'm new to iPhone SDK programming. I need reference material. Let's say I want to know if the string class has a "reverse" function. For Java I go to http://java.sun.com/javase/6/docs/api/ and browse do...

Javascript/CSS token field. Much like Cocoa's one.

Hi all! I've made a desktop application which uses Cocoa's NSTokenField: More info about it here: http://developer.apple.com/documentation/Cocoa/Conceptual/TokenField%5FGuide/Introduction/Introduction.html Now I'm remaking this application as webapplication using PHP and AJAX. Is there a way to use a token field (comma seper...

Problems with the PHP script to generate the licenses in Aquatic Prime

I am using Aquatic Prime to generate licenses for my application. I have no problems producing an validating licenses using the Aquatic Prime developer application, however I have not had any success with the PHP script. I am using Paypal as the payment mechanism, and this appears to have no problems as the license files I receiving have...

Setting a property on a custom object through Interface Builder

I have a custom UITableViewController subclass which I use in two places in a nib file. What should I do if I want the two instances to have slightly different behavior? Of course in the code I can select one kind of behavior or the other based on the value of a BOOL, but how do I set that BOOL from Interface Builder, without having to w...

Change File Save Location

Hi Everyone: I am wondering if there is some way that I can create an script on Mac OS X that will change the default save location of all native Cocoa apps. I don't know where to start, so I am open to any advice about how to do this. Thanks for any help! ...

Mac libraries for audio processing/sound file splitting

I'm working on a quick application for my church to assist their recording of services. As of right now, they record the service with protools (LE 6.5 to be specific), run a compressor, normalizer, and limiter to the track, and export it as a wav. Prior to me helping them, they used another tool to split that audio file into 5 minute s...

Create a padded, centered, scaled NSImage

I'm putting a fixed size icon based on an arbitrarily sized image into an NSOutlineView using an NSImageCell. NSImageCell will scale the image down nicely, but I can't find a way to add padding around the scaled image. The rows look ugly to my eye without padding. My first pass at fixing this problem was to create a new image of const...

Ensure a subprocess is dead in Cocoa

I'm writing an application that kicks off a subprocess running a simple web server. I am using NSTask and communicating with it with pipes, and everything seems more or less fine. However, if my program crashes, the subprocess is left alive and the next time I launch the app there is a conflict between the old subprocess and the new one....

How to drag, toss, animate a view along a curved path.

I have an view-based iPhone app. Currently there is a small image in the top left hand corner of the screen. When the user taps the screen the image is animated using a CAKeyframeAnimation along a curvy path to the lower right hand corner of the screen. Now I want to change the app so instead of animating on the tap event, the user can ...

How to use iTunes like scrollbars

Hi, what is the best way to display iTunes like scrollers in Leopard? Is there a 'system call' to change the look and feel of scrollers in cocoa or carbon? ...

Question about NSMutableArray

Hi I currently try to fill and NSMutableArray with something like this: deck = [[NSMutableArray alloc] initWithCapacity:52]; for (int suit = 0; suit <= 3; suit++) { for (int value = 1; value <= 13; value++) { ANormalCard *card = [[ANormalCard alloc] initWithSuit:suit value:value]; [deck addObject:card]; [card autorelease...

Can't make empty selection in NSTableView

I don't know how it happened, but all of a sudden in my table view I can't make an empty selection anymore. Like a table view row always has to be selected, and it can't be deselected by clicking somewhere else in the table view. I can select a different row, but I can't make an empty selection. In the Interface Builder attributes for t...

How to maintain the scroll position in NSScrollView when changing scale?

I've got an NSView (myView) wrapped in an NSScrollView (myScrollView). Using zoom-in/out buttons, the user can alter the scale of myView. If the user is currently scrolled to a particular spot in myView, I'd like to keep that part of the view on-screen after the zooming has taken place. I've got code that looks like this: // pres...

Cocoa - Return information from NSOperation

I have an IPhone app that uses webservices to get data from a server. I'm putting each call to the webservice in a NSOperation subclass so that it can be threaded. My question is, what is the recommended way to pass back information from a completed NSOperation subclass. I'm currently sending a NSNotification at the end of my main met...

How do I make a header row with a gradient background in my NSOutlineView?

I am using an NSOutlineView in my App so i downloaded Apples Photo Search Sample App which uses an NSOutlineView. While using it I noticed that it gives the root object of the outline view a Gradient Background, so I looked through the code but I couldn't see what did it. Would someone mind looking through the code and then telling me wh...

Animating NSDrawer

How can I open and close a drawer in a Cocoa Application using a smooth animation? ...

PDF to JPG Conversion in COCOA

In my cocoa application , I need to save each page of the pdf as a jpg .. How can i proceeed using Objective C ...

Using NSOperation for threading creates too many objects

I have an app that makes SOAP calls. To keep the UI from blocking, we are putting each SOAP call into a subclass of NSOperation. This works well, but we have a ton of different types of SOAP calls. So if we use 3 WSDLs each with 10 Ports or Operations, then we 30 different calls in SOAP and if we put each of those in a thread using NS...

How to convert this Perl Skript (Sipgate API) into Objective C / Cocoa?

Hello, does anyone have a small sample how to comunicate with the Sipgate Webservice in ObjC? I´ve never used Webservices at all and I didn´t get it. Here is a small Perl Skript, provided by Sipgate, on how to send SMS with their Webservice: #!/usr/bin/perl -w # # Sam Buca, indigo networks GmbH, 08/2007 # # This script is a very basic ...