Hello, I am a objective-c newbe and am wondering how to run a shell script in objective-c easiest way possible. I don't care about any of the output. I have tried system(), exec() and execl() and an NSTask. Those methods don't work for some reason... This is the shell script I am trying to run:
"mount_webdav http://idisk.mac.com/idi...
Hi there,
I want to print a specific NSView. When I do this, I wish to add content to the header of the print page.
e.g. If the NSView contains a picture of a cat, when I press print, print preview shows up with the picture of the cat. I want the print out to be a picture of a cat, with the caption: "Cat" in the header, which I do not...
What is the advantage of using something like NSInteger instead of int in code? I see this in examples a lot, including Apple's official code samples.
...
I found some programs can put into the Dashboard , and most of them have a feature: when click the "i", the panel will turn over and show another panel , How to implement it ? and how to put a program into a Dashboard? Thank you very much!
...
How would I go about programming a HUD type overlay in OSX.
I want to be able to have an application that will display text at a certain point over a different application's window.
And thus if the (other applications) window moves the HUD part will stay at the same coordinate of the other window.
...
So this is my first posting on StackOverflow, so excuse me if my request is not well formed.
I am attempting to load a variable with type NSString into an NSURL with the following line:
audioPlayer = [[AudioPlayer alloc] initPlayerWithURL:[NSURL URLWithString:aArchiveItem.streamURL] delegate:self];
And in AudioPlayer implementation I...
I was wondering how do I go about creating an NSArray with say numbers 1-100 to be used in a UIPickerView.
I know from other programming classes I could do:
int array[100];
for (int i=1, i<=100, i++)
array[i]=i;
But I am not sure how to something equivalent with NSArray, instead of manually typing in all the values. I searched it...
I would like to offer tutorial text that changes depending on the number of mouse buttons available. For example, if there are two mouse buttons the text would say "Right click" whereas if there's only 1 button the text would say "Ctrl+click". Is there any API in Cocoa or Carbon that can identify the number of available buttons on the ...
Hi all,
I have a problem, and I reckon there's a really straightforward solution to it, but I can't fathom it out!
I have this piece of code:
NSManagedObjectContext * context = [[NSApp delegate] managedObjectContext];
NSManagedObjectModel * model = [[NSApp delegate] managedObjectModel];
NSDictionary * entities ...
Hello I am wondering if there is a way to animate a window in objective-c using core-animation or quartz. I would like to fade out a window when I close it. My OSX operating system is Tiger.
Edit: Is it possible to do the same with an applescript application in Xcode by somehow calling a method from objective-c or another way?
...
I want to run a simple command from my cocoa app through code, NOT creating a shell script and running it that way, but by running it through the application, being able to define everything and change it on the fly
...
I've been going through the screencasts here to learn how to write a table-based iPhone application, and it's been going pretty smoothly so far. Presently I'm halfway through the third episode, and it's starting to hit a snag.
In order to remove temporary hard-coding for the top layer of the table, the tutorial creates an NSMutableDici...
I want to create a drag and drop zone (using an NSView) for ANY file in my cocoa app. How do I do it?
...
I am trying to create an mac application in XCode that has some of its implementation in a dynamic library.
I added a new target (dynamic library) to my XCode cocoa project and after a bit of fighting with frameworks and precompiled headers, have the dynlib compiling - and running successfully from the debugger.
When run standalone how...
Background
I'm using UKCrashReporter in my app.
I've installed my own Uncaught
Exception Handler.
I'm setting up the
managedObjectContext of the object
activeItemController in
applicationDidFinishLaunching (1)
The Problem
If the managedObjectContext method throws an exception, the crash reporter dialog box only flashes up before th...
I've been using Core Data for about a week now, and really loving it, but one minor issue is that setting default values requires going through and setting up a temp interface to load the data, which I then do away with once I have the data seeded. Is there any way to edit values in a table, like how you can use phpMyAdmin to manipulate...
I am initializing a NSManagedObject subclass using:
- (void)setValuesForKeysWithDictionary:(NSDictionary *)keyedValues
I am also knowingly giving it the undefined keys, which of course should through an exception.
So, I have implemented:
- (void)setValue:(id)value forUndefinedKey:(NSString *)key
If a key is undefined, I map it to ...
I am trying to create a Mac OS X Cocoa based application with data displayed in a tabular format, but the data needs be displayed vertically in one column per entity instead of the standard NSTableView one row per entity functionality.
Is there an appropriate Cocoa class for this? Essentially I'm looking for a "horizontal" table of NSCo...
I have a set of plugins, a plugin framework for common code and a host app. These are each in separate Xcode projects (including separate projects for each plugin). In the end, I need to be able to click build and run on the host app project to build all the plugins, the framework and host app, package them up and launch the app.
I kno...
I thought caseinsensitiveLocalizedCompare: would take care of this (that is not including "the" and "a" in the comparison) , but it does not.
(Also, In response to the first answer below, I understand that "case insensitive" part wouldn't help, but I thought that the "localized" part may help.
I can't find any options to do this and g...