mac

Problem with unicode String literal in unit test

I have a JUnit test that tests adding Strings to a Dictionary custom type. Everything works fine for everyone else on a Linux/Windows machine, however, being the first dev in my shop on a mac, this unit test fails for me. The offending lines are where unicode string literals are used: dict.add( "Su字/会意pin", "Su字/会意pin" ); dict...

Is it safe to manipulate objects that I created outside my thread if I don't explicitly access them on the thread which created them?

I am working on a cocoa software and in order to keep the GUI responsive during a massive data import (Core Data) I need to run the import outside the main thread. Is it safe to access those objects even if I created them in the main thread without using locks if I don't explicitly access those objects while the thread is running. ...

Dynamically hiding columns in a NSTableView

I want to dynamically hide/show some of the columns in a NSTableView, based on the data that is going to be displayed - basically, if a column is empty I'd like the column to be hidden. I'm currently populating the table with a controller class as the delegate for the table. Any ideas? I see that I can set the column hidden in Interface...

In Applescript, how can I find out if a menu item is selected/focused?

I have a script for OS X 10.5 that focuses the Search box in the Help menu of any application. I have it on a key combination and, much like Spotlight, I want it to toggle when I run the script. So, I want to detect if the search box is already focused for typing, and if so, type Esc instead of clicking the Help menu. Here is the scri...

In Applescript, how can I get to the Help menu Search field, like Spotlight?

In OS X, in order to quickly get at menu items from the keyboard, I want to be able to type a key combination, have it run a script, and have the script focus the Search field in the Help menu. It should work just like the key combination for Spotlight, so if I run it again, it should dismiss the menu. I can run the script with Quicksi...

How do you configure the Apache server which ships Mac OS X?

Mac OS X ships with apache pre-installed, but the files are in non-standard locations. This question is a place to collect information about where configuration files live, and how to tweak the apache installation to do things like serve php pages. ...

Best Budget SOA Web Application Platform For Mac + Linux + Windows?

I am a Windows guy with an ASP.NET background but I have a hosted Linux server (dedicated) on the Internet, and meanwhile I'm spending more and more time on my Mac. I want to start doing web app and web service (iPhone-to-Internet services) development on the Mac, as well as some server development on my Windows laptop, and then deploy o...

Creating cursor rsrc files on Mac from png

Hi, I want to create cursor rsrc files on the Mac from png files. The application that uses the cursors requires it to be in a .rsrc format and I cannot change that. Does anybody know of any way I can create the cursor .rsrc files from png images. Thanks jbsp72 ...

What facets have I missed for creating a 3 person guerilla dev team?

Sorry for the Windows developers out there, this solution is for Macs only. This set of applications accounts for: Usability Testing, Screen Capture (Video and Still), Version Control, Task Lists, Bug Tracking, a Developer IDE, a Web Server, A Blog, Shared Doc Editing on the Web, Team and individual Chat, Email, Databases and Continuous...

Is it possible to connect to Mac OS X 10.5 Leopard's built in vnc server at a low color depth from Windows?

If I attempt to connect to Mac OS X 10.5 Leopard's built in vnc server at a low color depth from Windows, the client bombs after connecting. It only works when I set it to the highest color depth. I've tried with at least 3 windows VNC clients. Any ideas? There some setting I can set in Mac OS X? It takes about 20 seconds to repaint the...

Better terminal in Mac OS X -- reversing the control and command key-mappings

I'm trying to have the same KDE Konsole experience within Mac OS X. Here's my (overly complicated?) setup: I have Control and Command swapped at the System Preferences level. (Can't live without this) Parallels lets you, at the Parallels application level, also reverse Control and Command. So I can undo the System Preferences settin...

Which IDE is the best to get started for developin Java ME application on Mac OS X?

I would like to develop micro java (j2me) application on Mac OS X. A lot of IDE are available on PC from Nokia, Samsung and Sun (Netbeans + mobility), but they do not exist for Mac OS X. ...

CGPathAddArc vs CGPathAddArcToPoint

Apple's CoreGraphics library defines two functions for describing an arc. CGPathAddArc adds an arc based on a center point, radius, and pair of angles. CGPathAddArcToPoint adds an arc based on a radius and a pair of tangent lines. The details are explained in the CGPath API reference. Why two functions? Simple convenience? Is one ...

Xcode: Using a custom framework

The error I'm getting: in /Users/robert/Documents/funWithFrameworks/build/Debug-iphonesimulator/funWithFrameworks.framework/funWithFrameworks, can't link with a main executable Cliff notes: trying to include framework doesn't want to link More detail: I'm developing for a mobile device... hint, hint using Xcode and I'm trying to m...

What is the best way to log out another user from their session on Mac OS X Leopard?

In other words: Log on as Bert (who is an administrator) Using fast user switching, log on as Ernie (Bert remains logged on) Switch back to Bert Bert logs Ernie off What is the best way to achieve step 4? ...

React on global hotkey in a Java program on Windows/Linux/Mac?

A Java6 application sits in the system tray. It needs to be activated using a hotkey (e.g. Super-G or Ctrl-Shift-L etc) and do something (e.g. showing an input box). How do I do that on: Windows (XP or Vista) OS/X Linux (Gnome or KDE) ...

What was the name of the Mac (68000) assembler?

I'm sure there were several, but the one I was thinking of would display a nice text screen when you crashed the computer thoroughly. The Text was "Well smoke me a kipper." ...

PHP debugging on OS X - hopeless?

I have tried: Xdebug and Eclipse. Eclipse launches a web browser, but the browser tries to access a non-existent file in Eclipse's .app bundle. Xdebug and NetBeans. It does a little bit better; a browser opens a page in /tmp which says "Launching. Please wait…" but nothing happens beyond that. Xdebug and debugclient, the CLI tool which...

What is the Bash command to create a hardlink to a directory in OS X?

How do you create a hardlink (as opposed to a symlink or a Mac OS alias) in OS X that points to a directory? I already know the command "ln target destination" but that only works when the target is a file. I know that Mac OS, unlike other Unix environments, does allow hardlinking to folders (this is used for Time Machine, for example) b...

Mac OS X Terminal: Move cursor word by word

Is there any way in the OS X Terminal to move the cursor word by word? I knwo the combination CTRL+A to jump to the beginning of the current command, and CTRL+E to jump to the end. But is there any way to jump word by word, like ALT+Left/Right in Cocoa applications does? Thanks in advance, Arne ...