osx

NSTableView - NSButtonCell Data Source type?

I've got a table with checkbox-style cells, and I can't figure out how to get these buttons to take on the titles that they're supposed to. Should the data source be an array of strings? An array of dictionaries (string/boolean)? An array of NSButtonCells? None of these seem to work =/ ...

What are the factors to decide between using Core Data versus rolling out a custom model?

There might be applications that are not suited for Core Data - image manipulation programs like Photoshop or Gimp for example. But for applications that are suited for Core Data, say Address Book or iCal, what is the criteria to choose Core Data over a custom model? ...

Develop app to run natively or go cross platform?

What's your opinion on whether one should write an application for a specific platform or use a cross platform approach and reach more potential clients? It would be a GUI based application and I'm thinking of using Java. Most of the applications that I've used built on Java don't run as smooth as the native applications on the respect...

DHCP Setting in Mac OS X

Are there any command line interfaces to the DHCP settings in Mac OS X? I have found that inside System Profiler, the Network tab provides a lot of useful information, but I have not found any documentation about any command line equivalents. ...

How do I open a Finder sidebar folder via AppleScript?

I have a bash script which will be run on a Mac via ssh. The script requires a particular network drive to already be mounted. On the Mac, I mount this drive by opening a folder "JPLemme" on that drive in Finder. This mounts the drive until the Mac goes to sleep at night. Obviously, Finder isn't available via ssh, so I want to create an...

Word 2008 macro to SVN ADD current document

I want to invoke "svn add" on the current Word 2008 document. I've got a shell script that'll svn commit it later. I don't want that shell script to indiscriminately svn add files so I'd like to be able to do it from a button in Word 2008 tied a macro or appleScript. ...

Mounting a folder as a device in Finder using Cocoa

Is there a way to mount a folder on the hard disk as a device in Finder. The intend here is to provide the user with an easy way to get to a folder that my application uses to store data. I don't want my user to go searching for data in Application Data. I would rather allow them to make this data available as a mounted volume or device ...

Putting a value on the load of a windows system

I've written an image processing script in php which is run as a cron scheduled task (in OSX). To avoid overloading the system, the script checks the system load (using 'uptime') and only runs when load is below a predefined threshold. I've now ported this over to Windows (2003 Server) and am looking for a similar command line function ...

mount a windows smb share on OS X as so it can be accessed by 'www' user

trying to mount an smb share on OS X so that the 'www' user can read files from there. the SMB share is accessible via an Active Directory account. I can mount the share through the Finder (cmd-k ...) my basic approach is # 1) create mountpoint sudo mkdir /Volumes/www_mdisk # 2) permissions for mountpoint sudo chown www:www /Volumes...

Should +initialize/+load always start with an: if (self == [MyClass class]) guard?

When implementing an +initialize or +load method in one of your Objective-C classes, should you always start with this kind of guard?: @implementation MyClass + (void)initialize { if (self == [MyClass class]) { ... } } ... @end Seems like code in +load and +initialize usually only wants to be executed once. So this w...

NSApplication delegate and Preference Panes

It seems that I can't control the NSApp delegate from within a System Preferences pane, which is understandable. Is there any other way I can have my object notified when the program becomes active? ...

JInternalFrame Does Not Fully Maximize Under Mac OS X

I'm working with JInternalFrame's under Mac OS X Java 5 and when maximizing a JInternalFrame within a JDesktopPane the window doesn't fully maximize, but the property to allow maximizing is definitely set to true. This is the result I'm getting when maximized: Seeing as though the image previews didn't work. I've got no idea why it's ...

Why is the Python readline module not available on OS X?

The documentation of the Python readline module says "Availability: Unix". However, it doesn't appear to be available on OS X, although other modules marked as Unix are available. Here is what I'm using: $ uname -a Darwin greg.local 8.11.1 Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386 i38...

PPC breakpoints

How is a breakpoint implemented on PPC (On OS X, to be specific)? For example, on x86 it's typically done with the INT 3 instruction (0xCC) -- is there an instruction comparable to this for ppc? Or is there some other way they're set/implemented? ...

Mac OS X Terminal: Map option+delete to "backward delete word"

Tried to map it from Preferences -> Settings -> Keyboard, but the "key" combo box has only "forward delete" but no "delete". My keyboard on the other hand has only "delete" and no "forward delete"! Is there some other way to do it except from the preferences? ...

NSTableView -setDataSource not working when triggered by FSEvents

So here's what I've got: An NSTableView with an NSMutableArray data source FSEvents monitoring a folder that contains the file that contains the data for the table view (Using SCEvents for Objective-C abstraction goodness) The FSEvents triggers the same function that a reload button in the UI does. This function refreshes the table vi...

running ocaml on Mac OS X gives bus error

I've just installed Ocaml on Mac OS X, and when I run the ocaml program I get a "Bus Error" with no other clues to what might be going on. Can anyone offer suggestions on where to go from here? EDIT: I installed via the package: http://caml.inria.fr/pub/distrib/ocaml-3.10/ocaml-3.10.2-ppc.dmg (I have an iBook G4, so PPC is approp...

What are my options for running Java 6 on OS X?

What are my options for running Java 6 on OS X? I have an MacBook Pro Intel Core Duo running Mac OS X 10.4. Do I have any options for running Java 6 on this hardware and OS? Related questions: Which Macs (either current or forthcoming) support 64-bit computing? Are there any Apple laptops (either current or forthcoming) that will have...

Fixing broken Macports

I just tried (for the first time, I might add) a port upgrade installed in Macports, and I'm afraid I might come to regret it: A lot of errors -- specially regarding X11 and Python. Here's a typical error message regarding python: ---> Activating python24 2.4.5_4+darwin_9 Error: Activating python24 2.4.5_4 failed: Image...

Apache2 won't start - Mac OS X - Passenger

I've installed passenger a little while back and when I restarted my mac tonight, Apache2 won't start. Here is what I get. Anyone have any ideas? Re-install Apache2? dyld: Library not loaded: /usr/lib/libaprutil-1.0.dylib Referenced from: /usr/sbin/httpd Reason: no suitable image found. Did find: /usr/lib/libaprutil-1.0.dyli...