mac

What is a good C++ editor for Mac OS X?

I am a first year Comp. Sci. student and am looking for the best way to develop C++ on a Mac. I have Xcode and Textmate. What are the benefits/negatives of each? Are there any better ones? Do you have any tips? I am not a fan of having to use a project to run programs with Xcode. Is this the only way to do it, or am I mistaken? ...

Launch an app on OS X with command line

I want to launch an app on OSX from a script. I need pass it command line arguments. Unfortunately, 'open' doesn't accept command line args. The only option I can think of is to use 'nohup myApp > /dev/null &' to launch my app so it can exist independently of the script that launches it. Any better suggestions? ...

Launch a child process on OSX/Unix that doesn't inherit files/ports

I want to launch a child process on OS X such that the child process does not inherit the current process's open files/ports. Any suggestions on how to accomplish this? Shell commands that I can invoke using the system() function would work too - I just don't know of a good shell command that enables this. Thanks! ...

Avoiding AppleScript through Ruby: rb-appscript or rubyosa?

Hello fellow Mac rubyists and AppleScript haters, For those of you that have experience with both rubyosa and rb-appscript, I'd like the hear the pros and cons of each, which one you decided to stick with, and which one you'd recommend for a totally non-AppleScript savvy ruby old-timer. Also, are there any other options that I have miss...

How to open Flash file from USB automatically on Win/Mac

I need to have a flash file be opened and viewed from a USB automatically on both Win and Mac. I read about various solutions depending on the format of the flash output: autorun.inf if Flash published as exe(Win)/app(Mac)) which seems to be working only on Win; html embedding if Flash is published as swf, but this turns into a proble...

Django - Mac OSX Workflow - Questions on efficient development methodologies

Hi All, I am going to outline my workflow and I would like some suggestions on how to improve the efficiency of this. It seems right now a bit cumbersome and repetitive (something I hate), so I am looking for some improvements. Keep in mind I'm still new to django and how it works but I'm a pretty fluent coder (IMHO). So here goes......

web development application - mac

Hello Does anyone know of an application (for mac) which will format a page of html code nicely? ie Open the html file and indent all of the code/blocks, put character returns in and format it into sections so that it is readable rather than being just a big block of code. Then also give the ability to minimize/collapse sections of the...

Learning AppleScript

What resources would you recommend to pick up AppleScript. I come with a traditional C/C++ with Objective-C background. I am also looking for tips on how to develop better and get faster documentation from the script editor. A sample tip would be 'lookup the sdef file of the app you want to script. ...

What is applescript and what is it used for?

What is applescript and what is it used for? ...

I can't run more than 100 processes

I have a massive number of shell commands being executed with root/admin priveleges through Authorization Services' "AuthorizationExecuteWithPrivileges" call. The issue is that after a while (10-15 seconds, maybe 100 shell commands) the program stops responding with this error in the debugger: couldn't fork: errno 35 And then while the...

Receiving power notifications (especially shutdown) on Mac OSX

I'm writing an application in C for the Mac (Leopard) that needs to do some work on receipt of power notifications, e.g. sleep, wake-up, shutdown, restart. It runs via launchd as a launchagent on login then begins monitoring for notifications. The code I'm using to do this is as follows: /* ask for power notifications */ static void Sta...

Default permissions of /dev on Mac OS X 10.5.*

Hi There, Simple question. After a little bit of 'chmod' shenanigans, I have set the permissions for all pseudo ttys in /dev to a+rw which is somewhat open. Now that I have fixed the problem that I had, I want to revert my permissions back to the correct value. Therefore, what are the correct permissions. Executing: sudo ls -la /dev/tt...

What is the Cocoa equivalent of UpdateSystemActivity?

I'm converting a Carbon app to a Cocoa app and I can't find the Cocoa equivalent for: UpdateSystemActivity(UsrActivity); Any Mac people out there care to point me in the right direction? Thanks. UPDATE: I'm building 64bit. Building 32bit works fine, but I get symbol not declared in this scope errors for UpdateSystemActivity (and ot...

Mac OS X Tiger vs Leopard usage pervasiveness - any study?

I need to decide whether I should support Mac OS X 10.4 / Tiger, and the decision likely hinges on what percentage of mac users are still running Tiger. I didn't find anything too reliable on the interwebs nor on Apple's developer website. Let's ignore the impending Snow Leopard release and it's impact on Mac OS version usage distributio...

Detect OS X version 10.4 and below on server

Based on this it looks like it's hard to get OS version detection absolutely correct. However, I'm looking for something half-decent which warns users of OS X Tiger and below about possible compat issues with my product. The heuristic I can think of is first detecting whether the OS is a Mac (relatively simple) and then matching the use...

XAMPP for Mac cannot see PHP files

Hi, I am unable to see php files after I downloaded XAMPP. I am trying to write a php file, so I download and started XAMPP, but I cannot see PHP files show up. When I open anything as simple as: <?php echo "Hello World"; ?> Just shows up a blank firefox window. Can anyone please help, this is urgent! Thanks ...

Where can I systematically study how to write Mac OS X device drivers?

I'm looking for an exhaustive, university-level book or guide to study in order to gain the ability of writing Mac OS X device drivers. I'm totally ignorant on this OS, but I'm already skilled on Linux. Is there any Mac OS X counterpart for book "Linux Device Drivers"? The best guide should introduce OS internals too, makes clear kern...

Enabling italics in vim syntax highlighting for mac terminal

I'd like to have vim display my comments in italics, and I understand I need to place cterm=italic in the hi Comment line in the color.vim file I'm using. This, however, is having no effect on the text display, which I suspect has to do with some Terminal.app setting, unless I'm misunderstanding the vim syntax. I'd appreciate if some...

Change GCC version used by bjam

I am trying to build a library (luabind) with bjam. I came across an error and it seems like the problem is that I need to compile with gcc 4.2, but the default on this computer (Mac OSX) is 4.0. I would prefer not to go around changing links in system directories, is there a way to specify to bjam to use gcc4.2 rather than just gcc? ...

Shell Script that goes up N folders in the file system

Hey there, I just found this very usefull shell script here on SO but unfortunately it's not working on Mac OS X 10.5. This is the script in question(copied it for convenience): #!/bin/bash LIMIT=$1 P=$PWD for ((i=1; i <= LIMIT; i++)) do P=$P/.. done cd $P I tried to echo $P at the very end and it's returning the right path, but...