osx

problem with dmg file

Hello, I have created a dmg file named try.dmg which contains an executable application myapplication.app together with a compiled library mylibrary.lib; I used Disk Utility in order to create the try.dmg file. I mounted the try.dmg file on my computer and I opened the application myapplication.app with no problems. Still, I tried to ...

Macports compile of MySQL++ failing.

Before running "sudo port install mysqlxx +universal", I installed the universal variant of mysql5. ... checking whether -lm is needed to use C math functions... no checking whether -lsocket is needed... no checking whether -lnsl is needed... no checking for MySQL library directory... /opt/local/lib/mysql5/mysql checking for MySQL i...

Getting the file name of files dropped on the script

...

Is there a way to add a menu shortcut for an application to select which Space is supposed to appear on?

I am looking for a more convenient way to manage assignment of applications to a particular Space without having to popup System Preferences all the time. Maybe there exists a contextual menu that allows me to do it, or a menu hack? I'ld even be open to use Applescript, but Spaces is not very well supported in Applescript, AFAIK. ...

What's the preferred Java editor for OS X

I currently use Textmate for most of my editing, but am taking a Java course and am wondering if there's a better editor out there, especially one that might have some form of intellisense or active debugging. ...

Creating a variable-speed slideshow based on USB input on OSX.

I have a friend who is trying to put together a geeky little contraption for a wedding, where people can view a slideshow. Neither of us use Macs, nor have programmed for one, but for various reasons it has to run on a Mac. There will be a USB ammeter hooked up to a bike dynamo. What we want is for a slideshow to be run, and advance at ...

Easiest way to get an NSDate representation of "the next 7am that will occur" in Cocoa?

I figure I can achieve what I want by using NSCalendar and NSDateComponents, but that would run something like the following: Get "now" Create an NSDateComponents from "now". If "now" is pre-7am, then use today's date. If "now" is post-7am, use tomorrow's date. If today is the last day of the month, increase month, set day to 1. If i...

Play .WAV under Mono on Mac OS X (Snow Leopard)?

The Mono 2.6 distribution contains System.Media.SoundPlayer, but attempts to play result in no sound (and no errors) on Mac OS X. All I can find with Google search is obscure references to ALSA. I posted to the Mono-OSX list, but there have been on replies there. I hope someone here has an answer. I think I need to tap into CoreAudio, bu...

How to create quick-entry dialog with system-wide shortcut?

I really like how Things gives us ability to capture todos without switching to the app. How to do this? I can't find any relevant code with google. Any ideas, urls or maybe code snippets? ...

Mac OS X linker error in Qt; CoreGraphics & CGWindowListCreate

Here is my .mm file #include "windowmanagerutils.h" #ifdef Q_OS_MAC #import </System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGWindow.h> QRect WindowManagerUtils::getWindowRect(WId windowId) { CFArrayRef windows = CGWindowListCreate(kCGWindowListOptionOnScreenOnly, kCGNullWindowID...

CFPreferences for another (or all) users

I'm working on a background service which needs to ask several users' iTunes settings (the users will opt-in via a helper application which they run from their login). Is there an easy way to read the preferences for another user, than the current one, using CFPreferences ? The docs, for example for CFPreferencesCopyValue, explicitly sta...

Selenium tests not building due to NUnit error (Mono+OS X)

I'm running Selenium RC on my Mac and driving my tests using NUnit in C#. My problem is that when I try and build a simple test in Mono I get the following error. Error CS0433: The imported type `NUnit.Framework.Assert' is defined multiple times (CS0433) (TestProject) When I comment out the Assert's it runs fine. The code I'm us...

Cocoa Core data: cannot save Created Items in NSTableview

Hello, I'm am a beginner in mac os x development and am trying to get started with all this. Here is my problem : I've create a non-document based cocoa app using core data as storage. I've added an entity and attributes to the xdatamodel. In IB i've created an NSArrayController and linked it properly. I've created an nstableview binde...

bash copy with variable

I'm trying to copy files to the current directory using a bash script. In order to handle paths that need escaping a variable is used that is escaped and then supplied to the cp command. The cp command is complaining with: usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file cp [-R [-H | -L | -P]] [-fi | -n]...

Manually create Airport Password

Here's one I haven't been able to find despite some Googling and playing around: I'm creating a disk image for a school to use on all their new laptops. It's not a fresh install. There are some customizations and software that's being installed (Volume License Office, for example). One of the requests that came in from the school was to...

Download an save an image file on HDD with Cocoa

I'm building a program, and I'm quite confident using Objective-C, but I don't know how to programmatically download a file from the web and copy it on the hard drive. I started with : NSString url = @"http://spiritofpolo.com/images/logo.png"; NSData* data = [NSData dataWithContentsOfURL:[NSURL URLWithString:url]]; But then I don't kn...

Detecting user-activity on mac os x

I use the function "IOPMSchedulePowerEvent" to schedule Sleep or Wake-Events and registered my daemon with "IORegisterForSystemPower" to receive power-state-changes. Everything works fine! When system going sleep and later waking up at scheduled time, my daemon do some work, and after it system should going sleep again. Now my question...

fixed width bash prompt

I'd like to set my bash prompt to a fixed width, and make up the difference in space before the $, so whether long or short, my prompt remains the same width: [name@host] ~/Directory/Dir...Another/LastDir $ [name@host] ~/Directory(branch) $ Currently, in a short directory path my prompt looks something like this: [nam...

what does macosx-version-min imply?

When I pass compiler flag "-mmacosx-version-min=10.5", what does it mean? I think it implies the result binary is x86, not ppc, but is it 32 bits or 64 bits? I'm compiling on snow leopard, so default output binary is 64 bits. I'm not passing -universal, it's not 32bit-64bit universal binary, I think. ...

What is the equivalent to "UIImageView" on OSX?

I'm wondering how to get some nice sprite-animations on OSX - like the UIImageView provides for the iPhoneOS. NSImageView cant... but how can I solve this? ...