mac

How can I get the full list of running processes on a Mac from a python app.

I want to get the list of running processes on the Mac, similar to what you get from 'ps -ea' I have tried os.popen('ps -ea') but this only lists a small subset of the processes, presumably those owned by the owning shell. Other options I have tried are 'sh -c /bin/ps -ea' 'bash -c /bin/ps -ea' 'csh -c /bin/ps -ea' Running as root vi...

Is it valid to ask an NSNumber for an NSDecimal value whe the NSNumber was initialized with an Integer?

Example: I have an NSInteger and I wrap that into an NSNumber object. Now I want to have an NSDecimal with the value of that NSInteger. So could I ask: NSDecimal myDecimalFromMyInteger = [myNSNumberObject decimalValue]; Or is this problematic on some way? Or must I always ask for the exact same value as I used to create the NSNumber ...

new to mac.Permission issue with applications

Hellos good fellas! now i'm desparate. I feel like i'm turning round. when i believe solve something then i break something else. started using this mac this week.In the process of setting up my environment i face some challenge.I got a maven project which uses cargo plugin to publish to tomcat working fine.for that i had to google to c...

Menu of app in Status Bar wont work on Snow Leopard

I have an application that sits in the status bar on the Mac. It has a menu that lets you look at the app version, change some settings and quit the app. I built it on Leopard and it works fine on Leopard. On Snow Leopard, I can see the app in the status bar and clicking on it shows the menu items. But clicking items in the menu doesn'...

Trying to upgrade Python to 3.0 on Mac OS 10.5.8

I'm having some problems upgrading Python on my Mac. For my first attempt, I downloaded and installed the 2.6.4 dmg MacPython installer from http://python.org/download/mac/. This did install 2.6.4, and when I ran 'python' from the terminal it says that version. However, I also had a test script where I am doing: import os, json But I...

Compiling Bochs on Mac os x Snow Leopard

Hi there, Was someone able to compile the Bochs simulator under Snow Leopard. Leopard worked fine for me but under Snow Leopard I get alot of problems related to the Carbon library... Ok, some more information was request. I compile with make on the shell; stanard build process coming with the bochs sources I was successfully able to ...

Visual Basic 2008 - NullReferenceException ERROR?

Hey all, I'm using Visual Basic 2008 here, and I'm debugging my code that connects to my SQL Database and writes something in it. It was working fine and all until I came to an error like this. NullReferenceException was unhandled. What's going on? Here is the code I'm working with: Dim conn As MySqlConnection conn ...

How to display time in seconds in Cocoa efficiently?

I want to display the time (including seconds) in an application in a text field, pretty simple. What I currently do is create a NSTimer that runs every 0.1 seconds that gets the system time and updates the text field. This seems like a terribly inefficient way to accomplish this. Is there a better way? ...

Eclipse Doesn't Find Java On Snow Leopard

I have Cocoa 64-bit Galileo Eclipse installed on snow leopard. For some reason all my java is underlined in red, even standard java library functions. When i try to add a jre it tells me "Standard VM not supported on MacOS." I've even tried installing the 1.5 java sdk and still doesn't work. I also get Unhandled Loop Exceptions. I've tri...

How do I use NSTreeController, NSOutlineView and Core Data with an "invisible" root item?

I have a Core Data model which consists of a simple tree of a particular entity, which has two relationships, parent and children. I have an NSTreeController managing the model, with an NSOutlineView bound to the NSTreeController. My problem is that I need a single root object, but this should not display in the outline view, only its c...

OpenVRML in snow-leopard (from macports)

Hey, I just Downloaded openvrml from macports (port install openvrml) Now I have a Sample program (pretty_print.cpp from openvrml at sourceforge) that begins like this: # ifdef HAVE_CONFIG_H # include <config.h> # endif # include <openvrml/vrml97_grammar.h> # include <openvrml/browser.h> # include <fstream> ... then in Xcode, I add...

Can't Run Netbeans after changing Java to 1.6 on mac

Hello guys i know i've posting a lot about mac lately and setting up my environment to develop on java 1.6. after trying to set my etc/launch.conf like so setenv JAVA_VERSION 1.6 setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/ setenv CATALINA_BASE /Library/apache-tomcat6020 setenv CATALINA_HOM...

NSApplicationWillTerminateNotification not received

I have some code that needs to be run when the application terminates. I register my controller for the NSApplicationWillTerminateNotification as follows: [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(applicationWillTerminate:) name: NSApplicationWillTerminateNotification obj...

install java se 6 on a mac without software updater

hello guys i've come from a very long issue where i was obliged to remove the /System/Frameworks/JavaVM.framework/Versions/1.6.0 and the 1.6. now i downloaded the JavaForMacOSX10.5Update1, because it's not available anymore on the software updater, and run it.Now i can't find it in /System/Frameworks/JavaVM.framework/Versions/ where i'm ...

Getting started with cronjobs on a Mac.

I'm trying to get familiar with cron jobs, and I think I get the basic idea (scheduling, syntax, etc), But, I can't seem to get it right on my mac with Terminal - where exactly do I find the Crontab? How should I reference the paths to scripts? What I'm trying to do is hit a php script on a remote machine (http://...) - Is that possible...

How to know a device's name from its device ID in OS X?

Hi all, I'm writing a program in OS X that receives click events from a mouse and a touchpad. When the user clicks at somewhere, the OS sends the device ID, which is just an int, and the position of the cursor to my callback function. I want to know if the click event comes from mouse or touchpad. So, how can I know the device's name fr...

how to use package maker of Mac 10.5.7

Hi I am using Mac 10.5.7 .I have created a sample java application. Now I want to create package for distribution for my application. We can create this using Package Maker. So How to use package maker to make my software distributable Thanks Sunil Kumar Sahoo ...

Updating Python on Mac

I wanted to update my python 2.6.1 to 3.x on mac but i was wondering if its possible to do it using terminal or i have to download the installer from python website? The reason why i am asking this question is because installer is not updating my terminal python version. ...

GUI objects not showing in Java on Mac

I've only just begun writing GUI programs, this being my second one. With both projects (both homework assignments) I have had the same issue. The GUI objects (such as JTextField) do not show when the application runs until after I resize the window or move keyboard focus to them. If I do not do one of those two things, then I'll just ha...

Creating a Cocoa app using C or Perl (NOT Objective-C)

I'm having a hard time understanding how to use Cocoa with either C or Perl. Background: I've seen it mentioned in quite a few places that Mac's Cocoa API can be used with C, Perl etc. but I haven't found any information on how to go about doing this. I've also found a couple of articles saying that Cocoa can be used with Objective-C on...