cocoa

Cocoa Distributed Objects

Hello, I've given myself a headache trying to figure out how to run this Distributed Objects demo. I can run it just fine locally on the same machine. Here's the situation. I have a Server App that spawns a Client App [with OpenGLView] on a remote machine. I can do this easy with AppleScript. The Client App seems to Vend it's OpenG...

Preventing an application from being moved between spaces

Working on an application that contains legacy Carbon code (mixed with some Cocoa). It is a full screen app (not technically, it just draws itself as though it were) that hides the dock and application menu bar when active. What I'd like to do is prevent the application from being allowed to move between Spaces. Basically, if the user a...

Soundflower input applications

Hello, I've downloaded the source of Soundflower and I am trying to retrieve a list of all applications currently sending data to Soundflower. I'd like to manipulate each application's sound separately just like JACK and Audio Hijack does. Any ideas? ...

How can I check if a WebView URL is a local file??

Hi guys, I have this question that is unsolved for me.... I need to check if the current URL of my webview is a local file in the Documents directory of my app....how can I do this?? Thanks! ...

How to find the NIBs in a project that use a specific class?

Suppose I have a view derived class named MyView. In the same Xcode project MyView is defined, I have many NIBs. Some of the NIBs have a Custom View with the class set to MyView. Now suppose I want to change the name MyView to something else or rename an outlet. I need to find all NIBs using MyView so I can update them. My question is:...

Stretch PNGs smoothly in Cocoa AppKit

In questions like this one it shows how to use UIKit's -(UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight to stretch a PNG easily, e.g when inserting text in an iChat like bubble. I would like to do the same on regular AppKit/Cocoa/desktop app using CoreGraphics or some NSImage ...

A simple send and receive program in xcode

Hiyee...doing any one knows where to find a simple send and receive program so that can communicate with each other in MAC...And it's in cocoa language ...

How to create an overlay window in Java?

I'm trying to create a HUD style display for a foreign application. To do this, I'd need to make a transparent overlay window, that would be placed on top of the window of the foreign application. The overlay window should allow me to place widgets and draw text on it. Events should get forwarded to the underlying window, if they happen...

Application exit event

Hi all, I am developing an application in cocoa .My application shows a pop up sheet initially .Now i need to know which event is fired when we try to exit the application by right clicking and selecting "exit" on the icon in dock,because i cant exit the appication because of the popup sheet ..looking for a solution ...

Firefox Cocoa Plugin

I`ve created simple hello world-like plugin which draws red box. Аfter embedding into xulrunner application the plugin works almost fine. Xulrunner application successfully redraws the box on resizing the application window. But after any mouse event, for instance - left click, my application crashes with "Stack overflow". Debugger say...

Registering an icon for my application's document type.

I'm trying to register an icon for my app's document type. After reading Declaring New Uniform Type Identifiers and looking at /Developer/Examples/Sketch I came up with something like this in my Info.plist: <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeRole</key> <string>Viewer</string> <key>LSItemConten...

CG/NSPoint-like integer tuple type?

Is there an appropriate structure provided in the Apple foundation kits to represent discrete coordinate systems? I know I can just use the integral component of NSPoint and by convention keep it discrete, or even define my own. However if there is one already which is typed correctly I would prefer that and avoid implicit / explicit...

CALayer filters and bounds

Hi, I'm just starting writing some Core Animation code and I've just spent a frustrating day trying to figure out a particular problem. I have two layer-backed views that together make up a wizard/ assistant style user interface: 1) a custom background view that fills the entire window with an edge-to-edge gradient and a nice image on...

How to compress jpeg image with Cocoa?

I have an jpeg image and I want to be able to incrementally compress it using Cocoa/Core Image/Core Graphics. For example, I have A.jpg (3MB), I compress A and get B.jpg (1MB), compress B and get C.jpg (400KB), and so on till the image can't be compressed anymore. I am trying to use NSBitmapImageRep representationUsingType:properties w...

Using NSTask with an NSPipe and a Perl script that spawns another process

I am running a Perl script within an NSTask object with it's output going into an NSPipe. I am using notifications to receive it's output periodically and update the GUI. The Perl script actually spawns other processes whose output doesn't seem to go into this pipe, but does appear in the debugger console and I can see them running ther...

Cocoa Core Data and Tab View - How do I tell when Tab View is finished "loading" so I can tell the view to initialize itself?

Hi, I have a simple Core Data app I am building to try to understand Core Data. It has two entities: a weather station, and a collection of observations for a given station. I created the initial interface for this by putting a tab view on my window, selecting the first tab, and dragging the weather station entity onto that view; then s...

Cocoa application crashing on OpenGL call

I made a new project and pretty much copied this guide, but whenever I call any OpenGL function it the spot marked // Drawing code here it crashes. I have this there : glViewport(0, 0, [self bounds].size.width, [self bounds].size.height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0, [self bounds].size.width, [self bounds...

Set image colors from core graphics

I have image in png file like this. I load it and draw in drawRect method. Can I change colors of image in Core Graphics or Quartz on iphone? I want to have red football ball, not black. Can I do it? ...

Displaying data from multiple entities in a single NSTableView (Core-Data)

Hi there, I have an entity called Pupil, and an entity called Loan. The Pupil entity has the attributes: firstName, lastName, address, postCode, telephoneNumber. The Loan entity has the attribute: loanID, and the relationship: pupilID, which is a relationship to the entity Pupil. I wish to display the loanID, with the pupil (if any) re...

Center an NSView within an NSScrollView

How do I center an NSView within an NSScrollView like the way "Preview" does? ...