Monday, December 14, 2009

OS X "Dirty Dot"

To use the OS X "Dirty Dot" to indicate that changes have been made that need to be saved you can use the code snippets below.

To set this "Dirty Dot" use the following code:
myJFrame.getRootPane().putClientProperty("windowModified", Boolean.TRUE);

Use the following line to clear the dot after a save has occurred:
myJFrame.getRootPane().putClientProperty("windowModified", Boolean.FALSE);

Java library search order OS X

Per the Apple documentation, the Java library search order is as follows:
  1. User's home directory (~/Library/Java/Extensions/)
  2. Local domain (/Library/Java/Extensions/)
  3. Network domain (/Network/Library/Java/Extensions/)
  4. System domain (/System/Library/Java/Extensions/)
  5. $JAVA_HOME/lib/ext

You'll note that the user's home directory takes precedence over the other locations; this helps a developer working on a system to easily share a machine with other users and avoid classpath difficulties.

How do I change the default __MyCompanyName__ in Xcode?

Add the following information to the com.apple.Xcode.plist file using Property List Editor:
PBXCustomTemplateMacroDefinitions - Dictionary
ORGANIZATIONNAME String MyNewCompanyName

Popular Posts