I am writing a desktop usage statistics app. It runs a background daemon which wakes up at regular intervals, finds the name of the application window currently in focus and logs that data in database.
I manage to do this on Linux desktop with help of xprop utility (you can find it here).
How can I do the same on Mac OSX? Is there a d...
I'm wanting to build a simple OSX dashboard widget to tie in with my web application.
The widget will need a login screen first (user and password) to use it though (checked against user table in hosted mysql database, password stored SHA1 encrypted)
So my thought is that the widget will need to:
show username and password fields
Pas...
Cocoa has a plethora of integer masks and codes. For instance, NSCommandKeyMask or NSF1FunctionKey, which are clearly defined and documented in the headers.
However, some can be archaic and when accessing accessibility attributes, for instance to get the glyph (AXMenuItemCmdGlyph), you're given an integer number like 111, which represen...
HI! I'm trying to install opencv and use it with python, but when I compile it I get no errors but I can't import cv module from python:
patrick:release patrick$ python
Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>...
I've been looking at Mac OS Architecture and I found something refereed to as MIG. I think it is used for inter process communications but I'd like to find out more.
Can someone tell me more about MIG (and what it stands for) ?
Here is a strucure of a 'defs' file:
subsystem example 36270;
#include <mach/std_types.defs>
routine mig_t...
I have MAMP server and several test sites installed on my OSX 10.6.3. I just installed Windows 7 on a VirtualBox virtual machine. I have managed to successfully share folders to the Windows installation, but I am wondering if I can run my MAMP sites in Windows without installing a different Localhost there.
Does anyone know if this is p...
I'm trying to get my application to display an icon for a custom file extension using the following code:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>My Custom Extension</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<...
What's the easiest way to start over with Ruby Gems? I have Ruby 1.8.7 (OSX, ports) installed and I have also installed rails and some other random stuff a while back. Now the gems system seems to be totally dysfunctional and I can't upgrade rails. So is there a way to just nuke the gems so I can reinstall all this stuff with current ver...
I'm trying out a simple AppleScript I found online:
on run argv
set rtn to ((count of argv) as text) & " parameters passed.
The parameters were:
"
repeat with arg in argv
set rtn to rtn & " " & (arg as text) & "
"
end repeat
return rtn
end run
I saved it as an Application. Everytime I double click it from the Finder, I get...
Hi, am trying to get my head around the following:
Have a small program am trying to port to OSX(intel) which calls function doWork()
via pthread_create, in the function, I start by creating an array of long like such:
long myarray[DIMENSION]
on OSX, for the following values of DIMENSION, I get the following:
0->65434 = fine
6543...
Hello,
I am trying to get something like in this screenshot
in cocoa, I mean a custom list control. Do you know how this kind of things can be done?
Thanks in advance for your help,
Regards,
...
I am looking for a way to get the application icon from a window id in cocoa. Do you have any pointer for this?
...
I have asked a question on SuperUser about updating Ruby version in Google SketchUp. It seems that there is something different between Ruby shipped with the standard OS X distribution, and Ruby installed by RVM or MacPorts. I get the following error message when I try to use RVM's or MacPorts' Ruby 1.9.1
Exception Type: EXC_BREAKPOINT...
I have about 350 text files which comprise the entire contents of 5 folders on my HD. For each of these files, I would like to delete a specified number of characters at the start and end of each file. I have no knowledge of AppleScript but suspect it may be suitable for what I want to achieve. Any help on automating this would be greatl...
Source directory is determined like so:
SHOW=${PWD##*/}
[email protected]:"/mnt/bigfish/video/TV/${SHOW}/"
So it comes out something like:
[email protected]:/mnt/bigfish/video/TV/The Name Of the Show With Spaces/
Then trying to run rsync like so:
rsync -avz -e ssh "${SRC}" .
But it tells me that ""/mnt/bigfish/video/TV/The" is...
Is there a way to force quit all other applications from a cocoa app? If it kills the app itself if doesn't matter It supposed to quit too.
It has to be force quit since i dont want any dialogue boxes about saving or anything poping up.
Thanks! and cocoa as in desktop osx. NOT iPhone.
...
Hi, I'm currently working out the best structure for a document I'm trying to create. The document is basically a core data document that uses sqlite as its store, but uses the Apple provided NSPersistentDocument+FileWrapperSupport to enable file wrapper support.
The document makes heavy use of media, such as images, videos, audio files...
It seems that when BSD signals are converted to thrown exceptions, it only work the first time but not subsequent times.
I tried to convert signals to exception via the following call I made in the main method just before calling NSApplicationMain :
[[NSExceptionHandler defaultExceptionHandler] setExceptionHandlingMask:NSHandleUncaught...
I have a cocoa application that has a finder like feel it and is made up of five views. On the left there is a gallery which is a finder like interface to choose a given object. This view stretches across the whole height of the window. Then on the right I have a window for a 3D simulation view and then below it I have three editing v...
Hello,
Since JavaFX only works for 64-bit Linux and 64-bit OS X as far as I know (because the newer verison of Java hasn't been released in 32-bit), I'm curious if JavaFX is able to work on 32-bit Windows. Any thoughts?
Thanks!
...