The user will be able to add or change some value (property in my model with Core Data) in one view, when the user switch to another view, I want to show the newly added/changed value with an animation.
Is there a way to get a notification that there has been a change or an update for a property with Core Data?
...
I'd like to override UILabel's setText method but I'm not sure that A) it's possible and B) if maybe there's a better way to achieve what I'm trying to accomplish.
I have a subclass of UIView that has a UILabel property as one of its subviews. I'd like to know when the UILabel's "text" property changes so I can adjust the size of the r...
When debugging in Xcode, how do I simulate a user starting my Cocoa droplet application by dropping one or more files onto it's application icon?
The app just opens, processes the files while displaying it's progress and then closes again.
Passing arguments (via the "Arguments" tab of the entry under "Executables") should allow this, b...
I'm trying to make a color chooser using an NSPopupButton, and at the bottom i'd like a separator and a "Custom…" option. Is it possible to load the colors from array, then tack the separator and "custom" item on bottom? if so, how?
Thanks!
...
I am attempting to read audio data via AudioQueue. When I do so, I can verify that the bit depth of the file is 16-bit. But when I get the actual sample data, I'm only seeing values from -128 to 128. But I'm also seeing suspicious looking interleaved data, which makes me pretty sure that I'm just not reading the data correctly.
So to be...
Hello,
Apologies for the seeming obviousness of this question, but for whatever reason I haven't been able to find a definitive answer in the Apple documentation about where and how Settings.bundle password info is stored. My question: if I need to store some credentials for an app, and I use a Settings.bundle so that the password is en...
I've got an NSArrayController that contains a few elements. These elements has got a few attributes like 'name', 'interformation' etc.
What i want is simply to find an element in the NSArrayController which has the name attribute set to, lets say, 'Mads'.
Since efficiency isn't an great issue here i would just do a linear search by i...
I've got an NSSplitView with an NSScrollView in the bottom view. The problem is when I collapse, and then re-open (un-collapse) the bottom view, the height of the scroll view is beyond the height of that bottom view so the top part of the scoll view is being clipped. I've got my scroll view and my split view set to autoresize in all di...
How can I set a key equivalent for a NSToolbarItem?
...
I have an attribute in a Core Data Managed Object that I'm trying to update dependent on another attribute.
How can I implement a method that is called every time the original attribute is changed?
awakeFromInsert and awakeFromFetch obviously won't work.
I've seen keyPathsForValuesAffectingValueForKey but I don't really understand how ...
Hi I have the following code:
- (IBAction)runTask:(id)sender {
NSTask *proc;
NSPipe *output;
NSData *data;
NSString *buffer;
proc = [[NSTask alloc] init];
output = [[NSPipe alloc] init];
[proc setLaunchPath:@"/bin/sh"];
[proc setArguments:[NSArray arrayWithObjects: @"-c", @"/usr/bin/otool -L /Applicatio...
I created a method to build URLs for me.
- (NSString *)urlFor:(NSString *)path arguments:(NSDictionary *)args
{
NSString *format = @"http://api.example.com/%@?version=2.0.1";
NSMutableString *url = [NSMutableString stringWithFormat:format, path];
if ([args isKindOfClass:[NSDictionary class]]) {
for (NSString *key in...
I'd like to be able to pass command line arguments to programs that are run/debugged under Xcode. I want to do this so that I can command-line enable debug modes using Cocoa's NSUserDefaults and NSArgumentDomain.
How to do that?
Thanks!
...
I have a bug I'm struggling to track down. I believe what's happening is that I'm deleting an object from the underlying database whilst another managed object context (in another thread) has a fault on it and gets the 'NSObjectInaccessibleException' when it tries to fulfil the fault.
The scenario is that I have a view accessing the dat...
I currently open an https connection to a web server using NSURLConnection. Everything works as it should and I am able to retrieve the page content I am after. The certificate is issued by VeriSign and I assume NSURLConnection does some work to verify the authenticity of the certificate to some extent? If I connected to the same website...
I have a webView in my cocoa application (macosx not iphone), it displays some javascript to the user but I don't want the user to be able to select any of the text or right click and select the reload option.
Is there a simple way to disable all interaction with the webView?
I know on the iPhone its easy to disable user interaction bu...
I am having trouble trying to do a partial get request using NSURLMutableRequest.
I set up the header values as follows:
NSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:url];
NSString* range = [NSString stringWithFormat:@"bytes %d-%d/%d", receivedContentLength, expectedContentLength, expectedContentLength];
[request ...
Hello everyone,
I'm working on a small free Cocoa app that involves some SFTP functionality, specifically working with uploads. The app is nearing completion however I've run into a pretty bad issue with regards to uploading folders that contain a lot of files.
I'm using ConnectionKit to handle the uploads:
CKTransferRecord * record;...
In Cocoa, addObserver:forKeyPath:options:context: retains "neither the receiver, nor anObserver". Therefore I assume observing self is allowed; that is, it's perfectly valid to do something like
[self addObserver:self forKeyPath...]
As long as you remember to unregister self as an observer as the first thing in dealloc.
Is this assump...
Hello,
I want to send an email from Cocoa in an asynchronous manner. I have downloaded Pantomime source code and compiled it, then got the framework from the build folder. I have added the Pantomime framework in my app. Now my problem is when I add the import satement like:
#import <Pantomime/Pantomime.h>
I got these build errors:
...