osx

Link errors loading a Python extension for i386 MacOS that was compiled on a PPC

I'm trying to compile a Python extension (written in C) on a PPC mac (running OS X 10.4, XCode 2.5), to run under Ren'Py on both PPC and i386 MacOS. The PPC version works; the i386 version fails to load with ImportError: dlopen(./fasttint_macos_i386.dylib, 2): Symbol not found: _PyType_GenericNew Referenced from: /Applications/Games...

Does the combo of PHP5, MySQL, and a Macbook Pro constitute a LAMP stack? If not, what does?

Hello - I mostly code in Visual Studio, I like it, but lately it's making me feel a little claustrophobic. On my MacBook Pro, I've set up PHP5 and MySQL (natively). With the built-in server on the mac, does this constitute a LAMP stack? Is Mac OSX considered a Linux Environment? I have VMWare Fusion 3, should I set up a Linux OS virtua...

NSStream sockets missing data

I am trying to pull some sample data from FreeDB as a proof of concept, but I am having a tough time retrieving all of the data off the incoming stream (I am only getting the last bits for the final query listed here (if handshakeCode = 3) I think this may be something with the threading on the main runloop, but I am not sure. Odd thing...

Implementing NSToolbar

Im trying to Implement my application with NSToolbar. I know I need to add the following, but I don't know where... IBOutlet NSWindow *window; ...

Searching for a track on iTunes

I'd like to search for tracks on iTunes using a Python script on Mac OS/X. I found a way to access the iTunes application through: iTunes = SBApplication.applicationWithBundleIdentifier_("com.apple.iTunes") but I haven't figured out (yet) the way to perform searches. A little help appreciated. Disclaimer: OS/X newbie here. Note: I ...

Detect when screensaver activates with Cocoa

Is there a way to trigger an action when the Mac OS X screensaver activates or when it goes to sleep (preferably using cocoa)? ...

NSKeyedUnarchiver chokes when trying to unarchive more than one object

We've got a custom matrix class, and we're attempting to archive and unarchive an NSArray containing four of them. The first seems to get unarchived fine (we can see that initWithCoder is called once), but then the program simply hangs, using 100% CPU. It doesn't continue or output any errors. These are the relevant methods from the matr...

Sporadic EXC_BAD_INSTRUCTION (SIGILL) when in 64 bit mode

For some reason for a low-number of users (say 1 in a few hundred) the application seem to crash when run in 64bit mode on a Snow Leopard 10.6.3 I've attached the stack traces. The crashed seem to be random in com.apple.AppKit at random locations and random moments. Anyone else had any experiences? Using GCC compiler of Xcode 3.2.2 Cr...

Accepting drag operations in an NSCollectionView subclass

I've subclassed NSCollectionView and I'm trying to receive dragged files from the Finder. I'm receiving draggingEntered: and returning an appropriate value, but I'm never receiving prepareForDragOperation: (nor any of the methods after that in the process). Is there something obvious I'm missing here? Code: - (void)awakeFromNib { [...

How to compile OpenGL with a python C++ extension using distutils on Mac OSX?

When I try it I get: ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/cscalelib.so, 2): Symbol not found: _glBindFramebufferEXT Referenced from: /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/cscalelib.so Expected in: dynamic lookup I've tried a...

Clean bindings with structs

I have a model class for which it makes quite a lot of sense to have NSSize and NSPoint instance variables. This is lovely. I'm trying to create an editing interface for this object. I'd like to bind to size.width and whatnot. This, of course, doesn't work. What's the cleanest, most Cocoa-y solution to this problem? Of course I could w...

How to add information to about screen of my cocoa app in Mac Os X

Hi All, I am pretty new in developing cocoa applications. I have developed a small UI application using cocoa. I wanted to add some information on about screen, currently it shows the app name and version which is 1.00. Can any one help me how i can add some information in about screen, is it possible to add information programmatically ...

Does GTK+ on Windows and OS X use the native widgets or are they emulated?

Do GTK apps look native in those environments? ...

osx sys/io.h not found

Hi, I'd like to compile a c programm developed for linux using cc under os x. It includes the header sys/io.h. When compiling I get the error that this file could not be found? Isn't there any sys/io.h header file under os x? Any help would be really appreciated! Thanks! ...

Retrieving current mouse coordinates and manipulating them in Mac OS X using Cocoa?

Is there any way to get the coordinates of the mouse in Mac OS X? And further could you somehow manipulate the current mouse location using that method to retrieve the coordinates? Or would you have to use something else to move the cursor? ...

Applescript iTunes dictionary explanations

I am wondering what the different color schemes mean in the following: What does the blue C tag mean? and the purple one? Disclaimer: absolute OSX newbie here... please be gentle ;-) ...

pyobj access to iTunes application

Let's say I managed to get the dictionary opened for iTunes in the Applescript editor: How would I access the "search" commands using Python with pyobjc? I know I get can hold of the iTunes application using: iTunes = SBApplication.applicationWithBundleIdentifier_("com.apple.iTunes") but after I do a dir on it, I don't see the sear...

LSUIElement not working

I have an application that has LSUIElement = 1 in the Info.plist. When I run the application, a dock item and toplevel menu bar is created for it. Why? EDIT: I was using a library that was calling TransformProcessType(), clobbering my Info.plist configuration. ...

how to create a watcher using fsevents in mac osx 10.6

I m trying to get file event notifications using fsevents.h file. I m working with Mac OS X 10.6 and XCode 3.1.4 in which i found fsevents.h in four following locations /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers/FSEvents.h /Xcode3.1.4/SDKs/MacOSX10.5.sdk/System/Libra...

How can I discover what apps are installed on OS X using Objective C or Macruby?

Hi, could you tell me please - which object and which method can i use to fetch information about installed applications on OSX with objective c or macruby? ...