cocoa

Core data and @unionOfSets

Im having trouble using the @unionOfSets on my core-data objects. I have a subclass of nsmanagedobject called list. There is a to-many relationship from list to listElements. and each listElement has a one-to-one relationship with a file. NSLog(@"%@", [NSApp valueForKeyPath:@"delegate.mainWindowController.sidebarViewController.arrayCon...

Unable to find CFNetwork in Xcode

Hello, I am trying to use CFNetwork in my app so I tried adding CFNetwork.framework from the Edit Target dialog in Xcode. The interesting thing is that CFNetwork is not visible in the dialog box at all. Am I missing anything? Do I have to add/install CFNetwork in some other way? Screenshot - Thanks in advance. ...

Go back to main window once secondView is loaded

Hi, I have a Tableview on AppDelegate That calls a SecondView (dvController) when DidSelectRowAtIndexPath using: [self.window addSubview:[dvController view]]; On SecondView I defined a button linked to IBAction that should go back to previous view. It works great but when row selected but, How could then go back to previous view if mai...

Problem with the name of an NSEntityDescription

This problem follows on from a previous question. When I run the following line of code: NSEntityDescription *outputCellEntityDescription = [NSEntityDescription entityForName:@"OutputCell" inManagedObjectContext:[[self document] managedObjectContext]]; I get the followin...

Should I be aiming for no analyzer results when I run Build and Analyze

I have read numerous times that Build and Analyze is not perfect. When I run it, it does turn out some useful information and has definitely improved my code, but it also gives results that are not necessary problems. At the minute I'm changing my code to try and get rid of all the Analyzer results, whether they are a problem or not. Is ...

How to move from Eclipse Carbon to Cocoa 64-bit?

I'm using Eclipse Carbon now and I have some installed Plugins. How to move to Eclipse Cocoa 64-bit without losing the plugins and settings?? ...

NSURL from NSURLConnection?

It seems dead simple, as to create an NSURLConnection I usually do this: NSURL *theURL = [NSURL URLWithString:urlString]; NSURLRequest *req = [NSURLRequest requestWithURL:theURL]; NSURLConnection *connection = [NSURLConnection connectionWithRequest:req delegate:self]; But how can I get the URL back in the delegate methods? Short of ha...

Programmatically check if a process is running on Mac

Is there any Carbon/Cocoa/C API available on Macs that I can use to enumerate processes? I'm looking for something like EnumProcesses on Windows. My goal is to check from code whether a process is running (by name). Thanks! ...

Getting a borderless window to receive mouseMoved events (Cocoa OSX)

I have a little popup window used for selecting images sorted by groups, and I would like to add a selection box around whatever image is being hovered over. I am trying to this by overriding the mouseMoved event for the window but it seems that a window that has a border-less style mask receives no mouseMoved events even if you have se...

How to open a document using an application launched via NSTask?

Hello world, I've grown tired of the built-in open Mac OS X command, mostly because it runs programs with your actual user ID instead of the effective user ID; this results in the fact sudo open Foo opens Foo with its associated application with your account instead of the root account, and it annoys me. So I decided to make some kind o...

Is there any problem for loading images more than 200 from resource folder?

My application contains more than 200 images each with size approx. 15 KB. I want to flip these image one by one. Is there will be any time lag for loading images? Is there any alternate method for doing that? Anyone please help! ...

How to tile the contents of a CALayer?

I would like to tile a CGImage across a CALayer, but it seems to only want to stretch it. The example code: self.background = [UIImage imageNamed: @"Background.png"]; [documentDisplay.layer setContents: self.background.CGImage]; I would like to avoid subclassing if I could. ...

Rotating an image with the image centre as axis of rotation

Hi, How can one image be rotated with axis of rotation as image centre using NSAffineTransform. ...

What is the main difference between framework and dynamic library

Hi all, What is the main difference between frame work and dynamic library ...

Memory management with Objective-C Distributed Objects: my temporary instances live forever!

I'm playing with Objective-C Distributed Objects and I'm having some problems understanding how memory management works under the system. The example given below illustrates my problem: Protocol.h #import <Foundation/Foundation.h> @protocol DOServer - (byref id)createTarget; @end Server.m #import <Foundation/Foundation.h> #import ...

mouse over on image object which was drawn on view

Hi, I have drawn an object on NSView subclass. How can the object know that mouse over is done on it when mouse passes over it. ...

Casting warnings in methods with variable arguments

Sorry if the question isn't correct, I'm very new in Objective-C. I understand why this code throw the Warning: "warning: passing argument 1 of 'initWithObjectsAndKeys:' makes pointer from integer without" NSDictionary *dictNames = [[NSDictionary alloc] initWithObjectsAndKeys: 3, @"", 4, @"", 5, @"",nil]; Keys and Value...

MacOS. How to disable Expose

Is it possible to disable Expose programmatically? ...

How to generate Objective C class files from XML schema?

I have an XML schema that defines my data model. I would now like to have Objective C source files generated from the XML schema. Does anyone know how to accomplish this? ...

How to access pixels of an NSBitmapImageRep?

I have an NSBitmapImageRep that is created like this: NSBitmapImageRep *imageRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL pixelsWide:waveformSize.width pixelsHigh:waveformSize.height ...