mac

Mac OS X Python GUI Administrator Prompt

I have an OS X Python application that uses wxPython for it's GUI controls. I'm looking to prompt the user for administrative rights (akin to using the Authorization Service API in Objective-C) before starting a network service. The closest library I have found is Bob Ippolito's Authorization library but it is fairly outdated and has co...

Macro definition in cross-platform

When development various platforms(Android,iPhone,Mac,Windows and so on), it is necessary diverged processing(#ifdef/#endif) by depends on an platform definition. But, I don't know original definition in Mac/iPhone/Android.  Windows : WIN32 (Visual C++)  Mac : __MAC_NA(?) (XCode)  iPhone/iPad/iPod : __IPHONE_NA(?) (XCode)  Android :...

How to create a self contained Python Qt app on mac

I've recently started using a mac, and I'm curious about how to make a mac app that uses PyQt and is self-contained. Can anyone give me any pointers on where to start and what I'll need? ...

Mouse DirectInput for OSX

Does anybody know of some code I can look at that tracks mouse input on a Mac like DirectInput does in Windows? I'm trying to implement "freeview" on a Mac. I've read that the HID Manager is the way to go, but I'm not sure where to start on it ... ...

PHP doesn't run through Snow Leopard Web Sharing

I've followed all the tutorials and uncommented the relevant lines in httpd.conf, but PHP files do not render under Web Sharing. The server just serves up the source code instead of running it. I know that PHP works, because I can run it straight from the Terminal using the "php" command. What is happening here? ...

How do I delete the Google App Engine SDK from my mac?

I installed the Google App Engine on my mac some time ago and I'm not using it now. The Google Updater thing asks me to update the GAE every now and then and it's getting on my nerves. How do I uninstall the GAE? I can't find anything to do that. Thanks. ...

No keyboard input from GLUT while mouse is moving (In OS X)

So I just built an OpenGL application on a Mac for the first time. I'm using GLUT to get keyboard input. The trouble is, I've discovered that if I'm moving the mouse at the same time I push a button on the keyboard, my keyboard function doesn't get called! If I push a button when the mouse isn't moving, it gets called just fine. The same...

Which conditional compile to use to switch between Mac and iPhone specific code?

I am working on a project that includes a Mac application and an iPad application that share code. How can I use conditional compile switches to exclude Mac-specific code from the iPhone project and vice-versa? I've noticed that TARGET_OS_IPHONE and TARGET_OS_MAC are both 1, and so they are both always true. Is there another switch I ...

will pen drive information same on both windows and Mac ?

Hi... Greetings to all.. I have a pen drive which is a make of Trensend .... Whether the product and vendor id of the above pen drive will be same on both windows and Mac operating systems..or will it be different .. Thank you ...

Enable python support while installing opencv using mac ports

I installed opencv in my mac using mac ports by the following command sudo port install opencv It took around 2 hours and it installed properly. But the problem is that the python bindings are not enabled. So please let me know how to install opencv in mac using ports and also enable the python bindings. Thanks PS: I tried to manuall...

How to delete Eclipse completely (including settings and plugins) from Mac OS X?

My Eclipse with GAE broken and works strangely. So I deleted Eclipse from Application folder, but there are garbages left. I re-downloaded fresh new eclipse, but it runs with old settings, and broken GAE structure remained. How can I DELETE completely Eclipse from my Mac? (without any kind of settings/plugins/logs etcs.) ...

Rotate .swf file in WebVIew in Mac OS X

Hi I am developing a Cocoa application to embed a .swf file in a WebView and rotate the content of the Webview. The .swf file is an interactive flash file. Everything works fine, but when I rotate the content of the WebView, the drawing of the flash and playback get rotated, but not the interactive points of the .swf file. They stay in ...

How to associate a 4-char OSType / NSFileHFSTypeCode with a particular UTI

I am writing a MacFuse plugin, and would like finder to use the appropriate icons & launch the appropriate app when a file is opened. It is not possible for me to add an extension to the file, so my only other option in Snow Leopard is the NSFileHFSTypeCode. I have reviewed all of the codes registered on my machine using http://www.rub...

Combining multiple NSArrays

How can I combine multiple NSArrays into one array with alternating values? For example. Array One: Orange, Apple, Pear Array Two: Tree, Shrub, Flower Array Three: Blue, Green, Yellow The final array would need to be: Orange, Tree, Blue, Apple, Shrub, Green, etc ...

Command-line C & keyboard shortcut (in Mac OS)

How can I execute a command when user press a key in a command-line C application? Is it possible when window isn't focused ...

Getting Values from a CFDictionary

Hello Everyone, I'm new to Objective-C programming and was wondering if I could get some help. I'm trying to access the values from a CFDictionary. I've started by implementing code suggested in this question CFTypeRef r = IOPSCopyPowerSourcesInfo(); CFArrayRef array = IOPSCopyPowerSourcesList(r); CFDictionaryRef powerDic = IOPSGet...

Mac development - Start with MacRuby or Objective-C?

I want to dive into developing applications for the Mac and later also for the iPhone. For me as a Rubyist it is clear that I learn both, MacRuby and Objective-C. The question is only in which order I should do that. Is it easier to learn Objective-C first and then combine the knowledge of both worlds and start learning MacRuby, or is it...

MySQL driver module issue with Movable Type

I am able to get mt-check to run, but it says that DBD::MySQL module is not installed. Here is what it says: DBI (version >= 1.21) Your server has DBI installed (version 1.52). DBD::mysql Your server does not have DBD::mysql installed, or DBD::mysql requires another module that is not installed. The DBD::mysql database driver is requi...

Prevent Safari from losing selected text in the body on button click

I have an application that passes any selected body text to a text-2-speech server (via ajax) when a "Say It" button in the parent window is clicked; the selected text is in an iframe. The selection works on Firefox 3.6 and IE 8, but not Safari 5 (have not tried any others; thats our supported browser list). In Safari, whenever the bu...

How do I move first responder with applescript?

I want to address the following annoyance with iTunes: After I have searched for a track (by pressing cmd+opt+f to move to the search field) I want to be able to play the first track in the songs list. Ideally I would like cmd+enter to start playing the first track in the song list and also move the focus to the song list. For example ...