cocoa

Capture one view and output to an other view

Hi, looking for an impulse, how to get that done. I know that it is possible to capture the iSight but I have no Idea how to capture the screen and output it in realtime to an other... there will be no recording, just output... would be nice if someone could give me an hint. thx in advance ...

Using Core Data with an NSCollectionView

I have an NSCollectionView and I want to use it with Core Data the same way as I would with an NSTableView, preferably with bindings. Can anyone point me in the right direction? Thanks ...

How to add data from an NSTextField to a Core Data Attribute without having to press Return or Tab after editing the TextField?

I use a sheet with 3 NSTextFields and a Cancel- and OK-Button to edit the attributes of a Core Data Entity. The text entered in the NSTextFields is only updated in the Core Data Entity if i press Tab or Return after writing in the NSTextField or if i focus another NSTextField with the mouse. If i just enter text in an NSTextField and pre...

Best way of testing if an NSImage / CGImageRef is completely transparent

I have an image with tiles that I am splitting up and creating individual tiles with. However, these images typically contain completely blank areas (tiles in this case) that I wish to exclude. These areas are completely transparent. Now, how do I go about detecting them? Could read the tile pixel by pixel, by way of NSBitmapImageRep...

Should I release NSString before assigning a new value to it?

Hi, Please give me some suggestions about how to change a NSString variable. At my class, I set a member var: NSString *m_movieName; ... @property(nonatomic, retain) NSString *m_movieName; At viewDidLoad method, I assign a default name to this var: -(void)viewDidLoad{ NSString *s1 = [[NSString alloc] initWithFormat:@"Forrest Gump"]...

NSOutlineView not refreshing when objects added to managed object context from NSOperations

Background Cocoa app using core data Two processes - daemon and a main UI Daemon constantly writing to a data store UI process reads from same data store Columns in NSOutlineView in UI bound to an NSTreeController NSTreeControllers managedObjectContext is bound to Application with key path of delegate.interpretedMOC NSTreeController...

Is it possible to run a compiled program with Xcode on Mac OS X in FreeBSD? (Objective-C/Cocoa)

Hi. I have a plan to build a web-site which running CGI made with Cocoa. My final goal is develop on Mac OS X, and run on FreeBSD. Is this possible? As I know, there is a free implementation of some NextStep classes, the GNUStep. The web-site is almost built with only strings. I read GNUStep documents, classes are enough. DB connection ...

appendBezierPathWithGlyph fails in [NSBezierPath currentPoint]

Has anybody an idea in which case this can happen? GDB output: 0 .. 8: kill, abort, objc_exception_throw etc. 9: 0x00007fff87ea21f4 in +[NSException raise:format:] () 10: 0x00007fff8694e9e2 in -[NSBezierPath currentPoint] () 11: 0x00007fff869e3b3b in __NSAppendBezierPathWithGlyphs () 12: 0x00007fff869e5baf in -[NSBezierPath appendBez...

Recursively listing, and storing, directory contents

I know how to recursively list directory contents. I will be using Snow Leopard's enumeratorAtURL:includingPropertiesForKeys:options:errorHandler: method to do this. However I want to store my findings into a object hierarchy (of, say, objects of a custom FileOrDirectory class that has isLeaf, children, and count attributes). I need to...

Very Simple Cocoa Question

What Cocoa view does iTunes use to display the library panel? Thanks, helixed ...

Cocoa/AppleScript move file

I have a list of file paths and a destination path. I need something (AppleScript, Cocoa) that will move the files from one location to an other. I first tried using the following AppleScript, just to see what happens: set the_folder to (choose folder) tell application "Finder" move selection to the_folder end tell The problem is t...

Cocoa Drag and Drop, reading back the data

Ok, I have a NSOutlineView set up, and I want it to capture PDF's if a pdf is dragged into the NSOutlineView. My first question, I have the following code: [outlineView registerForDraggedTypes:[NSArray arrayWithObjects:NSStringPboardType, NSFilenamesPboardType, nil]]; In all the apple Docs and examples I've seen I've also seen someth...

Simple square that can change color in Interface Builder/Cocoa

Hi there, For an application that I am developing I need to create a grid of squares. The only relevant property they should have is the ability to change to any color (RGB). 1) What kind of object should I use? Custom? 2) Am I overlooking something? Should I, for instance, be using Core Animation? Thanks in advance. ...

Properly handling NSURLConnection errors

Hi, I have a simple form interface set up that send username and password information to a server: (working) NSString *postData = [NSString stringWithFormat:@"user=%@&pass=%@",[self urlEncodeValue:sysUsername],[self urlEncodeValue:password]]; NSLog(@"Post data -> %@", postData); /// NSData* postVariables = [postData dataUsingEncodin...

get an image representation of active windows in cocoa

how can i get in cocoa a smaller image version of the active windows. just like exposé but i only need a windows. in exposé you see the running version if it is a movie. thank you ...

Calling NSFetchedResultsController & CoreData experts

I am having a few nagging issues with NSFetchedResultsController and CoreData, any of which I would be very grateful to get help on. Issue 1 - Updates: I update my store on a background thread which results in certain rows being delete, inserted or updated. The changes are merged into the context on the main thread using the "mergeChan...

NSImage different size in code different shown by Finder/Preview

I have a couple of images that i use in my application(one of them is attached). The strange thing is that the real image size(shown by finder and preview) is 1200x701 px. When I access image from the code and as for its size, I get 360x210px. What is going on? Code I'm using to get the size of the image: NSImage *newImg = [[NSImage...

Core Data and poor performance

I've been working this issue for a while now and I am open to any best practices/advice. The Example So I created a sample Core Data application. The application is basically a mimic of the AddressBook application. I have the following Entities: Group, Contact, Address, Phone, Email, Webpage, Dates. As you probably are guessing, a Gro...

What does "NS" stand for in Cocoa class names?

Possible Duplicate: What does the NS prefix mean? I'm relatively new to iPhone OS development, and I see NS all the time in various class names, but have yet to come across an explanation for the meaning? Examples: NSObject NSString NSArray ...

NSFetchedResultsController not processing certain section driven moves

I utilize a NSFetchedResultsController (frc) with a Core Data store. I implement all the frc delegate methods. The table is sporadically updated by background threads. All the inserts, deletes and updates work fine, with the exception that updates to the frc's index key for rows toward to the bottom of the table (50 rows), do not result ...