osx

gen_bridge_metadata and the iPhone

Is it possible to run gen_bridge_metadata on iPhone frameworks? I keep running into the problem of gen_bridge_metadata not using my preprocessor defines... So a call like this... IPHONE_SDK=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.sdk gen_bridge_metadata -c '-I$IPHONE_SDK/usr/include -DTARGET_OS_IPHONE' --frame...

Xcode 3.2 Missing Class Actions / Outlets?

Where are the Class Action and Class Outlets in Xcode 3.2? They aren't showing up in the Inspector like they used to. ...

Why getting differences between using XCode and xcodebuild?

Can anyone explain why I get different results when compiling the same XCode 4.x project using the GUI and xcodebuild command-line? XCode GUI Perform a clean Build "Release" target Build successfully xcodebuild Perform a clean Run "xcodebuild -configuration Release" Results in the following errors: /Developer/usr/bin/gcc-4.0 -x o...

Installing Boost libraries on Snow Leopard

I have followed the directions on the boost website. I have put the boost dir in the path. I still cannot compile a C++ program using the boost libraries. I am specifically trying to use the filesystem library. Any help is greatly appreciated. --TJB ...

With multiple Python installs, how does MacPorts know which one to install MySQLdb for?

I just upgraded the default Python 2.5 on Leopard to 2.6 via the installer on www.python.org. Upon doing so, the MySQLdb I had installed was no longer found. So I tried reinstalling it via port install py-mysql, and it succeeded, but MySQLdb was still not importable. So then I tried to python install python26 with python_select python26 ...

How to install pycairo on osx?

I am trying to install the pycairo (Python bindings for the cairo graphics library) under OSX. I started with easy_install pycairo and got: Requested 'cairo >= 1.8.8' but version of cairo is 1.0.4 error: Setup script exited with Error: cairo >= 1.8.8 not found So I went to cairo's site and downloaded the latest package (1.8.8) o...

Get short user name from full name

Anyone know how to get a user's short user name, eg. "johnsmith", given their full name, eg. "John Smith"? Note I'm interested in any user, not the current user, so functions like NSUserName are irrelevant. Why? I am authenticating a username and password using Authorization Services. This allows people to enter either their short name...

Sample code for creating a NSTextField "label"?

In my desktop Mac OS X app, I'd like to programatically create a NSTextField "label" which has the same behavior and properties as a typical label created in Interface Builder. I usually use (and very much like) IB, but in this case it must be done programatically. Try as I might, I can't seem to find the combination of method calls th...

Git instaweb httpd configuration to use apache2 on OSX Leopard server

Hello, By default git instaweb is expecting lighttpd web server, whereas on OSX Leopard server apache2 is the default one. Adding the following to .git/config : [instaweb] local = true httpd = apache2 -f port = 4321 modulepath = /usr/libexec/apache2 and running 'git instaweb' results in : apache2 not found. Install apache2 or use...

DWARF register numbering for Mac on Intel

I'm trying to decode dwarf information for a program and am confused by the dwarf register numbering. According to http://wikis.sun.com/display/SunStudio/Dwarf+Register+Numbering register 4 is the ESP and register 5 is EBP. However the DWARF information I'm decoding (the exception handling unwind information) appears to indicate that ESP...

How can you suppress all logging in Cocoa app?

Is there a way to force suppression of all logging in a Mac OS X desktop Cocoa app? Sometimes some part of the system or a plugin (which is out of your control) will log messages on behalf of your application to the console (system.log). Is there a way to suppress all logging in your application? ...

can't install lxml (python 2.6.3, osx 10.6 snow leopard)

I try to: easy_install lxml and I get this error: File "build/bdist.macosx-10.3-fat/egg/setuptools/command/build_ext.py", line 85, in get_ext_filename KeyError: 'etree' any hints? ...

Cannot assign LinkedList to List, why?

Hi everyone, I'm using Java in Eclipse on Mac OS X 10.5 (JDK Compliance level 5.0) with and I'm getting very strange compilation problems that I wasn't getting before (and I don't think I've updated my compiler or Eclipse, but maybe an update was installed that I wasn't aware of). For example if I have the following line in my code: Li...

Is there a command like "watch" or "inotifywait" on the Mac?

I want to watch a folder on my Mac (Snow Leopard) and then execute a script (giving it the filename of what was just moved into a folder (as a parameter... x.sh "filename")). I have a script all written up in bash (x.sh) that will move some files and other stuff on input $1 I just need OSX to give me the file name when new files/folders...

Meta and # in a UK mac terminal

In the mac terminal application there is a setting (preferences -> keyboard) that lets you set "use option as meta key". This is useful as a lot of unix boxes use bash as default shell and that has emacs keybindings M-f and M-b that let you skip words. Problem is that on a Mac with a UK keyboard the # symbol is tricky to get to - norma...

Graphical Sudo for Mac OSX

Hi. I'm designing a little software in java. Don't know the term/definition to what I'm doing, but I'm prompting commands from java to the terminal. Something like this: Process process = Runtime.getRuntime().exec("command"); I've done this before in linux, and I used the gksudo for commands that required root password. Is there any "...

How to get an output console in an Ogre project under MacOSX?

Hello, I'm working on a project using Ogre3D. We recently ported our project to MacOSX but there are some things that were linked to the Windows API. In particular I don't know how this should be translated: #if defined( __WIN32__ ) || defined( _WIN32 ) AllocConsole(); #endif It would be nice to port the project under Linux someda...

CVS commands have stopped working in MacOS X Terminal

Today, for the first time in several months, I needed to use CVS on the command line on my Mac (MacOS X 10.4), and discovered that the commands no longer work. In response to: cvs diff -u I got: cvs diff: CVSROOT requires a path spec: cvs diff: :(gserver|kserver|pserver):[[user][:password]@]host[:[port]]/path cvs diff: [:(ext|server)...

How to drive Interface Builder with AppleScript?

I want to programmatically create NIB (or XIB) resource files - like resource import tool. Making XIB file manually is not impossible, it is XML-based file, but there are too many unspecified items. So, I'd like to use AppleScript to drive IB itself and create the resources with it, but I fail to do so - I can't create any new items and...

Executing .app folder from Java?

Is there a reasonable way to execute a .app directory directly from Java instead of digging down to find the binary? I've got an app with some preferences that include external programs for opening various things, it'd be nice if on OSX the user could just select the .app folder. I could look for the .app extension and handle it differ...