I have a core data model which includes an entity with a to-many relationship. I have set the relationship to non-optional and set the 'min count' to one. However, I can't work out a way of acting on this rule once it has been breached. Ideally I'd just like the entity deleted... but I can't figure out a way to do this automatically, or ...
When I select a row in my outline view (connected to a NSTreeController) and click the remove button it doesn't delete the row that I have selected but actually deletes the row at the bottom of the table.
For some more information here is my Connections for the Button:
http://snapplr.com/t1hm
and the Entity model:
http://snapplr.com/k...
I'm programmatically observing the arrangedObjects of an NSArrayController and am having problem getting the index where something was changed.
Is it at all possible to get the Index/IndexSet where the change occured. It seems like it should be, since NSKeyValueChangeIndexesKey is defined for the change-dictionary. When inspecting the ...
Why isn't my UILabel being changed? I am using the following code, and nothing is happening:
- (void)awakeFromNib {
percentCorrect.adjustsFontSizeToFitWidth;
percentCorrect.numberOfLines = 3;
percentCorrect.minimumFontSize = 100;
}
Here is my Implemintation code:
- (void) updateScore {
double percentScore = 100.0 * va...
I have an array of dictionaries.
I want to filter the array based on a key.
I tried this:
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(SPORT == %@)", @"Football"];
NSArray *filteredArray = [data filteredArrayUsingPredicate:predicate];
This doesn't work, I get no results. I think I'm doing something wrong. I know th...
I think I'm missing something pretty basic here. I have a Utilities class that has some functions that are called from a few different classes. I want to be able to include Utilities.h and just say [Utilities doStuff] and have the doStuff function in Utilities.m be executed, what's the easiest way to do this?
...
Just curious, what files are included when <Foundation/Foundation.h> or <Cocoa/Cocoa.h> is #imported? The framework and all the files in /usr/include?
...
Hi, I am new to mac developing, and kind of confused. I am trying to create a program with a toolbar, but can't seem to get it working. Can anyone explain me the steps needed to do this?
Beside, is there any control on the mac developing system similar to iPhones UITabBarController?
Thanks, Hans Espen
...
Hi,
I want to draw my own tabs for NSTabViewItems. My Tabs should look different and start in the top left corner and not centered.
How can I do this?
...
I'm looking for tools and approaches to determining what parts of of my Cocoa and Cocoa-Touch programs are most contributing the the final binary image size, and ways to help reduce it. I'm not looking for a "magic bullet" compiler flag. I'm looking for profiling techniques for evaluating and reducing image size waste in the same vein as...
I've Declared a string Like so
NSString* fileName = [files objectAtIndex:i];
NSLog(fileName);
NSImage* imageFromBundle = [[NSImage alloc] initWithContentsOfFile:fileName];
and want to use that filename to open a file in a different directory.
I came up with this
NSImage* imageFromBundle2;
imageFromBundle2 = [[NSImage alloc] i...
Why am i getting this weird error?
Any Ideas?
implementation:
#import "VideoView.h"
#import <MediaPlayer/MediaPlayer.h>
@implementation VideoView
@synthesize player;
- (void)playVideoWithURL:(NSURL *)url showControls:(BOOL)showControls {
if (!player) {
player = [[MPMoviePlayerController alloc] initWithContentURL:url];
...
Is it possible to launch a window in an NSView subclass by clicking a NSRect? I have tried makeKeyAndOrderFront but this doesn't work.
...
How would you make the text in a check box cell able to be edited like in a text cell instead of it just checking the Checkbox? The thing is that the Checkbox is Boolean in the Core Data Model and the Text is a String, so I don't know how I would make this work.
...
This Is Similar To One Of My Earlier Questions That Never Got Answered.
I would like the Dock Icon to use the method makekeyandorderfront to open the Main window after it has been closed. I have done this with a button opening a Window but I don't know how to do it with the Dock Icon because you can't make a connection to it in interface...
I just realized for my cocoa application I can set the garbage collector setting for the target but also for the project.
My app did crash since I activated GB only in the project properties not in the target properties like I used to do. Changes in the project settings did not apply to the target settings. What use is the Garbage Coll...
I want to set the images in my outline view to the system icons, just like on the left in the Finder. I want to get icons like Application, Documents, Desktop, etc. How do I do this?
...
Hi basically I am lost in apples documentation and not sure where to start on this.
I need to record the audio from applications running on my system, similar to audio hijack and wiretap studio pro, but I am unsure where to start with the audio captuer. I see reference to quicktime capture documentation but it is not clear how to achei...
Is there a way for my iPhone app to add media (mp3s) not in its iPod library to iTunes once the user plugs/syncs to a desktop such that the media will get sync'd back into the iPhone's iPod library?
I know the question is rather general, but if it is indeed possible, can anyone nudge me in the right direction?
...
Hi,
I am a newbie in the Mac world.
I need to create an app that is able to extract information entered on a web page, from text fields. My app will load a webpage hosted somewhere, and within the webpage there will be a a series of text fields and a submit button. Once the button is clicked, I must be able to read the information ente...