I'm trying to access a relationship (one to many) programatically.
My Data model contains an NSManagedEntity called language (with a two string attributes)
with a relationship to an entity called WordCategory (one-to-many).
I use an NSFetchRequest to get all the Language entities. that works fine.
I get the valueForKey for the relationsh...
For most actions, I just click and drag in InterfaceBuilder to "wire up" a call from some interface object to my code. For example, if I want to know when the user single-clicks a row in a table, I drag a connection from the table's action to my controller's action.
But now let's consider the user double-clicking a row. If I want one of...
For quickly mocking up UI, I'd like to be able to drag buttons onto a view in interface builder, then drag a connection from that button to the view that should appear when you click it.
A subclass of UIButton is a little inconvenient to use in IB, so I'd prefer to add the behavior to UIButton itself. Unfortunately, it seems like outlet...
Hi all.
I'm developing an "installation" like cocoa application wich needs to take care of some http request, some file system reading, copying files to /usr/share, set up cron (not launchd) and ask some information to user.
I discarded PackageMaker since I need more flexibility.
Currently everything is going well, but on my last instal...
I think I may be missing the obvious but I'm not sure.
The section on subclassing NSDocument in the docs states that subclasses of NSDocument must override one reading and one writing method.
If I'm creating a viewer application that will not write anything back, do I still need to override a writing method (returning what, nil?) or ca...
Hello,
I'm new to cryptography and I'm building some test applications to try and understand the basics of it. I'm not trying to build the algorithms from scratch but I'm trying to make two different AES-256 implementation talk to each other.
I've got a database that was populated with this Javascript implementation stored in Base64. N...
Hey there,
I have a mutable array that contains mutable dictionaries with strings for the keys latitude, longitude and id. Some of the latitude and longitude values are the same and I want to remove the duplicates from the array so I only have one object per location.
I can enumerate my array and using a second enumeration review each...
I'm really having trouble getting a Cocoa Table View cell to send action messages.
At the most basic level, in IB there is an action assigned for the NSTextViewCell object, and after editing and pressing Return nothing happens.
So I have an IBOutlet hooked up to the NSTextViewCell, and have been experimenting with NSActionCell messages...
Take a look at the top pane of the Xcode window.
There's a table list, with checkboxes in one of the columns. That's the interface I want to do.
So how do you nest a button in an NSTableView cell?
...
I know how handle dragging of files on the dock icon, and it has been asked before.
However, I'm wondering, can I somehow get more control?
For example, can I make the dock icon reject files that are not in the user's folder and allow only files that are in the user's folder?
I'd rather do that instead of the app appearing as if it ha...
I have an NSImage which I am trying to resize like so;
NSImage *capturePreviewFill = [[NSImage alloc] initWithData:previewData];
NSSize newSize;
newSize.height = 160;
newSize.width = 120;
[capturePreviewFill setScalesWhenResized:YES];
[capturePreviewFill setSize:newSize];
NSData *resizedPreviewData = [capturePreviewFill TIFFRepresentat...
I'm creating an iTunes clone in Cocoa (don't ask why, it's not evil) and I want to be able to sync my iPod with it. This means: music, photos, videos and podcasts. I couldn't really find anything, since Google only shows articles about iPod touch and iPhone programming, but I'm actually creating a desktop application for Mac OS X, and I ...
I'm trying to implement typewriter scrolling in my Cocoa text editor, keeping the insertion point centered vertically in its scrollview.
Toward this end, I have subclassed NSClipView to provide a scrollToPointWithoutConstraint method, which scrolls the document to a specified point without calling constrainScrollPoint. This is necessary...
Hi,
In my program, I'm grep-ing via NSTask. For some reason, sometimes I would get no results (even though the code was apparently the same as the command run from the CLI which worked just fine), so I checked through my code and found, in Apple's documentation, that when adding arguments to an NSTask object, "the NSTask object converts...
I have an NSString that will be something like "xxxx (yyyyy)" where x and y can be any character. I'd like to extract just the y from inside the parenthesis. I managed to extract the x using a NSScanner but I haven't figured out the proper way to extract out the y.
...
Does anyone know of an Objective-C framework that takes care of registering an app? I'm interested in the GUI/30-day trial side more than the actual verifying of serial numbers.
...
I'm trying to track down some peculiar memory behavior in my Cocoa desktop app. My app does a lot of image processing using NSImage and uploads those images to a website over HTTP using NSURLConnection.
After uploading several hundred images (some very large), when I run Instrument I get no leaks. I've also run through MallocDebug and ...
I'm building a carArray and want to filter the contents conditionally, using an NSPredicate, like so:
NSPredicate *pred;
switch (carType) {
case FreeCar:
pred = [NSPredicate predicateWithFormat:@"premium = NO"];
break;
case PremiumCar:
pred = [NSPredicate predicateWithFormat:@"premium = YES"];
break;
default:
p...
Hi,
I have obtained the crosshair cursor from NSCursor crosshairCursor. Then, how can i change
to it. I don't want to call enclosingScrollView to setDocumentCursor as
[[view enclosingScrollView] setDocumentCursor:crosshaircursor ];
...
I am looking for a solution to create a "virtual" webcam device under OS X (that acts just as a normal hardware webcam, but the application has full control over what to output). I'm fairly experienced with C++, but not so much with Objective-C and OSX/Cocoa programming.
Anyone that can point me in the right direction, where to look and...