osx

What mark up language is there for Mac Os developers?

So Adobe gives GIVES US mxml FOR AIR ( Flash ) design/development (cross platform, ActionScript) Microsoft gives us XAML for .Net design/development (Windows, Silverlight, C# + VB+ F# +...) What mark up language gives us Apple for design/development of our Mac native apps?!? ...

How can I deny users to add/modify/remove printers to cups ?

Hi, I am using Mac OS X 10.6. I wrote a program which will add and remove printers to a CUPS server using libcups. It works, but now I am considering the security aspects. This program takes a user name and password to authenticate on the CUPS server. Whatever user name and password I use, it works as long as it is valid on the syst...

make AppleScript program that listens systemwide for shortcuts

I'd like to create some kind of background process that listens to all keystrokes event and acts consequently (for example does some action if CMD-A is pressed while in Finder.app, or more complex things, like sequences to create shortcuts like in emacs..) But how can I listen to keypresses systemwide on SnowLeopard? I thought of Apples...

How to actually build 64-bit Python on OS X 10.6.2

Why? I want to do this because installation of SciPy recommends it, and I thought it would be a good learning experience. This question has been asked before (e.g. here). The preferred answer seems to be to use MacPorts, but as I say, I'd like to understand how it's done. Anyway, I grab the source (Python-2.6.4.tgz) and unzip. I rea...

C#/Mac: Path.GetInvalidPathChars() and Path.GetInvalidFileNameChars() result

What does this display on OSX? Can anyone run this on their machines using Mono? foreach (char c in System.IO.Path.GetInvalidPathChars()) { Console.Write((byte)c); Console.Write(", "); } and what does this display: foreach (char c in System.IO.Path.GetInvalidFileNameChars()) { Console.Write((byte)c); Console.Write(", "); ...

When aiming to AOT compile a ruby script with MacRuby is there any restriction on the language?

I am looking into using MacRuby and am interested in it's ability to AOT compile ruby code down to an executable. I am wondering though whether this places a restriction on the code in any way? Is there a subset of ruby which is supported or can i go ahead and perform all the meta-magic i want and still have the code AOT compiled? ...

OS X: Generate core dump without bringing down the process?

I know how to generate a core dump on OS X when a process crashes, but what I really need to do is attach to a process, generate a core dump, then resume that process (without killing it). A long time ago (maybe a year and a half ago) I had C code that would do this... It used the OS X kernel libraries to connect to a process, read all...

Permissions error when connecting to EC2 via SSH on Mac OSx

I am new to EC2. I created my security credentials from this site: http://paulstamatiou.com/how-to-getting-started-with-amazon-ec2 It worked great, I rebooted and now when I try to connect I get a login/password prompt. (Which I never set up.) After several attempts I get this error: Permission denied (publickey,gssapi-with-mic). Wha...

Catching double click in Cocoa OSX

NSResponder seems to have no mouse double click event. Is there an easy way to catch a double click? ...

Core Data and threading

What are some of the obscure pitfalls of using Core Data and threads? I've read much of the documentation, and so far I've come across the following either in the docs or through painful experience: Use a new NSManagedObjectContext for each thread, but a single NSPersistentStoreCoordinator is enough for the whole app. Before sending an...

Thread-safe unique entity instance in Core Data

I have a Message entity that has a messageID property. I'd like to ensure that there's only ever one instance of a Message entity with a given messageID. In SQL, I'd just add a unique constraint to the messageID column, but I don't know how to do this with Core Data. I don't believe it can be done in the data model itself, so how do you ...

SSH Error: Permission denied (publickey,gssapi-with-mic).

When trying to connect to EC2 over SSH I get the following error: joshua-scotts-macbook-pro:.ec2 joshuascott$ ssh -v -i OFMoodle [email protected] OpenSSH_5.2p1, OpenSSL 0.9.8l 5 Nov 2009 debug1: Reading configuration data /etc/ssh_config debug1: Connecting to ec2-xxx-xxx-xxx-xx.compute-1.amazonaws.com [xxx...

The application cannot be opened because its executable is missing.

I have an application that I have been developing for some time now. Recently launching the application via a double click presents a dialog that says "You can't open the application RepoWatch because it may be damaged or incomplete." Launching the application via open ./RepoWatch.app gives me "The application cannot be opened because i...

creating a Mac OSX installer so the installed app won't set off the firewall

Right now I'm distributing a .app file to people in my organization. I drag it to /Applications by authenticating as root, but every time the users launch the program they get a firewall warning. (The app checks for updates on launch--very important for us). Since the users aren't admins they can't authenticate to make the messages go aw...

Advantages/disadvantages of using the built-in Apache for web development on Mac OS X

What are the advantages and disadvantages of using the built-in Apache for local web development on Mac OS X, specifically 10.6 Snow Leopard? Instead of using the built-in Apache, I know that options such as MAMP and XAMPP exist. However, for some reason I just haven't wrapped my head around the benefits or potential pitfalls with using...

Is there an easier way to type and compile C on Mac OS X?

I've just started learning C on Mac OS X. I have downloaded Xcode too. So far, I have been typing my apps into TextEdit, and then using the Terminal to locate my apps and compile them using gcc hello.c etc. Is there an easier way (using Xcode perhaps?) to type my code into some form of IDE, and then automate the compiling with a 'compi...

Is it possible to remotely debug linux code from a non-linux system?

I know it is possible to remotely debug code using gdb's server mode and I know it is possible to debug code that has been cross-compiled for another architecture, but is it possible to go a step further and remotely debug Linux applications from OS X using gdbserver? ...

What is the '245' in the IOKit USB libraries?

I'm getting started with IOKit on OS X, and I've been puzzled by the '245' tagged onto data types in the IOKit USB library, such as IOUSBInterfaceInterface245. What does the 245 mean? I'm just curious what this number tacked onto the end is supposed to indicate. It seems like a version number of something. Is there a generic version ...

Open a file directly to emacs (by double-clicking)

How would I go about setting all .rb files or all .py files to open in emacs if I double-click them; say, from the desktop? I'm on OS X 10.6.2. I have the script: on open of finderObjects repeat with currFile in finderObjects set unixPath to POSIX path of currFile set base to do shell script "dirname " & unixPath...

how do you build DTrace on Mac OS X?

I'm trying to build the dtrace target in the Xcode project using the advice here: http://osx86.boeaja.info/2009/10/building-xnu-kernel-on-snow-leopard/ But I get: libproc.m:24:49: error: CoreSymbolication/CoreSymbolication.h: No such file or directory I realize CoreSymbolication is a private framework, but Apple must make this header ...