osx

Portability of Java Swing applications to OSX

Recently I wrote an extremely basic Java Swing program with a couple of text fields and buttons. The program works fine for me on Ubuntu with Java 1.5. But when I try to run it on OSX (10.4), the main window is displayed correctly but the program seems unresponsive. Nothing seems to happen, no matter which button I click on. I know next...

Looking for an OSX application that can do image processing using a webcam.

I'm looking for an OSX (or Linux?) application that can recieve data from a webcam/video-input and let you do some image processing on the pixels in something similar to c or python or perl, not that bothered about the processing language. I was considering throwing one together but figured I'd try and find one that exists already first...

What are the alternatives for meld (graphical diff tool) on OSX

I mostly develop on Linux and meld is indispensable for me. However, when I'm on the road I use a MacBook (leopard) and I want to use the same set of tools as on my main development box, meld being one of them. Although you shoud be able to install meld, I could not succeed with it. So... are there any alternatives that are as good (or ...

Mac/Windows Switching

About 2 years ago I dropped windows from my home PC and switched 100% to linux (fedora, then ubuntu) - The missus wasn't too happy but she got used to it and learned a thing or two. Then about 6 months ago I got myself a shiny new Macbook and since moving to OSX have never looked back; Unfortunately I've not been successful in getting my...

How to create virtual CD drive on Mac OS X

How does one go about creating a virtual CD driver on Mac OS X programatically? I can't find any relevant Cocoa APIs or any pure C BSD solutions. Any help or information is appreciated. ...

Best Cocoa/Mac OS X programming blogs?

What are the best Cocoa/Mac OS X programming blogs? One blog per answer please. blog should be active (i.e. updated regularly and recently) blog should have code-centric posts (although not all) ...

Receive HTTP Headers via NSURLRequest/NSURLConnection in Cocoa

I've been working on figuring out how to receive HTTP Headers via a request made with NSURLConnection. Typically a request is made with something as simple as the following: NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; The only way I've personally found in Apple's abund...

Mac Console paste generating trash text

On mac os console, when doing paste of large quantities of text (for example an sql database) I get loads of trash and corrupted text. But when doing the same under windows or into a text box, this doesn't happen and the text comes out ok. Is this a buffer problem or something like it? If so anyone know any flag to make its size bigger?...

How do I install plpython on MacOs X 10.5?

I have just installed PostgreSQL 8.3.4 on Mac OS X 10.5 (using ports), but I cannot figure out how to enable PL/Python. When I run the CREATE LANGUAGE plpythonu I get the following errors: ERROR: could not access file "$libdir/plpython": No such file or directory STATEMENT: CREATE LANGUAGE plpythonu; psql:<stdin>:18: ERROR: could not...

Java: When is Java 6 ready for end-user desktop application?

I am writing a desktop application written in Swing developed using Java 1.5. Some of the users seem to be using Mac, but I am interested in Java 6's scripting feature (Java 6 ships with Rhino). Java 6, although it came out almost 2 years ago, doesn't seem to be widely in use. I also hear Apple ships Java 6 only for Intel 64 Macs only. I...

Getting started with Mac development

How long does it take for an experienced Windows programmer to learn writing simple software for Mac OS X? Where does one start and what tools will be necessary? ...

Why does OS X define 'nil'

At least the libsigc++2 project is hit by OS X headers defining nil on the preprocessor level, outside of namespaces etc. At least 10.5.5 and XCode 3.1 have this. Note that it is in effect not only in Objective-C sources but C++ as well. Short question: why? http://ardour.sourcearchive.com/documentation/2.5/functor__trait_8h-source.htm...

What are the Conventional GEM PATHS for Ruby under OS X 10.5?

I have a performance problem with my ruby on my machine, which I think I have isolated to loading libraries (when #require is called), so I'm trying to work out whether ruby is searching too many folders for libraries. When I run $ gem environment RubyGems Environment: - RUBYGEMS VERSION: 1.3.0 - RUBY VERSION: 1.8.6 (2008-03-03 pa...

NSApplication and -applicationDidFinishLaunching:

Hi All, I have an application where I have a main.m that returns NSApplicationMain(argc, (const char **) argv);. I want to run code on -applicationDidFinishLaunching:, but I just dont see how to do it. Can anyone help or have an example? Thanks! -Jason ...

JVM terminates when launching Eclipse MAT on Mac OS with J2SE 6.0

I have recently discovered the incredibly useful Eclipse Memory Analysis Tool, which makes quick work of finding memory leaks in Java applications. Unfortunately, after switching my JDK to 1.6 (under Mac OS 10.5), the JVM terminates immediately upon startup. All that appears is a dialog stating "JVM terminated" with "Exit code = -1". ...

What needs to go in order to fully remove a MAMP install from OSX?

For reasons that we won't discuss, I have determined that MAMP is a pile of crap that haunts my system, and unless I remove it fully, I will live in shame. I've done the obvious thing and removed the MAMP directory from my Applications folder, however, I don't like wandering files, and I have an itching feeling that MAMP put some .sock ...

Enabling floating point interrupts on Mac OS X Intel

On Linux, feenableexcept and fedisableexcept can be used to control the generation of SIGFPE interrupts on floating point exceptions. How can I do this on Mac OS X Intel? Inline assembly for enabling floating point interrupts is provided in http://developer.apple.com/documentation/Performance/Conceptual/Mac_OSX_Numerics/Mac_OSX_Numeric...

openCV doesn't compile on Leopard

I've been for the past few hours trying to figure out why openCV doesn't compile on leopard. I've been googling for references but all point to a dead google group. So my question is quite simple: I've read INSTALL file, read all documentation i could find and still couldn't figure a solution for this. The compile breaks here (this is ...

Run command when bash script is stopped

How can i, in a bash script, execute a command when the user stops the script (with ctrl - c)? Currently, i have this: afplay file.mp3 while true: do osascript -e "set volume 10" end But i would like it to execute killall afplay when the user is finished with it, regardless if it is command-c or another keypress. ...

How to determine if a directory is on same partition

Say I have an input file, and a target directory. How do I determine if the input file is on the same hard-drive (or partition) as the target directory? What I want to do is the copy a file if it's on a different, but move it if it's the same. For example: target_directory = "/Volumes/externalDrive/something/" input_foldername, input_f...