I wrote this code to subscribe to USB devices being plugged in and unplugged; the point is for IOKit to deliver notifications to my iAttached() and iDetached() functions when the corresponding events occur. However, I don't get notifications.
The code can be seen here: http://gist.github.com/402391
I didn't want to over-populate this p...
I use my .vimrc file on my laptop (OS X) and several servers (Solaris & Linux), and could hypothetically someday use it on a Windows box. I know how to detect unix generally, and windows, but how do I detect OS X? (And for that matter, is there a way to distinguish between Linux and Solaris, etc. And is there a list somewhere of all...
I have seen the iPhone equivalent of this question here and I'm wondering...
is there an equivalent for bringSubviewToFront: for OS X development? I need something to send an NSImageView "to front".
...
Hi guys, I'm just learning some basic programming in Objective C and Cocoa. I'm trying to get some data from NSTableView. Based on what I read in one tutorial, I wrote this:
NSArray * items = [[itemsTableView selectedRowEnumerator] allObjects];
But then I learned that selectedRowEnumerator was deprecated already in 10.3 Panther and th...
Hey,
I have a little cocoa app which usually operates in the background (as agent). Sometimes I'd like to be able to popup a contextmenu (no window or s.th. visible at this time).
As I'm only targetting Snow Leopard I tried this:
if (windows) {
NSMenu *theMenu = [[[NSMenu alloc] initWithTitle:@"test"] autorelease];
[theM...
With an existing chart in a MS Excel for Mac 2008, in AppleScript, I am trying to do two things:
Rotate a 3D chart 1°
Save the chart as a image (png)
From what I've found on the Intertubes, it seems possible. But AppleScript's awkward verbosity and the lack of non-trivial MS Excel AppleScript examples on the web are too much for me ...
I just installed macvim yesterday and I have been trying to install vim latex today.
The one thing I am confused about is the menu items on the top bar:
-------------------------------------------------------------------------------
<apple icon> File Edit Tools Syntax TeX-Suite TeX-Environments TeX-Elements
--------------------------...
I've just gone to installed RoR on my snow leopard mac.. and found the rails gem was already installed..
is this normal? Does it need updating?
Does this get installed along with textmate?
...
I have installed xcode 3.2 with iphone SDK. (without Mac OS 10.4 SDK). WHen i create new project i only got these options for Mac OS
-- Application
-- Framework and Library
-- Application plugin
-- System plugin
--Other
But a book named: Programming Object C 2.0. From which i am learning object C. Its showing XCode with these template...
I've been tasked with maintaing some legacy fortran code, and I'm having trouble getting it to compile with gfortran. I've written a fair amount of Fortran 95, but this is my first experience with Fortran 77. This snippet of code is the problematic one:
CHARACTER*22 IFILE, OFILE
IFILE='TEST.IN'
OFILE='TEST.OUT'
O...
Hi,
I would like to know how to read the position on an icon on the desktop in OSX?
Or how do I get a list of all icons on the desktop + position.
Thanks in advance,
Omid
...
I'm trying to create an AIR application to log application usage and the only easy way to get information from the system with AIR is using command line tools and scraping stdout.
I know about tools like top and ps for OS X, but neither of them seems to tell me which application / window is active, maybe I shouldn't even be looking for ...
I have been trying to get Google Chrome (6.0.401.1 dev) on Mac OS X to load an NPAPI plugin without success so far. I have been working around the npsimple example from here: http://git.webvm.net/?p=npsimple.
Using gcc on Mac and VC++ 2008 on Windows I managed to get it running on Safari and Firefox on Mac OS X and Firefox and Google Ch...
I've got to write some code for a legacy application that is still running JDK 1.5. Unfortunately, it looks like OSX doesn't actually have a 1.5 JDK installed, it just links to 1.6:
/System/Library/Frameworks/JavaVM.framework/Versions $ ls -l
lrwxr-xr-x 1 root wheel 5 Apr 26 11:53 1.3 -> 1.3.1
drwxr-xr-x 3 root wheel 102 Feb 11...
I get the impression that Carbon Human Interface Toolbox does not work in 64-bit binaries.
Apple's documentation says:
The Carbon Help Manager is not available to 64-bit applications.
...
The Control Manager is not available to 64-bit applications.
...
The Data Browser is not available to 64-bit applications.
...
I made a program in Xcode, being a simple calculator that takes a first number, and a second number, and then either adds,subtracts,multiplies, or divides depending on the radio button. I build and run and the program comes up and works fine. When I went to show my friends on their macs, when you double click on the program the program p...
I was messing with my Objective-C++ namespace today.
I found that Handle, Size and Duration are already defined in ObjC++. What are they defined to be and where are they defined?
I have only #imported Foundation/Foundation.h
...
Is there a way to get the standard error/output path from within the process?
I tried NSTask's standardError but it returns NSFileHandle, and I need the path as string.
Thank you!
p.s. StandardErrorPath is set in a .plist used by launchd to start the process on system start. The process is a bundle, written in objective c.
...
Hi! I just tried to play with Ruby on Rails on Snow Leopard.
I was following this tutorial:
http://developer.apple.com/tools/rubyonrails.html
Whatever I try to do with rails I end up with:
MacBook-Pro-lm:~ lukasz$ rails blog
**undefined method `camelize' for "app":String**
MacBook-Pro-lm:~ lukasz$ rails --help
**undefined m...
Hi,
I finally made a great step by abandoning SVN for Git and loving it. It must be somewhere, but I can't really find on how to do this, gitosis friendly.
I have my repo 'site' stored on a remote machine. I push my working copy and pull this data on a production machine. One mayor difference though is 'one' file: database.yml, which ...