Hey all,
I have a HUD window that has some labels on it, and I want this to show when the user presses a button. I know this is simple, but I can't get it to show again unless I restart my program.
Sincerely,
Kevin
...
I created a Fetch Request template in the Predicate Builder in Xcode. Because there are some variables that I want to subtitute with the actual value when executing the request I am using the following method.
-(void)NSManagedObjectModel fetchRequestFromTemplateWithName:substitutionVariables:
My request contains a subquery and the var...
Note: I'm relatively new to Objective-C and am coming from Java and PHP.
Could someone explain to me why I always have to first allocate and then initialize an instance?
Couldn't this be done in the init methods like this:
+ (MyClass*)init {
MyClass *instance = [MyClass alloc];
[instance setFoo:@"bla"];
return instance;
}...
I am using Xcode 3.2 on 10.6, with the shipped version of gcov and default GCC compiler (both version 4.2.1). I have created a dependent Cocoa unit test bundle which is injected into my app, and followed Apple's documentation on setting up a gcov-instrumented build configuration - based on the Debug configuration which doesn't have any c...
How would I do this? I think this has something to do with editing the Outline Views Data Source file. The Outline View is currently is being used with Core Data.
...
There are tutorials for using a webkit view inside a cocoa application to achieve skinnable contents, but what would I do if I wanted to use webkit to create custom, skinnable windows?
Examples would be dashboard widgets, or
BowTie
Beware, I'm a noob.
...
How would I do this?
The Outline View is being used with Core Data.
...
I have multiple NSURLConnections running providing data back to the delegate objects. Is it safe for these delegate objects all to store their data into a single instance of an sqlite database connection?
ie Do the callbacks to the delegates come back in on different threads?
...
Is there a simple way of animating rows in an NSTableView?
I'd like to be able to do something like flash a row, or fade out a row.
Essentially - to provide a bit of visual feedback when rows are added or removed.
Edited to add:
I'd had a quick look over Google before posting this; but I wanted to know if there was some way to do thi...
I'm using the IOBluetooth Cocoa framework to communicate with a bluetooth device. So far I have gotten down the whole process of discovering the device and its services, pairing with it, connecting to it and now I want to send some actual commands, but I'm having some trouble with it. Below is an graphic from the spec for the AVRCP profi...
What is the best way to listen to a folder or file to see if it has been saved or if a new file has been added?
...
Hi!
In advance: sorry for the noob question but I'm learning Cocoa & Objective-C and I have this problem on which I've been searching for a complete hour. It'll be very nice if someone could find the problem!
Here's my two files:
Driver.m
#import "Driver.h"
@implementation Driver
- (int)go:(BOOL)distance {
if (distance) {
return ...
I have an NSControl subclass (which is configured as a layer-hosting view, although I doubt that's relevant). I've been attempting to write the code to get and display a context menu. However, neither menuForEvent: or rightMouseDown: are being called. Any idea what could be causing that? Other mouse events work correctly.
As an aside, ...
I love cocoa style keyboard shortcuts and am constantly frustrated that Terminal doesn't behave in the same way. Does anyone know how to set common cocoa-style keyboard shortcuts in Terminal.app?
I found a blog post that describes how to do this in iTerm: http://blog.jcoffin.com/2008/12/06/mac-keyboard-shortcuts-iterm/. However, I like...
Given an NSArray of NSStrings, is there a quick way to join them together into a single NSString (with a Separator)?
...
I have a document-based Core Data app. My main Core Data entity has several string fields, most of which are bound to NSTextFields, but one is bound to an NSTextView.
I am using the technique for view switching (with multiple view controllers) as explained in the Hillegass book. All of my subviews are controlled by a ManagedViewControll...
In Cocoa, a drawer can be attached to a window using the setParentWindow: method. Is it possible to attach a drawer to a view in some way?
...
In my setup I have an NSCollectionView of volumes connected to the mac. For the NSCollectionViewItem's View I have an NSBox with an NSTableView inside listing the contents of that volume.
My problem comes when trying to add/remove items to the NSTableView. The NSBox seems to be initialised once, so there is only one NSTableView. This me...
Something I have been wondering about properties for a while. When you are using properties, do you need to override the release message to ensure the properties are released properties?
i.e. is the following (fictitious) example sufficient?
@interface MyList : NSObject {
NSString* operation;
NSString* link;
}
@property (retain) NSStri...
I'm writing a minimal web browser using Cocoa. I've been struggling in my attempt to create an address bar ( basically an NSComboBox in which the drop down contains previously visited URLS ).
The main issue is that the backForwardList attribute of my WebView object is updated at unpredictable times. For instance, if I select a url fro...