osx

Git changes files on Mac OS X

I just cloned an old repository containing some linux kernel modules (don't ask). If I clone on a linux machine, everything is fine. On my Mac however, someone (presumably Mac OS X) makes binary changes to the modules. I already disabled autocrlf. Here's the output of git diff -p --stat directly after clone: .../kernel/net/ipv4/netfil...

FUSE was hanging when try to get ppid of context when executing files

Hi, all I've tried to insert a piece of code in a prototype file system written in FUSE that can get ppid from the calling process id (fuse_get_context()->pid). It works well for normal read/write operations. However, if one program is going to execute a file (only on Mac OSX), this fs quits after hanging for a long time. The code is fo...

Specify Framework Version on OSX

I am compiling a program that embeds Python, in particular Python v3.1. On my system I have several versions of the Python framework: 3.1, 2.5, 2.6. When I pass "-framework Python" to g++ when compiling, g++ seems to pull in version 2.6 (lives at "/System/Library/Frameworks/") instead of version 3.1 (lives at "/Library/Frameworks/"), res...

Changing Cocoa display name in the app?

How do I change the name that shows up above my app in the Dock on OS X? (I've tried renaming the target and renaming my project. And, I've Googled it.) ...

Make my Cocoa app respond to the keyboard play/pause key?

Is there a way to make my app respond to the play/pause button on Mac? EDIT: Using the suggested code,I get this console message: Could not connect the action buttonPressed: to target of class NSApplication Why would that be? ...

Custom OSX window skin?

How do I make custom buttons for my app window on OSX? I'd also like to skin the entire window. Are there any easy classes or ways to do this? Any tutorials that show how? ...

Git not removing files when switching branch

Sometimes when switching branches using Git (version 1.7.2.1) it does not seem to remove the files/directories I created specific to the branch I switched away from. Neither does it list it as untracked when running git status or any log entries for those files. This only happens occasionally and I'm not sure why or how to reset it so t...

Globally hiding cursor (from background app)

I want to hide the cursor from a statusbar app and i've done some research. It seems as though the solution to this problem was found a while ago: http://stackoverflow.com/questions/1412084 or http://lists.apple.com/archives/carbon-dev/2006/Jan/msg00555.html But the code that is referred to will not compile. Do any of you guys know eit...

Why would my app not be able to "attach" an action?

I've changed my app class type from NSObject to NSApplication and now I get the following message when testing my app: Could not connect the action buttonClicked: to target of class NSApplication What does this mean and how can I fix it? ...

Need Help Tracking Down EXC_BAD_ACCESS on Function Entry on MacOS

I have a program that gets a KERN_PROTECTION_FAILURE with EXC_BAD_ACCESS in a very strange place when running multithreaded and I haven't the faintest idea how to troubleshoot it further. This is on MacOS 10.6 using GCC. The very strange place that it gets this is when entering a function. Not on the first line of the function, but th...

What are some options that exist for osx like MacRuby, but using javascript?

Just wondering what are some of the options out there people know of. Only thing that comes to mind is titanium. curious what other people use. ...

Open link in Firefox via contextual menu using Applescript

I'm new to use Applescript to create services in Snow Leopard. I found myself often trying to open a link in Safari with Firefox. I know there are ways to open a page url with FF but I want to open any link inside a page with FF. I think using Applescript to create a service might be a good idea and so far I found this: openFirefoxURL("...

Extracting an image from H.264 sample data (Objective-C / Mac OS X)

Given a sample buffer of H.264, is there a way to extract the frame it represents as an image? I'm using QTKit to capture video from a camera and using a QTCaptureMovieFileOutput as the output object. I want something similar to the CVImageBufferRef that is passed as a parameter to the QTCaptureVideoPreviewOutput delegate method. For s...

How to auto-select next row after deleting current row by core data context?

I am using Core Data to manage objects and using a NSTableView to display those objects. The table columns are binded to objects' properties through a NSArrayController. When users click the delete button, all selected objects in the NSTableView will be deleted. Then only remained objects are left in the NSTableView. This works smoothl...

Need to rebuild memcache module with same build number as php

I'm running OSX 10.6 with php 5.2.13 and memcache 2.2.6. Build numbers as shown below. How do I get them to match though? Here's the error I get when php tries to load the memcache module: $ php -m PHP Warning: PHP Startup: memcache: Unable to initialize module Module compiled with module API=20090626, debug=0, thread-safe...

CGScreenRegisterMoveCallback still not working?

Are Move calls still not sent by the window server, which makes registering CGScreenRegisterMoveCallback callbacks with CGScreenRegisterMoveCallback() futile? According to http://lists.apple.com/archives/quartz-dev/2008/Jan/msg00052.html this is a bug that's yet to be corrected (though it's been almost 3 years now). Is there an alterna...

Installed python3, getting command not found error in terminal

I installed python3, I can open idle and it says it is running python3.0.1, but when I enter python3 in the terminal (on OSX) I get an error saying 'command not found'. Entering python gets me the 2.x version that came on the computer. Any advice on how I can access python3 from the terminal? Thanks ...

Mac OS X vs. Windows mouse wheel scrolling

Mac OS X determines what area to scroll by the mouse position. Windows does this by what application is active. So I thought anyway. If Notepad++ is the active application in Windows, I can scroll underlying applications by placing the mouse pointer on them. But this seems like the only application with this behaviour. Windows Explorer ...

Reproducing "Gallery of processor cache effects"

Having read this article I tried to reproduce the example on my Mac. However my curve for the first example looks completely different and I don't understand why.. My code is below: #include <mach/mach_time.h> #include <time.h> #include <stdio.h> #include <stdlib.h> void mach_absolute_difference(uint64_t end, uint64_t start, struct ...

Terminal for Mac with code snippets (commands) ?

I need to know if there is a terminal replacement for Mac which allows me to store frequently used or long command snippets. e.g. this one: netstat -plan|grep :80|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -nk 1 this is quite long to type again and again and also quite hard to remember So I would prefer to just store them in sof...