osx

How are the classes in the Sketch example AppKit application separated into Models/Views/Controllers?

I am a little confused as to the definition of classes as Models or Views in the Sketch example AppKit application (found at /Developer/Examples/AppKit/Sketch). The classes SKTRectangle, SKTCircle etc. are considered Model classes but they have drawing code. I am under the impression that Models should be free of any view/drawing code....

Ogre3d Local reference string popping out of nowhere

I'm building an ogre3d tutorial based on this setup http://www.ogre3d.org/wiki/index.php/SettingUpAnApplication#XCode I've followed all steps as it says. It compiled perfectly. But on run this happened: *-*-* OGRE Initialising *-*-* Version 1.6.0 (Shoggoth) Creating resource group Bootstrap An exception has occurred: OGRE EXCEPTION(7:...

How to I launch an on-screen keyboard from my application on Mac OSX?

I know there is an on-screen keyboard which you can access on Mac OSX, however I need to add a toolbar button to launch it from within my application. Does anybody know how I can do this? ...

How can I detect whether the alt/option key is down in GTK on Mac OS X?

I want to detect whether the alt/option key is pressed during a mouse drag in GTK on Mac OS X. I am using pygtk. Normally, holding down alt would add MOD1_MASK to event.state, but alt does affect event.state at all. In key press events alt shows up as gtk.keysyms.kana_switch, but this is not sufficient for my purposes since the user m...

How do I use IPython as my emacs python interpreter

I'm running Emacs 22.1.1 and IPython 0.9.1 on OS X and I'd like to be able to run lines/methods/snippets of Python code from my current buffer on demand inside an IPython interpreter. What do I need to do to get this working? ...

How do I get each line from an NSString?

If I have an NSString with a text file in it, how do I get an NSArray of NSString with each NSString containing a line of the file. In 10.5 I did this: NSArray* lines = [str componentsSeparatedByCharactersInSet: [NSCharacterSet newlineCharacterSet]]; But that doesn't work in 10.4, and my program needs to work in 10.4. As well, it ne...

Remove Apache

I have multiple installations of apache on my Mac OS X 10.5 and would like to remove them including any dependencies. They are installed in 3 different directories. How can this be achieved? ...

OS X inter thread communication question

I am developing a multi-threaded application in Cocoa. The main thread takes values from the user, and when a button is clicked I invoke a secondary thread in which a long calculation takes place. Now from this thread I have to return the output of every step of the calculation to the main thread. I want to periodically send data from on...

Mac OS X accessing devices with same Vendor ID and different Product IDs

I am writing an application which opens USB devices and transfer some data. I am following the UsbSimpleNotificationExample from the Developer Examples. The example adds notifications and assigns callbacks for a unique Vendor ID and Product ID. But for my application I have multiple PIDs and a single VIDs. How can I add a dictionary entr...

porting iPhone openGLES app to OSX?

Developing for the iPhone has been my first experience with objective-c and first in-depth experience with xcode. How difficult would it be to port an openGLES iPhone app to the OSX desktop using openGL? I am not asking about user interface - obviously there is no equivalent to cocoa touch UI on the desktop. I am asking specifically ab...

Programmatically controlled virtual drive

How would I go about creating a virtual drive with which I can programmatically and dynamically change the contents? For instance, program A starts running and creates a virtual drive. When program B looks in the drive, it sees an error log and starts reading/processing it. In the middle of all this program A gets a signal from somewh...

Changing Mac OS X User Password Programmatically or via Script

I need to be able to change a user's password from a cron task or from an ssh session. Is there an easy way to do that with a bash script? If not, what's the easiest way to do it in Cocoa? ...

How do Mac OS X processes and threads differ?

In my Mac OS X Activity monitor it lists each "process" id for each application. It links several processes to a single thread, for instance iTunes and Finder are currently both listed under thread 7. The way I learned about threads and processes would lead me to think that this should be the other way around. I learned that a process ha...

Multiple windows or "pages" in an application

I am a newbie in Mac application development. I want to write a GUI application in Cocoa using Interface Builder. I want multiple screens i.e. when one button on a screen is clicked, another screen should be displayed. How can I activate a new screen at button click event? ...

Replacement for kicker.bundle in SystemConfiguration in OS X Leopard

I'm trying to find the replacement for kicker.bundle that was found in /System/Library/SystemConfiguration in OS X pre 10.5 (Leopard). I can't seem to find any sort of official documentation on the matter. Does anyone know what the replacement is? Thanks, k. ...

A good place to find frameworks with Interface Builder plug-ins…

Someone on here recently recommended BWToolkit, and it really impressed me, so I started googling for more IB plug-ins. I've found a couple on random blogs, but haven't been able to find any kind of repository/aggregator for them. Anyone know where I can find more of these? Thanks. ...

How can I pass user credentials through a Unix-domain socket on Mac OS X?

Under many operating systems Unix-domain sockets allow a process to reliably pass its credentials to another process in a way that can't be maliciously subverted. For instance, this is done on Linux through the SO_PASSCRED and SO_PEERCRED options, on FreeBSD by passing messages that include the cmsgcred structure, and on NetBSD by setti...

What are your experiences implementing/using WebDAV?

For a current project, I was thinking of implementing WebDAV to present a virtual file store that clients can access. I have only done Google research so far but it looks like I can get away with only implementing two methods: GET, PROPFIND I think that this is great. I was just curious though. If I wanted to implement file uploading ...

Can I hide a directory/path from Launch Services?

I would like to be able to build test applications (e.g. the nightly Minefield/Firefox) without Launch Services deciding that they're the best way to open their assigned file types. Is there a way to hide my ~/src directory from Launch Services, so that Finder won't register applications in that folder? ...

How can I make spotlight index markdown files?

I typically use the .markdown or .md extension for markdown documents. Unfortunately spotlight refuses to index them unless they have the .txt file extension. I've seen a possible solution involving editing Info.plist files on the textmate blog. Is there a better way? Update: I just discovered QuickLook generator for Markdown files whi...