osx

Writing unicode strings via sys.stdout in Python

Assume for a moment that one cannot use print (and thus enjoy the benefit of automatic encoding detection). So that leaves us with sys.stdout. However, sys.stdout is so dumb as to not do any sensible encoding. Now one reads the Python wiki page PrintFails and goes to try out the following code: $ python -c 'import sys, codecs, locale; ...

OSX API for accessing data structures similar to Quicktime atoms or MPEG boxes

Hi, Quicktime-, MPEG- or AIFF-files all seem to organize their data elements in chunks like this: 0x00 chunk 1 header (size as UInt32 + ID as 4-char-code) 0x08 chunk 1 data ... 0xA0 chunk 2 header 0xA8 chunk 2 data ... and so on. When reading a file like that, it's easy to skip to the chunk of interest, because each chunk declares it...

Cocoa/ Objective-C Shell Command Line Execution

This is probably a stupid question, but how can I execute a shell command from my Cocoa app? I have the command as a string "command", but can easily manipulate data as needed. There is no need to get a returned output value. ...

Mercurial: TortoiseHg's "guess rename" from the commandline?

Is there any hg functionality to mimic the "guess renames" command of TortoiseHG? I really dig this one, however I am currently using MacOS and have Murky or the commandline interface available. ...

Force VM to launch in 32-bit mode WebStart JNLP

I am running a Java 32-bit app on Mac OS X Leopard via Web Start. I need to make sure the VM loads in 32-bit mode. How can I do this in the JNLP? ...

Build failure during install py25-gtk on Mac OS X 10.6 using MacPorts 1.8

When I do this command : sudo port clean py25-gtk sudo port install py25-gtk I get this error : ---> Computing dependencies for py25-gtk ---> Building getopt Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_getopt/w...

Programmatically block screen saver in Mac OSX

Is it possible to programatically ask Mac OS X not to turn on the screen saver while your application is active? ...

How to distribute a Mac OS X with dependent libraries?

I have a program (specifically my entry for the SO DevDays Countdown app challenge) which relies on several dynamic libraries, namely libSDL, libSDL_ttf, and others. I have these libraries installed under /opt/local/lib via MacPorts, and many people won't have these installed (and some might have them installed, but not at that location...

Installed git on OS X; What should I add to my PATH?

I just installed git 1.6.4.4 after downloading a DMG package from here. I now have /usr/local/git. But it isn't in my PATH. So I need to add it. My question is, should I add just /usr/local/git/bin, or do I also need to add one or more of these other directories? $ cd /usr/local/git/ $ ls -al total 0 drwxr-xr-x 3 joefleen wheel 102...

How to compile a dynamic library?

Hi, I've been searching the web for a couple of days and can't seem to find clear instructions on how to do this. SQLite doesn't have math functions like, sine, cosine, etc.. I found a library that extends SQLite and adds these functions, but I can't figure out how to compile the library. http://lhealy.livejournal.com/6306.html I've ...

How do I view application directories and directories that begin with dot in Netbeans on OSX?

How do I view directories that begin with dot and how do I browse application directories in Netbeans? I can't seem to view directories that begin with a "dot" through the open file dialog in Netbeans. Similarly, I can't browse any application directory e.g. File->Open File->"someapp.app". Attempting to browse "someapp.app" gives the er...

How to best install Rhino on OSX 10.6 Snow Leopard

I am running OSX 10.6 Snow Leopard, have downloaded rhino1_7R2 and moved it to /usr/local/ I am aware however that (while this would prevent it from being altered by OS updates) this may not be the best location for it and imagine that it may need to be connected to the Java installation. My intended use for Rhino is to run JavaScript ...

Experiences of Mono web development in OSX

Hey guys I'm a .NET web developer and just bought a new Mac. I'm interested in developing, and debugging .NET in OSX, but I'm not interested in deploying to OSX. Although, in the future, I will be interested in deploying to Linux. What are your experiences with Mono web development in OSX? In particular, how does it compare in terms ...

Flex text field do not work under MacOS X

Hello. Strange problem. Text fields in my flex simply do not work under Mac. Inputted characters do not appear within it. I do not have any specific font set (just _serif), so I don't thing it's font issue. In what direction should I dig? Have anyone similar experience? ...

How do I instruct CMake to look for libraries installed by MacPorts?

I'm trying to build some of our software, which was designed to run solely on Linux, on MacOS X. We are using CMake and I installed MacPorts so I could easily get CMake along with some of the third party libraries that we depend on. Now the problem is that CMake doesn't appear to look for libraries from MacPorts by default so several of...

Is it possible to send a growl message to another user on the same computer on OSX?

My app currently uses growl to send the occasional message to the user, which works great when I am developing it. But once it is run as a in production, as a system-level Launch Daemon under a different user, the growl messages no longer appear. So, the question: Is it possible to send a growl message to another user on the same compu...

How do you show Xcode's build log? (Trying to verify if iPhone distribution build zip was created correctly.)

I'm trying to zip up my iPhone application for App Store distribution. The distribution instructions suggest looking in the build log to check if the mobileprovision file was included, but I can't figure out how to show a build log. Apple's instructions: To confirm your build was successful, check for the following: O...

Moving from Windows API to Mac OS

Hi, I'm a Windows (native, not .NET) programmer and I'd like to port an application to the Mac. Actually, I believe it will be more of a rewrite, as the original depends on many activex controls. As I have never used a Mac in my entire life, I'll need some guidance. O:-) a) What book(s) would you recommend to make the move from Wi...

Undefined symbol _main when trying to build shared library g++ / mac

I am trying to build libdecodeqr on a mac. My c++ building and linking history is all on windows, so it's an exciting journey of discovery. I have finally got to the point where I want to create the linked library. The command I am running is: g++ -shared -o libdecodeqr.so.0.9.3 bitstream.o codedata.o container.o ecidecoder.o formati...

Localizing a modern xib-based Mac application

Ours is an open-source Mac application localized by volunteers. These volunteers will do their work on special localization builds of the software (with unstripped nibs), then send us the changes to integrate into the original xib and strings files. The problem is that, while there is a way to integrate string changes without blowing aw...