cocoa

WebView containing Silverlight

In my cocoa application I have a WebView. If I set that WebView to display a web page that contains Silverlight, the mouse move event never fires in that Silverlight application (with the exception of if I hold down the mouse button while moving). Everything else seems to work fine (clicking, interacting with objects) except for mouse ...

Cocoa - Strings as arguments

I need to pass a string as an argument but I dont know how..Help? -(void)sendSMS: (int) number:(NSString)carrier; That says objects cant be used as parameters. ...

Drag and Drop folder view cocoa

Hello, I need to make a drag and drop view in cocoa that will accept folders. I know it will use things like NSView and probably registerForDraggedTypes: (which I still am not sure how to go about using). Does anyone know how to get this working? Thanks in advance ...

Accessing Google Docs Metadata feed with gdata-objectivec-client

What's the simplest why to access/parse Google Docs Metadata feed with gdata-objectivec-client? ...

NSTask setLaunchPath Objective-C Cocca

Hello, This is a very simple question. I have a script in the same folder as the Cocoa app. I can't seem to set the path to it properly for setLaunchPath for NSTask. Help please. I have a folder called Project. Inside of it, exist multiple folders but only two we care about: Classes (the source files for the Cocoa app are here) and Rub...

Core Data, KVO, and NSInternalInconsistencyException

I'm using Core Data and KVO to look for changes in values to trigger saves to the data store. I have a table view with search hooked up to NSFetchedResultsController. When the search changes, a new results controller is made on pressing the Search button. When the user selects an item in the results table view, then the user enters a det...

Apple codes used in Applescript-able applications

I read some examples of code necessary to make an application Applescript-able, but I still don't understand if the Apple codes used to identify a command, a class, a property can be any value I want (with the exception of the code for the application class), and if they must be registered in some site. Is there a list of codes with a p...

Objective C string manipulation, peeking, adding to

Hi, I am trying to manipulate a string of open hours that is given to me. It is poorly formatted and I need to bring it up to the same standard as another piece of data from a different source. Mon-Wed 930-1700 Thu 900-1700 Fri 930-1700 Mon - Wed 930-1700 Thu 900-1700 Fri 930-1700 Mon - Thu 930-1600 Fri 930-1700 Mon - Wed 930-1700 Thu...

Cocoa - Send email

How can I send email in cocoa/objective-C? I've seen ways that open up mail.app and send it but I want it to run in the background. External frameworks are ok but not preferred. -Thanks! ...

Cocoa - Debugging Help

Ok for some reason my code wont play nice and I'm too new to cocoa to figure this out on my own.. when the send button is pressed it is meant to run the createEmail method. But it says GDB: Program received signal: "EXC_BAD_ACCESS". when the button is pressed. #import "Controller.h" @implementation Controller -(IBAction)send:(id)sende...

Print_r equivalent for XCode? I just want to see my array's content...

I am a web developer trying to make it in an xcode world, and I need to see the contents of an array I have in my console, what are my options?? Thanks!! ...

Problem in fetching from core data to array

In my core date in the entity name called Event and in that there is an attribute called "name". I want to fetch all the values of term from coredata to an nsarray. I used the below code and it is not working. Anybody please helpp. NSFetchRequest *request = [[NSFetchRequest alloc] init]; [request setEntity:[NSEntityDescription entityFo...

sometimes during net inconsistency appropriate delegates are not called

Hi all, Using AsyncSocket I made a simple text chat. I have found that sometimes during net inconsistency following delegate at server and at client code: - (void)onSocket:(AsyncSocket *)sock willDisconnectWithError:(NSError *)err, does not get called. In this method, at client side, I am disposing socket connection established w...

Cocoa: UI Automation frameworks

Are there any UI automation frameworks for cocoa OSX application? I dont mind changing code to fit to framework's requirements. ...

How do I get NSAssert to either crash the application or at least bring up an error dialog?

Hi, I use asserts quite a bit in my code since they are useful in debugging, but the standard behaviour of Cocoa applications is to interrupt processing and logging the assertion failure to the console.. the UI stays up neither crashing, nor bringing up an error dialog and it's often not obvious what has happened. What's the easiest wa...

Detecting focus/unfocus of active NSDocument

Hi, Is there anyway to detect the focus/unfocus of an NSDocument? I would like to dynamically update a menu item that pertains to the active document but I can't see any immediately obvious way of doing it. The reason being, I'd like to activate and then populate the menu on document focus, and then unpopulate and deactivate on loss of...

NSTableView Row Height based on NSStrings

Basically, I have an NSTableView with 1 collumn, and I'm inserting long strings into each row. However, not all the strings are long, so I'd like the height of each row to be different based on how long the string is. I've figured out that I need to ask the collumn how wide it is, and then ask the string how many lines it will take up i...

Symbol not found: _OBJC_CLASS_$_Article

I am working on an extension to Vienna to add the ability for third parties to write Objective-C plugins, but I am getting some runtime linker issues only when running in 64-bit mode (everything appears to work fine in 32-bit mode). My plugin, SynkPlugin, is loaded by the following code in Vienna.app: NSArray * bundlePaths = [NSBundle p...

Running Applescript from a Cocoa application

I want to run a simple applescript in a cocoa application. I read the apple documentation on the matter but it was too confusing for me (a beginner) to understand. tell application "iTunes" to play ...

Mac OS X File / Folder Management: When to Copy instead of Move

The Finder uses some kind of rules to determine if an Item can be moved or will be copied. After dragging an Item, in certain cases Finder shows a drag-copy-cursor. Are these rules in an API available? Checked with Spotlight-Metadata, NSURL and NSFileManager: no result. Here's what i came up with: if a Folder contains a ".localized"...