osx

Setting Java 1.6 as the default on Mac OS X 10.5.8

How can I set Java 1.6 to be the default for my MacBook Pro Intel Core 2 Duo with OS X 10.5.8? I have installed the latest software update, and dragged the Java SE 6 64-bit choice to the top in the "Java Preferences" application (and even rebooted), but still, on the command line, java -version responds with: java version "1.5.0_24" Jav...

App Engine SDK Console Not Fully Updated on OSX for GAE Release 1.3.4

I downloaded and am running the latest SDK (in About GoogleAppleEngineLauncher, I see it is version 1.3.4.794), but when I open the SDK Console and go to the Task Queue section, I still see "Tasks will not run automatically. Select a queue to run tasks manually." I have not added the flag --disable_task_running, so I'm confused as to why...

MySQL Query still executing after a day..?

I'm trying to isolate duplicates in a 500MB database and have tried two ways to do it. One creating a new table and grouping: CREATE TABLE test_table as SELECT * FROM items WHERE 1 GROUP BY title; But it's been running for an hour and in MySQL Admin it says the status is Locked. The other way I tried was to delete duplicates with thi...

Determing if an NSOpenGLView has a valid context (Cocoa OSX)

I am trying to check that my NSOpenGLView has a valid context but it seems that a call to openGLContext will not help me figure this out. openGLContext seems to always returns a an NsOpenGlContext (it returns the current context if the view has one and if not it makes a context and returns that). Is there another method I could use ins...

Cocoa app not launching on build & go but launching manually

I have quite the interesting problem. Yesterday my program worked perfectly, but now today I'm getting exc_bad_access when I hit build and go, but if I launch the app from the build folder it launches perfectly and there seems to be nothing wrong. The last bunch of lines from the debugger are: #0 0xffff07c2 in __memcpy #1 0x969f7961...

How can I get the domain name for a user logged into a Mac via Active Directory

In my Cocoa app how can I get the current user's domain when they're logged in via Active Directory? I need to determine two things: If the current user is logged on to an Active Directory domain (only need to handle Active Directory). If 1, the domain of the user. I've found references to Directory Services and the Open Directory P...

Ruby, Rails & MySQL parity between Mac Client (10.6) & XServe (10.5)

We're setting up RoR with Development on Mac OS X Client (10.6.3) and then using a Mac OS X Server (10.5.8) for testing and eventually deployment. I'd like to get as many systems in sync on these machines as possible. Wondering if there are any pitfalls. I mostly understand what's necessary under Client but Server has some hard-wired st...

TFS build monitor on Mac

I'm planning to create TFS build monitor for Mac on my spare time, are there any TFS libraries available for objective-c or I should use TFS web-services to fetch the information? ...

MacPorts - Installing Port, Dependencies Failed

I am attempting to install xulrunner on OSX 10.6.3 using the following: sudo port install xulrunner However, I am receiving the following error: nat-10-200-136-126:phoneyc-new $ sudo port install xulrunner ---> Computing dependencies for xulrunner ---> Activating zlib @1.2.5_0 Error: The following dependencies failed to build: gcon...

Can a file opened in java be locked across an afp mount?

I'm trying to get a file lock across a mount point via Java 6 on OSX: private void tryLockThroughShare() { String path = "/Volumes/Groups/mcm/javaTestInShare.txt"; try { RandomAccessFile raf = new RandomAccessFile(path, "rw"); FileLock flock = raf.getChannel().tryLock(); System.out.printf("File %s is %s\...

Why does OS X java always report 1.6?

Anyone run into this? I realize that 1.6 is the default on OS X, but I'm trying to compile/run a program on the command-line using 1.5. However, no matter what I try, it reports 1.6. /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/bin/java -version java version "1.6.0_20" Java(TM) SE Runtime Environment (build 1.6.0_20-b...

Combining 2 png in one with convert

Hello, I am using convert from ImageMagick to combine 2 png in one using this script : convert background.png logo.png -layers merge final_background.png It is working but I would like to move the logo at 20 pixels from the top, is it possible ? Thanks a lot Thierry ...

Why is Mac OSX less susceptible to viruses?

I keep hearing from people that Macs don't get viruses. Is this true? If so, is it because OSX is programmed in a more secure way? What makes it less prone? ...

Changing icon of package created by package maker

I have created package (.pkg) file using packagemaker ver 3.0.4. Is it possible to provide custom icon to the .pkg file. Can some one help me how this can be done ? Thanks in advance. ...

Workaround for JFormattedTextField delete bug in Java for Mac OS X 10.6 Update 2 (1.6.0_20)

There is apparently a bug introduced in the latest Java update for Mac OS X, which causes deletes in JFormattedTextFields to be performed twice. See http://lists.apple.com/archives/java-dev/2010/May/msg00092.html The DefaultEditorKit.deletePrevCharAction is invoked twice when the delete key is pressed. Are there any suggestions for a w...

How do I add items to the Finder context menu in Mac OS X?

I'm in the process of porting a Windows application to OS X (we wrote it in Java so most of the code is portable), but what I'm currently unsure of is how to add context menu items in the Finder window when the user right clicks on an item (i.e. I wish to add some items to the the menu that has "Open" "Open with" , "Get Info", etc... wh...

How can I test my website in an old version of Safari on OS X?

Apple doesn’t seem to offer downloads of older versions of Safari, and I’m not even sure they would install on Mac OS X, as Safari seems to be part of the OS like Internet Explorer is on Windows. Is there any way to test my website on old versions of Safari? I need to fully test (i.e. click around, try out JavaScript), so a screenshot s...

What library is needed for mach-o/nlist.h (Mac OS X)

I seem to have trouble finding the correct library to #include in my source code. Searched all over the web and my manpages... No result :'( Does anyone have a clue? ...

Mac equivalent for CryptProtectData and CryptUnProtectData

I need mac (carbon) equivalent for CryptProtectData and CryptUnProtectData. Please refrain from suggesting a cocoa solution with "move to cocoa" since that's not an option. ...

OSX Leopard HID getting simple keyboard input example?

Hi, I am about to implement simple keyboard and mouse input on osx for my engine. I want to abstract the implementation in more generic c++ classes like Keyboard and Mouse plus appropriate Listeners for portability. Anyways, I came across the Leopard HID Api (http://developer.apple.com/mac/library/technotes/tn2007/tn2187.html#TNTAG9000-...