I have some code to do this (which is below) but I get one error stopping it from working and the error is ''MyOutlineView' may not respond to '-objectArray'', it says that it needs to be declared but I don't know what code I should use in the Header File to declare it.
The Code:
- (void) outlineView: (NSOutlineView *) aView
willDispla...
I know there are many questions and answers about this, but I am looking for an efficient and robust solution. I need to kill a process AND all it's child processes from within a Cocoa app. I got the process ID and what I am about to code is to execute the kill command like so
kill -- -<parent PID>
from within my app ... but that seem...
I want to pass my textview content to a server via post request but I guess I have a problem with encoding. Do | have to convert say blanks to + or %20 by hand or is there a library supported by cocoa or any other 3rd party? Is this sth trivial ? I got stuck with this simple step for hours! :)
...
Core Data allows you to add multiple persistent stores to a single NSPersistentStoreCoordinator (each with a different configuration) name, thereby bringing them together in a single NSManagedObjectContext. What I haven't been able to find out is how Core Data handles atomicity of a save operation for multiple stores.
Let's say I have t...
Using LINQ in .Net I can select items from an array that match a particular criteria i.e. from an array called People:
var cleverPeople = People.Where(o=>o.IQ>110);
Is there anything similar I can do to an NSMutableArray? I have many items in it and enumerating it with a loop is pretty costly performance wise.
...
Hello,
a small problem I have right now.
I want to execute a method when the Enter key is pressed in a NSTextField.
The user should be able to enter his data and a calculation method should be executed as soon as he hits the enter key.
...
I think Xcode is a good IDE, but having used Eclipse for Java development in the past I am quite underwhelmed by XCode's code completion and error/warning feedback. (Most of the time, XCode seems to simply try to match the beginning of a text fragment to "words" in the same document, without even using type information to try to determin...
I am monitoring my application using Activity Monitor and whenever NSOpenPanel is called the application appears as having 9 threads and stays like that until the application is closed.
Is there a way to release those threads?, Or am I simply misunderstanding what the threads number means?, surely it isn't a good thing to have them open...
Is there a way to get an NSDictionary back from the string created via its description method?
Given this code:
NSDictionary *dictionary = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"value 1", @"value 2", nil] forKeys:[NSArray arrayWithObjects:@"key 1", @"key 2", nil]];
NSString *dictionaryString = [dictionary descr...
Hi Everyone:
I am wondering how to get a NSFileManager listing to display the results in the order that the Finder sorts them. By default, this code:
NSFileManager *fileManager = [[NSFileManager alloc] init];
NSError *foundErrors = nil;
NSArray *contentsOfDockDirectory = [fileManager contentsOfDirectoryAtPath:@"/Users/me/Desktop err...
Hi Everyone:
I am making a test fullscreen application using this guide:
http://www.cocoadevcentral.com/articles/000028.php. However, I am running into a problem when I want to get key input. For
some reason, it seems that when you set the NSPanel to take up the screen,
you also loose the ability for it to get the key down events. I ...
-(void)myButtonclick {
NSString *data=[[NSString alloc]initWithString:@"YES U PRESSED BUTTON"];
UIButton *refreshbutton=[UIButton buttonWithType:UIButtonTypeCustom];
[refreshbutton setFrame:CGRectMake(15.0f, 330.0f, 150.0f, 32.0f)];
[refreshbutton setCenter:CGPointMake(80.0f,340)];
[refreshbutton setBackgroundImag...
Now I want to transform a Array from object_c to javascript, just like label1 , label2 , label3... in the array. I use this method :
WebScriptObject* win = [webview windowScriptObject];
NSMutableArray *nameArray; // in this have some file name : label1,label2...
[win callWebScriptMethod:@"transArray" withArguments:nameArray];
and the...
upon being asked about subscribing to hardcopy periodicals concerning Macintosh development, I could only think of 'MacTech'.
are there any others? (and are they any good?)
thanks for your opinions.
...
Background:
I'm creating a hierarchy of composite dictionary data structures in Objective-C, and am inheriting from NSMutableDictionary so these classes can be used everywhere an NSDictionary/NSMutableDictionary is called for. (Just so people don't think I'm reinventing the wheel, each one uses a CFMutableDictionaryRef, plus some additi...
I followed the A Cocoa application driven by HTTP data blog post and have been able to successfully use the following URL to grab the HTML to use in my sample app:
http://www.argos.co.uk/static/Home.htm
However, when I use the following URL in my sample app I am not able to grab the HTML content and app just quits:
http://www.argos.co...
I have an Xcode project of RubyCocoa and need to debug it. Leopard already comes with Ruby installed. I read that there is a need to install a debug-ruby. My question is:
RubyCocoa site says that in order to debug Ruby a debuggable version should be built in the ruby source directory. Where should I build it on Leopard?
Thanks,
Nava
...
Hi Everyone:
I'm wondering if there is some way I can stop a launchd task when a application is open, and then start it again when the application is closed. My launchd task is set to be notified when a file is changed and then do some UNIX code with the file. However, my application makes a lot of changes to this file so I can't have...
I have made a short applescript that sends an email with attachment. Now I want to integrate this script in my cocoa application. I have tried the following code that i found on the internet:
NSAppleScript *mailScript;
NSString *scriptString= [NSString stringWithFormat:@"the applescript"];
mailScript = [[NSAppleScript alloc] initWithSou...
I have added a custom button (subclass UIButton) to my navigation bar but the button does not change states when clicked.
The button is configured correctly as it does work in, for example, a table view.
All advice is welcome.
...