I have what I assume is a fairly standard setup, with one scratchpad MOC which is never saved (containing a bunch of objects downloaded from the web) and another permanent MOC which persists objects. When the user selects an object from scratchMOC to add to her library, I want to either 1) remove the object from scratchMOC and insert int...
Hi all,
I tried sample example given at this link - Collection View Programming Guide
It is simple and it worked. Considering it as a reference I tried a simple application which will show a collection view of web views with some web page displayed over each web view.
The model class has two properties: NSString *pageName, and NSURL *...
I've done a complete clean uninstall of XCode and deleted the prefs and deleted complete /Developer folder and reinstalled XCode again.
I create a new Cocoa application, go over to Target, doing a "Get info" in the target and enable "C / C++ compiler version" to "LLVM compiler 1.0.2" and press Build.
I get:
ld: warning: directory '/us...
I've read that -hash does not return the same value on different architectures. However, I don't currently see this in the docs.
Is there a better way to store NSView's in a dictionary without subclassing?
...
Hi, I'm creating a web-browser type app (using a web view object) that needs to be able to connect to the internet via a proxy. Server, port, username and password can all be hardcoded into the app but unfortunately I have no idea how to customise the proxy settings of a web view without changing the system wide proxy settings.
If you k...
Does the QTKit Capture API support screen recording- i.e., can I specify the current screen output as the input source to record? If so, how?
Quicktime Player X supports screen recording, yet the QTKit Capture API Documentation only mentions capturing from external cameras.
...
Let's say I have the following headers:
@interface SuperClass : NSObject
@interface SubClass : SuperClass
I'm alloc'ing an instance of the class by doing:
SubClass *sc = [[SubClass alloc] init];
In my SuperClass.m:
- (id) init
{
self = [super init];
if (self != nil)
{
NSString *cString = NSStringFromClass([self class]);
...
Imagine if you will a Core Data app with two entities (Employee, and Department). Employees have a to-one relationship with department (department) and the inverse is a to-many relationship (employees). In the UI you can select individual Employee entities and edit the details in a detail area (there are of course other attributes and th...
I need to get list of installed applications on leopard / snow leopard. Can any one suggest me how I can get list of installed apps using my cocoa application.
I have tried using "system_profiler SPApplicationsDataType". Problem with this is it just lists out *.app files, which includes the drivers as well. Is there a way to get only li...
I've found a bunch of posts on this problem and have actually managed to removed one of the warnings i was getting from these however one persists.
Some context: I'm creating currency converter as an exercise in learning Objective C
My Rate class represents a rate that a currency can be converted to or from looks like this:
Rate.h
//...
Hi,
I am running a mainLoop in Cocoa using an NSTimer set up like this:
mainLoopTimer = [NSTimer scheduledTimerWithTimeInterval:1.0/fps target:self selector:@selector(mainloop) userInfo:nil repeats:YES];
[[NSRunLoop currentRunLoop] addTimer:mainLoopTimer forMode:NSEventTrackingRunLoopMode];
At Program startup I set the ti...
hey all
I am using two QTMovie object for playing a two mp3 file. I want one mp3 file sound came from left speaker and another mp3 file sound come from in right speaker. Also i want how to manage left and right speaker sound.
Please suggest,how can I do this.
Thanks
Mandeep
...
NSString *soundFilePath = [[NSBundle mainBundle] pathForResource:@"Opening" ofType:@"wav"];
NSURL *fileURL = [[NSURL alloc] initFileURLWithPath: soundFilePath];
NSLog(@"@ajay");
AVAudioPlayer *audioPlayer =
[[AVAudioPlayer alloc] initWithContentsOfURL:fileURL error:nil];
[fileURL release];
[audioPlayer play]; ...
How would I make the following calculator Class work?:
//Calculator.h
#import <Cocoa/Cocoa.h>
@interface Calculator : NSObject {
float initialNumber, operandNumber;
typedef enum{
additionOperation,
subtractionOperation,
multiplicationOperation,
divisionOperation
}operationType;
}
@property(readwrite) float...
Hi All,
So We have a really old project that is all Carbon. We need to modify the way we open and save files and the dialog code we use is to old, so I wanted to create this new in Cocoa.
How does one create a Cocoa Class that can be called from Carbon?
What Cocoa routines would I use to create open and save dialogs and present them t...
I'd like to allow the user to rotate a wheel displayed on the iphone. The center of the wheel is the center of the screen. For now, I manage to rotate correctly in basic situations, following the finger gestures.
However I have troubles when I try to react to "throw" gesture: I can't determine the rotation direction from user touches.
...
I'm developing a System Preference Pane that runs a background application. I'm planning on codesigning the background application and I'll be using the kill flag of codesign (http://gemma.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man1/codesign.1.html). From my understanding, this kill flag will not allow the backgrou...
I have a small Foundation application that checks a website and plays a sound if it sees a certain value. This application successfully plays a sound when I run it as my user from the Terminal.
I've configured this app to run as a LaunchDaemon, with the following plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//...
Hello,
I'm trying to build a small app which allows downloading of multiple files at the same time while displaying them in a custom NSTableView. This works, i've done this by using an NSEnumerator, but I struggle at getting the progress right. It's calculated correctly, but it's not done individually for every download, instead they're...
Hallo @ All
I ran into the same problem as desciped in http://stackoverflow.com/questions/1884491/crashing-while-trying-to-move-uitableview-rows!
All I want to do is on specific reranging operations insert a new cell or delet the selected one!
Sometimes I get a
* Assertion failure in -[_UITableViewUpdateSupport _setupAnimationForReord...