mac

When declaring objects in Cocoa, should I set them to nil?

Say I want to create an instance of NSString, which is initialized to a certain value depending on the value of another variable. Normally, I would do NSString *string; if(foo == 1) string = @"Foo is one."; else string = @"Foo is not one."; However, in some sample code that I've seen, I've seen people do NSString *string = ni...

Emacs 23 on OS X - use multiple instances or emacsclient?

Hi all, I wonder if anyone has any recommendations as to setup of emacs 23 on OS X. I have been using Linux/Windows for a while and there, I would just open many instances of emacs and they were self-contained - for instance, I could have two separate files in separate frames, each with their own R, Python, and/or shell running. I think ...

Does Mac X11 have the XTEST extension?

So I moved some X programs down to the mac, and I'm getting Error: XTEST extension unavailable on '(null)'. from xdotool. Does OS X X11 come with XTEST? If not, is there a way to add it? ...

Bluescreen of death during Java development on a Leopard - any ideas how to solve this?

I develop using Java 5 and 6 on Intellij IDEA 7 and 9M1. From time to time (during run/compile) my Mac (10.5.7) will die with a Bluescreen of death. Has anybody else had this issue and somehow managed to solve it? If so, how? Any suggestions other than running the IDE in a VM? ...

Access audio from any application on Mac OS X

I want to access the audio from any application in Mac OS X, just like AirFoil does. But I can't understand how to do it... AirFoil requires a restart of the application. This might be a clue to how it does it... What is it that require the app to restart? Is it to hijick it, or to gain rights in some way to communicate with the app? I'...

Trouble debugging C++ using Eclipse Galileo on Mac

I am trying to debug c++ code using Eclipse Galileo on my MacBook Pro running Leopard. It's my first time trying this. I have a complicated c++ program I'd like to debug, but to test things out, I just tried to debug and step through the following: #include <iostream> using namespace std; int main() { int x = 0; cout << x << endl; ...

Detecting multitouch iPhone-like "tap" on MacBookPro

After a period of iPhone work, I'm once again working on normal Cocoa apps on my MBP and I miss the "tap" gesture. I know that I can turn on the incredibly annoying "Tap to Click", feature in the Trackpad control pannel, but I don't want a click, I want a tap. I know it's probably not mac canon, but is it possible to receive this multi-...

Moonlight on PowerPC Mac

Silverlight stopped supporting PowerPC Macs after version 1.0. Will Moonlight 2.0 work on a PowerPC Mac? We are looking at writing the next generation of our product and we are considering Silverlight. However due to our existing customer base, we could not afford to cut off PowerPC Mac users at this time, and we'd like to avoid parall...

Where is cocoa-sharp in Mono

I downloaded and installed Mono 2.4.2.3 Framework for the Mac OS. The docs say that the download includes the Cocoa Sharp framework binary. But I don't see it anywhere. Does anyone know where it is? ...

Porting a Python app that uses Psyco to Mac

I'm trying to port my Python app from Windows to Mac. My app uses Psyco. How exactly do I install Psyco on Mac? Keep in mind I'm a Mac newbie. ...

Upload Folder via Mac Terminal

How can I upload an entire folder via FTP Mac Terminal? ...

Two executables in one bundle on MAC

Hi, Is it possible to have two executables each with its own plist to share the same bundle. Then depends on the way app is executed (parameters) to load the appropriate executable. Imagine the case where we have a main application (executable with UI) and the mini application (shorter version of the main app also with its own UI) and ...

Initialize a class only once

I have a class that contains a few instance methods which need to be called from another class. I know how to do that - TimeFormatter *myTimeFormatter = [[TimeFormatter alloc] init]; [myTimeFormatter formatTime:time]; However, I don't want to have to alloc and init TimeFormatter every time I need to call one of its methods. (I need t...

why is screen not showing the current running process name? (Mac OSX Terminal bash)

I am running screen inside Mac OSX Terminal app (bash). Here is the screenrc (got it from here): $ cat ~/.screenrc termcapinfo xterm* ti@:te@ startup_message off defutf8 on shelltitle "$ |what?" # make screen assign window titles automatically hardstatus alwayslastline hardstatus string '%{= kw} [ %{= kb}%H%{= kw} ][%= %{= kw}%?%-Lw?...

How to Open Terminal Window Automatically on Mac OS X

On my Mac, there is no window open when I start Terminal app. I just played with a friend's Mac, a window is automatically opened on startup of terminal. He doesn't know how it's done. I just played with preferences and couldn't find anything for that. Does anyone know how to do that? ...

How to make zsh run as a login shell on Mac OS X (in iTerm)?

When zsh is set as a login shell on Mac OS X, when it is started by iTerm, zsh doesn't consider that it's being run as a login shell, although it's started as ‘-zsh’ (‘-’ is put as the first character of arg[0]) which is supposed to mean that it should start as a login shell. So, when I set the login shell to bash, bash recognizes this ...

Best equivalent VisualStudio IDE for Mac to program .NET/C#

I'm using my Mac most time at work. At home there's my Windows Computer, where I program with Visual Studio my .NET/C# stuff. Because I want to program outside, it would be great to have an equivalent IDE for my Mac. Which software are the best solution in my case to have a similar workplace with the same functionality? I prefer OpenS...

What are my iPhone SDK Development Setup Options?

I am interested in doing some iPhone development. According to Apple, the SDK hardware requirements are an Intel based Mac, running OSX 10.5.7+. 1) Is it possible to reliably run the SDK on non Mac hardware? On some sort of hackintosh setup? 2) If I am running on Apple hardware such as a Mini, is it possible to remote desktop into th...

How can I configure Apache to run Perl CGI scripts?

I want to configure Apache web server to run CGI scripts on Mac OS x 10.5. I have already started Apache Web Server on Mac. What are the steps to make the Apache run the Perl scripts? ...

Acessing Mac applications from Ruby or PHP or Cocoa

I would like to access a couple of different Mac OS X applications from preferably Ruby, but I would settle for PHP. The applications are Elgato's turbo.264 and Apple's iTunes. Both have Applescript Libraries defined that would allow me to do what I want to do from Applescript, but I don't want to do this in Applescript. If I can't do th...