osx

Does an application, extension, or website for finding JSON element IDs exist?

I googled a bit with no luck. I'm wondering if a tool exists that allows a user to paste in a chunk of valid JSON, click on any of its elements, and get returned the id (path) to that element. I prefer either a web app, a Chrome extension, or a OSX or X11 app. Windows would be last resort as I'd have to run it under Crossover. I could al...

Virtualenv using system packages when it should not

I created a virtualenv environment with the --no-site-packages option. After activating the virtualenv, I noticed that importing psycopg2 at the "python" prompt would import the out of date system library I have but importing it at the "python2.6" prompt would import the newer version of the library I installed into the virtualenv. Why...

How to fix path variable in bash on Mac OSX Snow Leopard

This might be a noob question, but I need help. I screwed up my terminal by trying to alter my path variable using the following command: $ sudo nano .profile Before I did that, if I were to type: $ echo $PATH I would get: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin When I opened .profile in nano it told me that the fil...

How to display a notification even when a full-screen application is currently running?

My program needs to display a notification once in a predetermined interval. Under Windows, Shell_NotifyIcon does the job well except that when the user is running a full-screen application, the notification isn't shown. Though that may be the right thing in most of the cases, in my case I need to ensure the notification can be seen even...

Resize JPEG and save new file to JPEG on Mac OS X using Cocoa

I am a bit confused about what the best approach is to resize a JPEG file on disk and save the resized JPEG as a new file to disk (on Mac OS X with Cocoa). There are a number of threads about resizing, but I am wondering what approach to use. Do I need to use Core Graphics for this or is this framework "too much" for a simple operation a...

git ignore for directories with spaces on Mac OS X

I'm trying to add some patterns to my .gitignore file to ignore *.mode1v3 and *.pbxuser files generated by Xcode. However, my app name has a space in it, so the files I want to ignore are in the Foo Bar.xcodeproj/ directory. Adding variants of these patterns don't seem to work: *.mode1v3 Foo Bar.xcodeproj/ Foo Bar.xcodeproj/*.mode1v3 Fo...

Installing VPython in Snow Leopard?

So, i've just startet university, and we have to install python. Thats fine, cause it's build-in to OSX (Snow Leopard). I have installed matplotlib, numpy and scipy using this : http://stronginference.com/scipy-superpack/ It works perfectly, and i don't have to install the python.org version. But, now we have to install VPython, wich req...

What is the status of the Sparkle framework?

The latest beta is 2 years old. Most blog comments on Andy's website too. Is there a new version, living somewhere else? Or an alternative to Sparkle as a whole? It works for me now, I'm just wondering if there are going to be any further updates to Sparkle, or the promising SparkleCaster app. ...

Interface Builder NSStaticText value needs to be updated every time anything changes in dialog

I have a modal dialog thats building a string. The string is shown to the user, and the user presses checkboxes, radio boxes, etc to build the string. The string exists nowhere - I build it for display in -()builtString; from the configuration of the self.valuesDict. I can easily wire up the checkboxes via bindings in IB: for example to...

How can I use this NSPasteboard code for v10.5 or earlier?

Hi, I'm trying to to paste something to the generalPasteboard but I keep getting some warnings because I'm using 10.6 coding in my 10.5 app. Can someone please fix this code to make it compile for 10.5 or earlier versions of OS X. Thanks NSString *areacode = @"774"; NSPasteboard *pasteboard = [NSPasteboard generalPasteboard]; [...

How to force any application's window to redraw

Hello, I am looking for a way to force any window (even the ones where I am not the owner) to redraw. It has to work for all window (cocoa, carbon , ...) Do you have any pointer to achieve this? Thanks in advance for your help, Regards, ...

Cannot install pyenchant on OSX

Hi, I am trying to install python bindings for the enchant library (pyenchant), according to the readme, it should be as simple as running python setup.py install But when I try that, I get this error: OSError: [Errno 2] No such file or directory: './tools/pyenchant-bdist-osx-sources/build/lib' Can someone tell me what to do? I have t...

CMake + Link error + Whitespace in path

I'm trying to compile my CUDA project with CMake 2.8.2. My SDK is located in "/Developed/GPU Computing/" (OSX). The problem is the whitespace in the path, thus CMake doesn't find the libs. I tried: link_libraries("-L${CUDA_SDK_ROOT_DIR}/lib -lcutil") Result: i686-apple-darwin10-g++-4.2.1: Computing/C/lib: No such file or directory Doe...

Set default GCC to Fink-installed GCC 4.5?

I've got GCC 4.2 that came with my installation of Mac OS X 10.6.4, plus GCC 4.5 installed via Fink. I wanted to use gcc_select to change the default compiler to GCC 4.5, but was told gcc_select does not exist. Is there another way to set the default compiler? Or do I need to do so manually? If so, how? Thanks!! ...

OSX Java System Tray (menu bar)

Does anyone know of a way of if it is possible to have an application (Java on OSX) run in a system tray state but when a window is visible on the screen to have a dock icon? Currently I have a trade off between having the app running in the tray but also shown in the dock and with a menu bar or to have (using the plist hack) the app run...

Problem with file drag-and-drop in Cocoa

I'm experiencing some difficulties here. I have a drop zone (custom view) with it's own class. Everything works great so far with it. The problem is that I can't get the result from the drop operation outside the class of the drop zone. I read everything I found in the net. For instance, I would like my drop zone to count the lenght o...

Use files from /usr/local/share inside OS X app bundle.

I'm writing Qt application using some 3rd party library. I want to package it into a bundle. I'm using macdeployqt and this tool is actually copying not only Qt Frameworks but also 3rd party library into Frameworks subdir of Contents dir inside app bundle. The problem is that this 3rd party library need some additional file to work pr...

Programmatic Equivalent of "defaults write" command, e.g., how to use NSUserDefaults?

Trying programmatically do what the 'defaults write' command does in OS X. I can't seem to figure out how to get the correct preferences dictionary for the domain I'm looking for. I can get some preferences for the domains in the code below, but the preferences in question don't seem to be in the dict. Why/How are they in the terminal...

Mac OS X - monitor app launch?

I want to write a simple menubar app for Mac OS X. The user will only want to use that app when Safari is opened. To not clutter the menubar unnecessarily, I want to hide and show the menubar icon depending on whether Safari is open or not. Is there maybe some notification that my app could register for? The only workaround I can imagin...

Find the name of Directory Service User via Login Script in Perl

Hi Friends, I made a login script in Perl which has to run on Mac OS X clients and record the Logged in Directory Service user name. I tried using getlogin() , getpwuid($<) respectively. Now the problem is that since the login script runs as root on the system when the client logs in, getpwuid($<) always gives me the username as root....