osx

Drop down view in cocoa

I'm looking to create a 'drop down' view that falls in front of the main window. An example of this would be the window that drops down when you click 'Advanced' in System Preferences->Networking. If someone could point me in the right direction documentation-wise that would be great. Thanks in advance. ...

Detect when a Mac OS X window is resized or moved

I am writting an application which must know when a window is resized or moved. I had a look on notifications but it seems it does not do what I expected. Do you have any idea how I can achieve this? ...

What is the best way to create a "stop progress" button like in Safari's Downloads window?

The Apple Human Interface Guidelines say: In the Downloads window, Safari uses the free-standing NSImageNameStopProgressFreestandingTemplate image inline with a progress indicator to allow users to stop an in-progress download. The NSImage documentation says something similar. However, creating an NSButton using NSImageNameStopPr...

How is "clean" testing done on the Macintosh without virtualization?

One of the things I've run across on Windows is when a web browser plugin or program you're developing makes an assumption that something is installed that, by default, isn't always present on Windows. A perfect example would be .NET - a whole lot of people running Windows XP have never installed any versions of .NET and so the installer...

Bash script question

Say I have a bash script as follows while read $f; do cat $f >> output.txt; echo "aaa" >> output.txt; done Yet the second echo statement isn't executed. At all. What am I doing wrong? I'm running this via tail -f /var/log/somelog | ./script.sh $f should not be empty. It's only supposed to output when tail notices a change in th...

Cocoa: Get frontmost window of active application

How can I get the NSWindow object from the frontmost application? What I'm trying to do is a SizeUp, so from my app I could resize the frontmost window of any app. ...

Preparing for Rails deployment

Getting ready to deploy a rails project on Mac OS X Leopard Server (such that it matters). Got a few questions for someone with Rails experience: where should directory containing the project go? inside the website's root folder or out? who should "own" that directory? www? root? something/someone else? hope to continue serving static...

Help with pointers in Cocoa

I'm trying to make a simple calculator application in cocoa. The program hangs when I click on one of my buttons. I think I've traced the problem to the part of my controller that adds a digit to the end of the number currently on the display: - (void)updateNumber:(int)buttonClicked{ *self.activeNumberPointer = *self.activeNumberPoint...

Cocoa giving error: <Error>: doClip: empty path.

Coco gives error: Thu Jun 10 19:13:56 myComputer.local myApp[####] <Error>: doClip: empty path. But I don't have this function anywhere in my code (can't find by searching in frameworks / project)... Seems a lot of people complain about this because it goes into the console logs, but couldn't find any reason given as to what causes it...

Getting home directory in Mac OS X using C language

How can I get the path of home directory in Mac OS X using C language in XCode editor. ...

creating a temporary folder in tmp folder c language Mac OS X

Hi, How can i create a temporary folder in /tmp directory. ...

example of use of CGSGetWindowEventMask and CGSGetWindowGeometry

Hello, I am looking for a example on how to use CGSGetWindowEventMask and CGSGetWindowGeometry functions. Do you have any working example? Thanks in advance :) ...

How do you programmatically press a toolbar button with AppleScript?

I hope this isn't too obvious, but I'd like to press one of the toolbar buttons within an application by means of AppleScript. Background: The button doesn't have any menu item or keyboard shortcut. Thus, I can't activate it by any of those methods; I need to find an AppleScript way of actually 'pressing' the button. ...

Python Application in right click menu of OS X

Hi All, I know that there is the PyObjC bridge is OSX and what I want to do is to put a python application/script in the rightclick context menu of OS X. there is the OnMyCommand plugin but I dont think that supports python. I've had a look at how to do it in Carbon/ Objective-C and i'll admit it im a wuss and am just not smart enough y...

getting folder content C language

Hi, How can i get the paths of a folder and its content. Say i have folder named MyFolder as /tmp/MyFolder/ where it has subfolders SubFolder1, SubFolder2... and some files ...

building odcctools in a 64-bit OS

The odcctools package provides binutils for the Darwin OS. -- this allows you to cross compile to Darwin and OSX for example. However, odcctools does not seem to build properly on 64-bit OSes: ./../expr.c: In function ‘expression’: ./../expr.c:311: error: ‘union <anonymous>’ has no member named ‘n_name’ Or, if you set CFLAGS to -m32, ...

add a custom view/windows in the mac os X dock

Hello, I would like to add a custom view (a pager) in the dock, just before the trash and was wondering on how to perform a such task. Do you have any pointer to help me to start? Thanks in advance for your help :) regards, ...

Sharing Code, Images and Core Data models across iPhone and Mac project

Hi, I am maintaining a fairly large mac project and an iphone client for this project. Some code as well as some images and core data models are shared between these two projects. I want to create a shared framework containing this shared components but to my surprise, frameworks like we cocoa developers known them are not supported on...

Silverlight Out of Browser (OOB) app crashing only on OS X

We have a Silverlight application that runs OOB (out of browser) so the user can install it. When it's running OOB we display a button that calls Application.Current.MainWindow.Close() so that the user can exit the application. This works perfectly fine on windows, but causes an error saying the application has quit unexpectedly on OS ...

iPhone Custom CA certificate for an application which uses NSURLConnection?

I have an application which is communicating with many different sites and each site has its own SSL certificate signed by our own internal CA. Doing this prevents us the need from purchasing SSL certificates for each site (hundreds or thousands) and is more secure then using a wildcard certificate with a shared key on each of those site...