cocoa

How can I make a window like the Mac OS X dock's stack?

Hello SO'ers I'm looking to create a window object that looks just like the Dock's Stack. (The grey square one, not the leaning list of pisa). Complete with title, transparency, navigation buttons, large icons with subtitles, and pointy-arrow bit on the bottom. The NSPanel "HUD" didn't really fit... I'd like the thing to pop-up when ...

How to listen to Screen Captures

Is it possible for me to listen to listen to OSX's built in screencapturing so I can handle the files myself rather than osx doing it? ...

Custom field editor for NSTextFieldCell in an NSTableView

I have a custom NSTableView subclass filled with several custom NSTextFieldCell subclasses. I would like to be able to change the edited cell by using the arrow keys. I am able to accomplish this by creating a custom field editor (by subclassing NSTextView) and returning it from the window delegate like so: - (id) windowWillReturnField...

addObjectsFromArray vs. mutableCopy

I have the following code: self.itemsCopy = [self.items mutableCopy]; //[self.itemsCopy addObjectsFromArray:self.items]; NSLog(@"------- BEFORE APPEND --------"); NSLog(@"items count: %d",[items count]); NSLog(@"itemsCopy count: %d",[itemsCopy count]); My results are: ------- BEFORE APPEND -------- items count:...

Cannot add object to NSMutableArray

I've checked Google and I haven't found anything that helps. I'm writing a stack class in Objective-C, the stack is based around an NSMutableArray, however, I cannot add any objects to it, it's not throwing any errors in the console, and there are no compile warnings/errors. Here is my code for the stack object. #import "Stack.h" @imp...

Event handler loop intersecting Stream run-loop

Hi all, I am trying to make a socket server that spews mouse move events, in Cocoa. This thread: http://stackoverflow.com/questions/3134901/mouse-tracking-daemon has info regarding the mouse event handler, which was really helpful, however, I need to stream these events out via socket. Using http://developer.apple.com/mac/library/doc...

MacRuby: load cocoa bundle

hi , I created a custom cocoa bundle. But when i try to load the bundle into MacRuby project,I get the following err dyld: Library not loaded: audio_streamer.bundle Referenced from: /Users/sgopinath/workspace002/UplayaDesktopRadio/build/Debug/UplayaDesktopRadio.app/Contents/MacOS/UplayaDesktopRadio Reason: image not found I created the...

NSWindow that is unaffected by Expose

Is there any way to make a window completely unaffected by Expose, just like the Dock? Setting the level to NSDockWindowLevel doesn't help. I know about NSWindowCollectionBehaviorStationary, but I want the window not to fade when Expose is active. If it is not possible, is there any way to "unfade" the window after Expose fades it? ...

How to convert NSAppleEventDescriptor type 'ldt' to NSDate in Cocoa ?

NSLog(@"%@",eventDescriptor); shows <NSAppleEventDescriptor: 'ldt '($90EFCFC700000000$)> How to convert it to NSDate ? Thanks in advance ...

How can I detemine which screen holds the menubar?

In Cocoa, how can I determine which screen holds the menubar when the computer has multiple screens? Here's what I have so far: NSArray * screens = [NSScreen screens]; NSScreen * mainScreen = [screens objectAtIndex:0]; if ([screens count] > 1) { for (NSScreen * screen in screens) { if (/* screen == the screen that holds...

MPMoviePlayerController not released

I am running an intro movie in a MPMoviePlayerController and i've got a problem with the allocated memory not being released. When the movie finishes, Instruments shows the memory being released. However when i skip the movie by tapping on it the memory is not released. Here are the important parts of my code: - (void)applicationDidFini...

Dragging a button and dropping it at another location in its window

Hi all, I am trying a simple application with drag and drop: My application contains a window with a button over it. Idea is: user should be able to drag this button to another location in its window, such that its location changes but it performs same action when clicked! Can anyone suggest how can I implement it? Than...

NSMenuItem number bubble?

I have seen something like this: in a Menulet on the right of menu items and I can't figure out how to do it. Can anyone elaborate? Thank you! ...

How to create a background-running Cocoa application?

How do I create a Cocoa app that runs in the background (not in the dock, and not in the menu bar either; just in the background). Does the app need admin privileges? I hope not. Actually it shouldn't, because it's enough that the app runs in the background for that user only, i.e. not for all users. And I guess I can make it "launch w...

Window from nib in dylib

Hi, I'm quite new to the Mac but reasonably expirienced with windows. What I need is a window owned opened and closed by the library (dylib). This is very easy to do in MS Windows but seemsnto be hard under Cocoa. I used the code from apple's 'CocoaInCarbon' example with C++ Wrappers. But the 'NSApplicationLoad()' followed by 'NSBundle...

Does Apple provide localized recovery options for common NSButton title's for NSError's?

Does Apple provide localized strings for common NSButton titles, such as the equivalents to OK, Cancel, Try Again, and Quit? I'm attempting to create a custom NSError object from one handed to me by another Cocoa framework. I want to implement the NSErrorRecoveryAttempting informal protocol to let the user Try Again or Quit if an error...

NSTableView - programatic display of values in a long table view

Ok, so I am creating an iTunes overlay for a client. My question is, with a given index, how am I able to move the displayed cells/cells in a row to a specific entry in the table view, programatically. In other words, replicating iTunes when you are on a playlist it jumps in its table view to the next song if the table view (strictly th...

Is there a Cocoa equivalent of map from C++?

I really love map in C++, it's fast and easy to program. Is there anything similar in Cocoa? I know I can mix C++ and obj-c together, but I'd rather use a more obj-c way to program :) Thanks!! ...

Removing SectionIndex dynamically

I am using sectionIndexTitlesForTableView to display index in a UITableView. It is working fine but I am using the same TableView to display something where I do not need this index. So, the question is how to remove the sectionIndex? ...

Command Line arguments from a Cocoa App

Hey guys, I know there is a lot of info out there on how to do this, but I was wondering if using NSTask is the best way to call command line arguments from a Cocoa App. Also, if I wanted to use something like "dns-sd ..." (something that doesn't end until interrupted or killed), would calling a kill on it using NSTask be the best way t...