cocoa

Writing a DLNA server (DMS) in Cocoa/Objective-C/C

I'd like to write a DLNA server in Cocoa for the Mac. Are there any libraries for speaking UPnP/DLNA in Objective-C or C? Failing that, where is the spec for DLNA so I can write my own? ...

OpenGL game written in C with a Cocoa front-end I want to port to Windows

Hello, I'm wondering if someone could offer me some tips on how to go about this. I have a MacOS X OpenGL game that is written in very portable C with the exception of the non-game-play GUI. So in Cocoa I set up the window and OpenGL context, manage preferences, registration, listen for keystrokes etc. But all of the drawing and proce...

Cocoa - simple collada parser

I´ve been researching a bit in the net but didnt find any Straightforward answer, i am looking for a simple way to Load Vertex and U/V data from a collada .dae file, i don´t need textures and normals for my application (for now) but i want it as lightweight&fast as possible. Any hints or existing solutions? ...

Generate vCard from AddressBook.framework

I'm utilising the AddressBook.framework in my iPhone app, and I'd like to replicate something along the lines of the share feature in Contacts.app. This basically attach's a specific contacts vCard to an email. As far as I know, there is nothing in the documentation that mentions generating a vCard. Is this a case of generating one myse...

Is NSPasteboard thread-safe?

Is it safe to write data to an NSPasteboard object from a background thread? I can't seem to find a definitive answer anywhere. I think the assumption is that the data will be written to the pasteboard before the drag begins. Background: I have an application that is fetching data from Evernote. When the application first loads, it g...

How can I animate a content switch in an NSImageView?

I want to switch the image shown in an NSImageView, but I want to animate that change. I've tried various methods to do this. Hopefully one of you could suggest one that might actually work. I'm working with Cocoa for Mac. ...

How can I sort an NSTableColumn of NSStrings ignoring "The " and "A "?

I've got a simple Core Data application that I'm working on to display my movie collection. I'm using an NSTableView, with it's columns bound to attributes of my Core Data store through an NSArrayController object. At this point the columns sort fine(for numeric values) when the column headers are clicked on. The issue I'm having is...

How would one make an Xcode style console window?

I am making a Haskell editor with Cocoa, and it would be useful to support some in-application text output. Even better would be supporting some text input. Xcode does all this in its console, which looks like it might be an NSTextView, but not sure if somebody might have done all this before. ...

Build an Xcode project on a Linux machine

Without writing a GNUmakefile by hand, do any tools exist that understand Xcode projects and can build them directly against GNUstep, producing a Linux executable, thus simplifying (slightly) the work required to keep projects functional under Cocoa/Mac and GNUstep/Linux? Basically, is there an xcodebuild style app for Linux? I looked ...

Crashing the OS X Pasteboard

I have an application that reads in text by emulating CMD-C copy commands and reading the pasteboard - unfortunately this the only way to achieve what I need. Occasionally, as this is under development, once in a while I do something wrong (I don't think it's related to the copy command) and the app crashes. Once in a while, this has a...

How is the presentation layer of a CALayer generated?

Hi, I'm having difficulties animating my custom layer property using Core Anmiation. My question is how the presentation of a CALayer is generated. Here is what I have now: @interface MyLayer : CALayer { NSMutableDictionary* customProperties; } @property (nonatomic, copy) NSMutableDictionary* customProperties; @e...

Performing a task immediately when an app starts

I know there is an NSSomething() that is called automatically if it exists when the app starts and can be used to set for example the text of a label. I just can remember the name of that function. help? Thanks! ...

simple CATextLayer scaling problem

I'm having a simple scaling problem with CATextLayer, but i just couldn't figure it out: I want the CATextLayer to proportionally grow in size with it's superlayer: if the superlayer's width is 300 the text size of CATextLayer should be 12 and if the supeview's width is 600 the text size should be 24. I couldn't find a working solution! ...

Change color of title bar in cocoa

This must have been asked before, but after Googling I still can't find the answer. How do you change the color of the title bar (The bar that you can click and drag around with the close, minimize and maximize buttons) to a different color than the default gray in Cocoa? ...

Will GTK's pango and cairo work well in Cocoa and MFC applications.

I'm writing a GUI program and decided to go native on all platforms. But for all the stuff i need to draw myself i would like to use the same drawing routines because font and unicode handling is so difficult and complex. Do you see any negative points in useing Pango/Cairo. Well on MacOSX i havent succeded installing Pango/Cairo yet....

SBJson returning nil causing cocoa window to not show up

I'm using the example here. If there isn't a value for the key, my application returns -[NSCFArray insertObject:atIndex:]: attempt to insert nil in the console, and my window doesn't show up. How could I preform a check to make sure this doesn't happen? ...

How do I launch the Mac Address Book from my app and select a specific person?

I have an app and I am reading in the address book information using the ABAddressBook APIs and selecting a person. I would like to provide a link from my app to launch the Mac address book and pre-select a specific user. I'm sure there are several ways to do it - I came up with one that seems to work but it feels a little clunky. I l...

Popuplating an NSPopupButton with the contents of two NSArrayControllers

I'm looking to populate an NSPopupButton with the contents of two NSArrayControllers. The NSArrayControllers are both bound to my Core Data Managed Object Context and represent separate entities (in this example: Person and Department). Within my NSPopupButton, I would like a list of departments, and the people that work under them. Lik...

Lua-Objective-C bridge on the iphone

I have partially ported the LuaObjCBridge to the iPhone. Most things work but there are still some issues I have to deal with. There are sections where #defines are defined with-respect-to intel or ppc. Is the ARM chip closer to intel or ppc? Here is the most relevant section where most of the defines are: #if defined(__ppc__)||define...

CGContextRef getting corrupted in plugins

Here's a picture of one of the stranger problems I've had. I'm using a plugin architecture to draw things in Core Graphics. The host app creates a context that is passed to the plugin, which draws into the context and sends it back. Here this was done multiple times to draw multiple objects (though just for demonstration, it happens even...