mac

Fish Interactive Shell full path

Is there a way in the Fish Interactive shell for the full path to be displayed. Currently when I navigate to a directory I get the following shell. millermj@Dodore ~/o/workspace but I would rather see millermj@Dodore ~/o-town/workspace ...

Offsite backup from a timemachine capsule

How can I create a (secondary) backup to a offsite location of a timemachine backup residing on a apple timecapsule? Possible destinations are Amazon S3, Mosso Cloud Files, Generic SSH/SCP servers, ... ...

Javascript behaving differently on Mac and PC? I know it shouldn't...

I've created a pagination script that takes a long block of text and breaks it into pages. First the text is loaded into a div with the id #page. Then the script measures the height of #page and calculates how many pages it should be broken into to fit into the div with class .detailsholder. The div .detailsholder is cleared out, and th...

Create drag-drop graphic when installing OS X application from dmg

A lot of applications on the mac show a little graphic when the installer DMG is initially opened - the graphic basically allows you to drag and drop the app in that window without having to do it in finder (I'm not talking about package manager here). Any idea if there's a standard way to create that type of experience? ...

Add background image/color to DMG using hdiutil or other tool?

It seems like using Finder UX or some sort of UI tool (http://stackoverflow.com/questions/871199/create-drag-drop-graphic-when-installing-os-x-application-from-dmg) the only way to customize how a DMG looks when opened up. That doesn't scale too well and isn't automatable enough. Anyone know of way to achieve the same thing but using to...

Code sample for capturing audio from a Mac in Cocoa and saving to file?

I'm due to work on a small application that captures audio from the Mac's Audio Queue and needs to save it to disk in some reasonable audio format. Does anyone have a some decent sample code (Cocoa / Objective-C) that they can share? I specifically need to capture the audio that is being passed to the Built-in Output device in order ...

Smartphone for use with the NXT

Greetings. I will be getting a new smartphone for work. It needs to work with Telus, so the iPhone, and Android-based phones are out. The available phones appear to be include a number of BlackBerries, HTC phones, Motorola phones, as well as LG, Samsung, and ZTE phones. I have a LEGO Mindstorms NXT robot, and would like a phone for w...

Core animation code structure/conventions

In learning Core Animation, I learned very quickly that if you don't do it right, you get really weird undefined behavior. To that end, I have a few questions that will help me conceptually understand it better. My NSView subclass declares the following in it's init. This view is a subview of normal layer backed view. [self setLayer:[...

Cocoa why do I have to retain and release a function parameter?

I'm working through Aaron Hillegass' book, specifically the lottery example. I had a question about the -setEntryDate: method; why do I have to retain date? The program still works without retaining it. -(void)setEntryDate:(NSCalendarDate *)date { [date retain]; [entryDate release]; entryDate = date; } But this still work...

How do I get the Mac OS X 'quick look' feature to be more programmer-friendly?

There are numerous text files that are always included in common downloads such as rails plugins: LICENSE, ChangeLog, Rakefile, etc. I know these files are plain-text, but Mac OS X refuses to acknowledge this automatically. If I hit the spacebar in Finder to activate "quick look", the icon becomes huge but the contents of the file are n...

Mac OS X: Sharing Folders via Terminal

Is there a command line utility for creating network shares, using the Apple Filing Protocol (afp://)? ...

scrollbars in plugin code

I'm working on a plugin for Firefox on a mac. our plugin has it's own scrollbar. How does the event stucture differ for controlling a scrollbar within a plugin, vs in a normal application? Symptoms: code works fine in a stand alone application. Mouse wheel works fine in both cases. In plugin, the scrolling isn't live, and often won't a...

Moving a MAC font to a PC - How?

This has been a rather problematic issue on numerous occasions. We have alot of our designers using Macs for design and the fonts based on there but when we need to see designs on a PC the fonts are not there. I was wondering if anyone knows a rather efficient and painless method of moving/copying a font from MAC OS X to PC (Windows). ...

why would shorthand PHP opening statements not be working?

I am trying to get my Mac setup as a php server, however, as successful as I have been so far, I seem to have run into a bit of bother. My PHP opening statments are not working... but only the shorthand ones. This works: <?php phpinfo(); ?> This doesn't: <? phpinfo(); ?> It's Mac 10.5. Hope that someone can help. Thanks ...

Is it bad practice to use unicode symbols or shapes in a  app?

There have been a few times where I've used unicode symbols in place of small icons in one of my Cocoa apps, either because it's easier to draw inline with text or because I didn't feel like firing up Photoshop to draw a simple arrow. I've wondered though, could there be issues with localization or fonts I might not be aware of? Are ther...

Apple Event Handler Failure (Python/AppScript)

I have written the following really simple python script to change the desktop wallpaper on my mac (based on this thread): from appscript import app, mactypes import sys fileName = sys.argv[1:] app('Finder').desktop_picture.set(mactypes.File(fileName)) However when I run it I get the following output: Traceback (most recent cal...

Using command as ctrl in a Mac OS X terminal

I'd like to have my command key work as a ctrl key in the Mac OS X terminal. That is, I want "command-c" to do the same thing as "ctrl-c". Does anyone know of a way to do this? Specifically, I would really like this to work in emacs. Emacs uses a LOT of ctrl key bindings and reaching for the control key is beginning to strain my wr...

How to get the Mac OS X system version?

I want to get the OS X system version, such as: 10.5.4, 10.4.8, etc. I want to get it in my app, how do I do this? Thanks! ...

MacGDBp, but better?

For debugging php code I use MacGDBp but it has its quirks: it shows only the top frame variables of the stack, it sometimes refuses to display any variable at all and last version has decorates the source text with non ascii characters. Is there any alternative that is native OS X? (ie. not Eclipse, I can't stand it). ...

Whats the best way to manage code snippets on Xcode?

I have fallen in love with visual studio's code snippets toolkit. Is there anything similar on Xcode? ...