osx

Creating a parenet less modal dialog or MessageBox or alert Sheets in cocoa?

Hi.... Issue1: I want to show an alert window or message box before the Main Window of the Application is launched. When im using the NSRunAlertPanel() it is not showing the alert window.It is directly launching the Application's Main Window. Issue2: I want to create an Modal (login dialog) and message boxes in an thread spanned from ...

TeamCity returns No such file to load -- rubygems (LoadError) but terminal runs fine

I've just setup 3 osx agents to run the CI for our ruby project. 2 of these agents are running our specs perfectly, starting their agents correctly etc. The third machine constantly returns No such file to load -- rubygems (LoadError). I have navigated to the work folder (the check out folder for the project) and i can run the commands i...

How to clean up my Python Installation for a fresh start

I'm developing on Snow Leopard and going through the various "how tos" to get the MySQLdb package installed and working (uphill battle). Things are a mess and I'd like to regain confidence with a fresh, clean, as close to factory install of Python 2.6. What folders should I clean out? What should I run? What symbolic links should I...

How does one feed a list of files into an app with appscript and Python?

Get your newb-shields up, I'm about to sprinkle you with some. I'm trying to get Photoshop CS4 to open a folderful of JPEG images with AppScript+Python, which could be described like so in BASH: #!/bin/bash for F in `ls ~/Desktop/test`; do open -a "Adobe Photoshop CS4" $F # proceed to mutilate the image appearance done I'm f...

How do I get my cocoa emacs on Mac OS X to load my .emacs visual customizations for new windows (any document opened after the first)?

So I just downloaded emacs 23.1 for my new snow leopard macbook pro from http://emacsformacosx.com/ and it works like a charm, except... I have visual customizations in my .emacs, a few lines are extracted here: (set-background-color "black") (set-cursor-color "green") (set-default-font "--Lucida Console-normal-r-normal-normal-1...

-bash: ./configure: No such file or directory - MySQL install on Mac OS X 10.6

I'm trying to install MySQL on Mac OS X 10.6. After I download MySQL and untar with tar xzvf mysql-5.1.37.tar.gz I then try and run this configure line: ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-shared --with-plugins=innobase I get the error -ba...

Disable PHP mailing on Mac OS?

I'm developing a web application in PHP, and my Macbook, running Snow Leopard, is actually sending emails when PHP's mail() function is called. It's emailing customers, and that's BAD. I COULD prevent this in my code, but I'd rather just disable mailing for my machine. Is there a way to do this under Mac OS? ...

What's the file format used by gcc in OSX?

I'm trying to learn assembly using NASM, the pcasm-book.pdf from Dr Paul Carter - http://www.drpaulcarter.com/pcasm/ - on my Mac OS X Snow Leopard. I'm trying to link the previous compiled C sample to asm samples: gcc first.o driver.c asm_io.o -o first But it's returning it: driver.c:3: warning: ‘cdecl’ attribute ignored ld: warning...

QSlider focus issue (Mac Leopard) with QApplication::focusChanged(QWidget*,QWidget*)

Hi, I'm using Qt 4.6.0 in Leopard 10.5.8. I have a few sliders. Every time I slide/click on a slider, it gets focus in Windows. However, it does not get focus on Mac. I have to manually click Tab to change focus. How to rectify this? Thanks in advance! ...

SFAuthorizationPluginView identifying "BACK" button

Hi, Does anyone who has experience with SFAuthorizationPluginView know how to identify between the user pressing "Cancel" and "Back". My problem is that SFButtonTypeCancel is identical to SFButtonTypeBack, hence a switch statement will fail at compile time, and an if statement will not recognize the difference. This is not a problem ...

Help with Assembly. Segmentation fault when compiling samples on Mac OS X.

Hi, I'm trying to learn assembly using Dr Paul Carter's pcasm book: http://www.drpaulcarter.com/pcasm/ The author doesn't packaged Mac OS X samples, then I've started using from linux sources. Here is the first sample, that uses his library asm_io. I'm getting Segmentation Fault when running it. Why? What need to be changed to run in ...

Mac OpenGL : No sound volume overlay in fullscreen

I have an OpenGL-based app that can run windowed or fullscreen in OS X 10.5. While in windowed mode, pressing the volume keys in the keyboard changes the volume setting (mute/unmute for example) and the OSX-drawn speaker icon overlay is drawn, as it happens with every other application. However, in full screen mode, pressing the keys d...

Cocoa Xcode - how to pass a variable to a function

I'm trying to figure out how to pass a variable (in my case hostname) to a function i created from a programatically inserted "menu item". #function -(void)goToTerminal:(NSString *)hostname { NSString *s = [NSString stringWithFormat:@"tell application \"Terminal\" to do script \"ssh root@%@\"", hostname]; NSAppleScript *as = [[...

Finding out if a Window is Resizable

Is there a way to determine whether the active window (not of my process, but a different application) is resizable? Edit: I would prefer to do this without applescript as it then depends on the application being scriptable. ...

Programmatically controlling a Cocoa Button on OSX (making it invisible and pressed)

I am trying to interface with a cocoa popup menu from an OpenGL button. The actual button needs to be in OpenGL and I cannot stick an actual Cocoa button in its place but when this button is pressed I would like for a Cocoa menu to popup just like the one that comes up when you press the nspopupbutton. It seems that there is no way to ...

Search Mailbox of Mail.app with Applescript

I want to be able to search a mailbox in apple's mail.app for a phase or word, then somehow return or copy all of the email addresses from which the emails which have successfully returned from the result of the search have been sent from.. if you get what i mean I thought that the only way to do this is probably applescript but if anyo...

How do I use stackshot to debug my application?

I've recently been told about a useful debugging tool on Mac OS X called stackshot, however I don't know how to invoke it. My understanding from the documentation is that it runs as a daemon, but the man page also reads as if it can be invoked from the command line. How would I go about leveraging stackshot for my currently-running appli...

When using py2app, is there a way to customize the traceback dialog that gets displayed? (Or show a different Cocoa dialog?)

Is there an easy way to get any more control over the py2app traceback dialogs, or just a nice way to display GUI messages? If I raise an exception in my py2app script, I get a dialog that says something like this: MyAppName Error MyAppName Error An unexpected error has occurred during execution of the main script MyR...

html positioned over flash: how to get cursor to respect CSS rules in OS X browsers

I have a webpage with a flash movie (via SWFObject) and I am using a modal jQuery UI dialog to pop up a google map on top of the webpage in response to user input. When viewing the site in Safari or FireFox on OS X, if I have the mouse over the part of the dialog content that is overlapping the flash movie underneath, the cursor change...

Java3d + osx + netbeans

Hi, I have a java3d project that was developed on solaris that I am trying to move onto my macbook for a variety of reasons (1 being that our solaris machines are painfully slow). Basically what I want is to use osx + netbeans for this project but it seems to reference java3d methods that are not included in the outdated version of jav...