snow-leopard

os x python 2.6 bus error

i am getting weird python bus error when building a web app. http://pastie.org/714569 i am using python 2.6 from mac ports in osx snowleopart 10.6.2. i have done python_select and stuff. how to figure out what is going on? thanks ...

IORegistryEntry::fromPath() fail.

my IOKit kext is failing on older iMacs to locate the /options path in the DeviceTree plane of the IORegistry. has anybody else encountered this or know why it would fail? thx->adv IORegistryEntry* regEntry = IORegistryEntry::fromPath("/options", gIODTPlane); if(NULL == regEntry) { regEntry = IORegistryEntry::fromPath("IODevi...

PHP File Exists Always False

I have a case where file_exists() is always returning false. My latest attempt was to just test to see if it would return true for $_SERVER["SCRIPT_FILENAME"] and then return the value of the path if it couldn't find the file which it does. The path while not necessarily relevant to solving the problem is: /Users/joe/Workspace/720/ap...

How to intercept WM_DELETE_WINDOW on OSX using Tkinter

I'm trying to keep a Toplevel window from being closed in OSX by intercepting window manager WM_DELETE_WINDOW event. #!/usr/bin/env python from Tkinter import * def speak(): print "woof" root = Tk() root.title("root") win = Toplevel() win.title("win") win.protocol('WM_DELETE_WINDOW', speak) root.mainloop() When I run this I g...

A problem with complie VLCKit framework

according to this page http://wiki.videolan.org/Mac%5FOS%5FX%5FFramework i build the core components complete but when i try to build framework it have an error How could i fix it? Build VLCKit of project VLCKit with configuration Debug PhaseScriptExecution "Run Script" build/VLCKit.build/Debug/VLCKit.build/Script-EF78BD2E0CAEEF95003...

Creating an IMP from an Objective-C block

The IMP type in Objective-C represents a function pointer, as far I as understand. Is there any way to make an IMP from a block pointer? Thanks for your ideas. UPDATE: Thanks, @bbum, for your great solution. I haven't modified my code to use it yet, but everyone can see the fruits of my labors here: A new metaclass for Objective-C. ...

Deploy django under snow leopard server?

Any tutorials, how-tos or sth. about deploying django apps under snow leopard server? What do I need? Thanks! ...

python locale strange error. what's going on here exactly ?

Hello. So today I upgraded to bazaar 2.0.2, and I started receiving this message (I'm on snow leopard, btw): bzr: warning: unknown locale: UTF-8 Could not determine what text encoding to use. This error usually means your Python interpreter doesn't support the locale set by $LANG (en_US.UTF-8) Continuing with ascii encoding. ...

OpenCV and Xcode

I am looking at pattern recognition in images and video and have thought that C++ is the way to go (for high performance/real-time applications). I want to use the OpenCV libraries in Xcode when I build a C++ application (command-line tool) I am running Xcode 3.2 and have just followed the steps at http://opencv.willowgarage.com/wiki/Ma...

mysqldb build error

i remember installing Python + Django + MySQL + MySQLdb on my 32-bit Mac with Leopard 10.5.7. I tried the same procedure with Mac Snow Leopard. But have unfortunately ran into a lot of errors... i dont know but something weird is happening. Please look at the error log: Amit-Vermas-MacBook:mysql-python-1.2.2 amitverma$ python setup.py b...

Eclipse GEF on Mac Snow Leopard

I've been in upgrade mode this month and upgraded my Mac to Snow Leopard. I've developed a good sized Eclipse RCP which uses GEF. I upgraded Eclipse on my Mac to 3.5.1-x86_64, latest XCode, etc. Eclipse 3.5.1 works well; however, when install GEF-3.5.1, the SWT plugin doesn't seem to load properly. I do see the GEF n Draw2D plugins i...

Non-Admin Developer on Snow Leopard

I use a standard user account for my daily tasks on Mac OS. Since upgrading to Snow Leopard I am asked to do the following when a program is run from within Xcode: "Type the name and password of a user in the 'Developer Tools' group to allow Developer Tools Access to make changes" While I know the admin username/password, this is annoy...

Octave Errors in attempting to study Image Compression

Hey Folks, Let me start by saying I LOVE YOU. Thank you. Next order of business: octave-3.2.3:8> xin = imread('3Phone.png'); octave-3.2.3:9> colormap(gray(256)); octave-3.2.3:10> image(xin); error: invalid value for array property "cdata" error: set: expecting argument 2 to be a property name error: set: expecting argument 4 to be a p...

Developing GUI projects with MonoDevelop on Snow Leopard

I just installed MonoDevelop on my Mac (Snow Leopard). I'm a .NET developer, but have no Mono experience. I want to create a simple GUI app, but there doesn't seem to be a Gtk# 2.0 template under C#. There's one under VB.NET. I've installed the latest MonoTouch-enabled release (as I may want to try MonoTouch in the future). Should I ...

How to parallelize Sudoku solver using Grand Central Dispatch?

As a programming exercise, I just finished writing a Sudoku solver that uses the backtracking algorithm (see Wikipedia for a simple example written in C). To take this a step further, I would like to use Snow Leopard's GCD to parallelize this so that it runs on all of my machine's cores. Can someone give me pointers on how I should go a...

Best practice of installing Ruby and Rails on Snow Leopard?

I am setting up a new Macbook as a rails development machine. Till now, I always installed ruby, MySQL, etc. through MacPorts, because I don't want to be dependent on the system version of ruby. But with stuff like Homebrew and rvm (no link because of spam prevention) popping up, is there a better recommended way of setting up ruby for r...

Having trouble installing PIL in Snow Leopard

I followed these instructions: http://proteus-tech.com/blog/cwt/install-pil-in-snow-leopard/ And everything went as described. However, at the end, I tried running: python selftest.py to verify that everything is working properly, but I get: *** The _imaging C module is not installed I then run the python interpreter and tried...

How to prevent a Beep sound if global keyboard shortcut is pressed in the other application?

Mac OS X 10.6 — Cocoa I'm using global event monitor for displaying status item menu using custom keyboard shortcut: globalEventMonitor = [NSEvent addGlobalMonitorForEventsMatchingMask:NSKeyDownMask handler:^(NSEvent *event) { if ([event keyCode] == kVK_F12) { [self handleGlobalShortcut]; // How to prevent syste...

Running MongoDB with Authentication

I am trying to figure out MongoDB in order to evaluate whether it is a route I would like to take for future applications or not. In order to deploy it sensibly on my server, I would have to run it with authentication enabled (i.e. with the --auth argument or with auth = true in the config file). Installation seems relatively straightfo...

Replace MacPorts dependency with other package

Is there a way to satisfy a certain port dependency with another package (than the specified one) in MacPorts? More specifically, to use the package XYZ-devel instead of just XYZ for a second port that requires XYZ? Thanks in advance. ...