osx

OSX: Launching multiple instances of an app and passing them command line args

There is a program I need to launch multiple times and pass it different arguments each time. To do this I tried writing a simple python script as follows: import sys, os from os.path import join # This works, but will not launch twice os.system('./AppName.app -AppCommandLineArg') # This allows launching two instances but without comm...

Is there a way to view the undo stack?

I'm learning about undo, and I'd like a way to peek into the undo objects (NSInvocations) in the undoManager so I can see what's going on. I couldn't see anything like this in the docs, but maybe someone knows a way. Thanks. ...

Is this the right version of Vim for OS X Snow Leopard?

I'd like to try Vim. I'm using Mac OS 10.6.2 (Snow Leopard). I downloaded vim7.0.224.tar.bz2 from here. However, I have doubts. It's the newest version offered, but the heading says "OS X 10.4 (Tiger)". Is there another, preferable version I should know about? ...

Double click document file in Mac OS X to open Java application

I have a Java application in an application bundle that I want to associate a file type with. For example, if there's a file foo.example when that file, or any file with the .example extension, is double-clicked, I want my application to start and open the file. I also want the files to have my application's icon. I'd like to do this...

Applescript to open .url files on OS X Firefox

For reasons that only the developers can understand, Firefox will create and open .url files on Windows and .webloc files on OS X but won't allow the Windows version of Firefox to open .webloc files or the OS X version of Firefox to open .url files. (.url files open in Safari but that's not good enough for reasons that aren't worth going...

Pantomime and Mail Frameworks? - Cocoa

Does the Pantomime Framework work for 10.5 or 10.6? Because when I look at the build error I get when compiling it says, it couldn't find the 10.4 sdk. If not, then does anyone know any other framework that works really well with 10.5 or 10.6, with an example? ...

Use Google Chrome/ Chromium instead of WebKit on MacOS

I would like to use Google Chrome instead of the WebKit Framework in one of my projects. I found the 'chromiumembedded' project for Windows but nothing similar for Mac. Best would be to have it in form of a Framework to just drop it into a XCode project. Question: Is there an easy way to integrate the Webkit of Google Chromium in own Ma...

Is there a developer licensing program for OSX?

Microsoft offers a bunch of incentives for developers (like MSDN) and startups (like BizSpark) to get them to develop software for the Microsoft platform with less investment. MSDN for example allows me to test my software on every version of Windows in existence without buying a full license to that version. BizSpark is even better, giv...

CGBitmapContext get pixel value Leopard vs. SnowLeopard confusion

Im trying to draw specific colour rectangles into a CGBitmapContext and then later compare pixel values with the colour i drew (a kind of hit-testing). On Leopard this works fine but on SnowLeopard the pixel-values i get out are different to the colour values i draw in - i guess due to colorspace confusion and ignorance on my part. ...

Extract from Cache.db files on Mac OS X Leopard

I am a Windows user, and I delete temp internet files from IE by URL visited (because the Java app has an embedded web browser tied to a web server). I read from another post that the Cache.db file stores responses from webservers when it is an app bundle (/users/username/library/caches/myappbundle/cache.db). Is it possible to extract ...

get console log on MacOSX from another application

With the application Utilities/Console.app, I can see the console output of applications. Is there a way to access this log from another application? To be more specific: I am writing a crashhandler for my application and I want that it attaches the console output to the crash information. ...

Firefox cache path construction Mac OS X

I know the path for Firefox's cache is as follows on Mac OS X Leopard: ~/Library/Caches/Firefox/Profiles/COMPUTER_CODE.default/Cache How is the variable "COMPUTER_CODE" above created? I assume it is different from computer to computer. I want to be able to programmatically delete this cache if it exists. ...

Ruby-LDAP and Snow Leopard

When I install Ruby-LDAP on my Snow Leopard box, all appears to go well: $ sudo gem install ruby-ldap Building native extensions. This could take a while... Successfully installed ruby-ldap-0.9.9 1 gem installed Installing ri documentation for ruby-ldap-0.9.9... Installing RDoc documentation for ruby-ldap-0.9.9... But when I run the ...

Java application doesn't know name of file being opened - Mac OS X

I have a Java application in an application bundle that has a file association (using Info.plist) that runs when a document is double-clicked. How do I get the filename of the document that was double-clicked in my Java application? Right now my Java app just runs and displays an empty document. There doesn't seem to be any command line ...

py2app file ownership and executables

How should I handle changing ownership of the files in the .app bundle? If I ship this file to a client, the internals will have my user id. Also related, I have some executables files that are used by my application. py2app removes the executable permission bit. Should I include these in DATA_FILES and change permissions in-place,...

Why does my Perl CGI script showing up as plain text in the browser?

I've been playing around with making my mac a webserver, and now I'm trying to make a simple html form, and a perl script that prints out the input. I have /Library/WebServer/Documents symlinked to ~/Sites/, so I have my index.html and display.cgi both there. But when I press submit, the perl file just shows up as text. Any cgi file I ha...

Problems communicating with external editor in Qt4

I am writing a command-line Qt4 script (using QCoreApplication) on Mac OS X. I am using this code adapted from C++ Programming with Qt 4, 2nd ed. p. 313: QTemporaryFile outFile; if (!outFile.open()) return; QString fileName = outFile.fileName(); QTextStream out( out << initial_text; outFile.close(); QProcess::execute(editor, QStr...

Powerbook compiler queries

I am thinking about buying an Apple Powerbook 1.5 GHz machine. While my primary focus for that machine would be internet, I may also do some programming on that machine since it would be the machine I would be taking to college... What I wanted to know if there would be any major difference in context with the compilers used etc? Would I...

XCode and CUDA integration

Hi, Was just wondering if anyone has any experience working with CUDA and XCode? I'm having a nightmare setting it all up... Dawson ...

permissions for running passenger on OS X 10.6

I'm not sure how to set permissions for Passenger on OSX. I have gotten through the install fine, but I understand now that Passenger runs as whoever owns environment.rb. That's my own user and group, call it apple & apple. As I understand it, Apache runs as _www & _www. What's the right strategy here? Let's say the app is at /Users/app...