I'm rather confused about properties and instance variables in Objective-C.
I'm about half-way through Aaron Hillegass's "Cocoa Programming for Mac OS X" and everything is logical. You would declare a class something like this:
@class Something;
@interface MyClass : NSObject {
NSString *name;
NSArray *items;
Something *so...
How do I set an action for when a user double clicks an NSCollectionViewItem. NSTableView, for example, has the setDoubleAction method. Is there something similar for NSCollectionView?
Thanks
...
One question is : Now I want to add a new Menu at the end of MenuBar, not to add a menuitem at the known menu. just like the Xcode Items: The last menu is Help , I want to add a new Mneu(MyMenu) behind the Help Menu ? How to do ? Thanks very much!
...
Hi,
I am working in Mac OS X, 10.6
How can i set the image perspective of any image?
I do not want to use CoreImage.
Is it possible to do it via NSAffineTransforms.
Regards,
Dhana.
...
Hi,
I'm trying to use libpq, the client library for PostgreSQL in a Cocoa app.
First thing, adding the header files: I tried adding the path to the PostgreSQL header files under User Header Search Path on my project's properties and then compile but for some reason XCode can't see them. The solution was to manually add the files and a ...
Hi,
I'm animating the center property of a view in my program. During the animation, I need notifications when center hits a particular value.
I tried adding the myself as a key value observer for the center property of the view . However, I only get notified when the animation begins. So I'm unable to detect if/when the object passes ...
For my application I want to set a custom length and width for my NSWindow from within the application itself. I have everything set up (the NSTextfields) however I'm stumped with how I should do it.
...
Using the following doesn't work:
- (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target withString:(NSString *)replacement
By doesn't work I mean does not do any replacement what so ever. It returns the same exact string.
Is there a convenience method to do this? Similar to:
- (NSString *)stringByReplacingPercentEsca...
I have a worker thread that I want to do one bit of its task, then pause & wait for the "ok, continue" command from another thread, then pause & wait, etc.
The use case is: the controlling object is a view that I want to display information about what's going on inside the worker-thread, and allow me to "single-step" through the worker ...
I am looking to make a Mac version of one of my iPhone apps and was looking for a good ay to hit the ground running. I know how to code in Objective-c and Cocoa, and I know how to piece something together from scratch if I have to, but I am looking for an easier way.
Are there any open-source templates for coding Mac desktop applicatio...
I have an iPhone app that uses Core Data.
I did an update and used Lightweight Migration to go from V1 to V2 of my MOM (Managed Object Model). This worked perfectly.
What happens when I want to go to V3 (and beyond) of my MOM?
If I decide to continue with Lightweight Migration, will it automatically deal with migrating from V1 to V3...
Hi Everyone,
I am in the process of learning Objective-C for Mac/iPhone development and decided to try and write something useful without looking at the bible (Aaron Hillegass: Cocoa Programming 3rd Edition).
I'm writing a simple puzzle game. The data that defines the levels is stored as a string in a SQLite database and read into a le...
What's the best way to log an NSError?
- (void)epicFail:(Lol *)aLol withError:(NSError *)error
{
NSLog(@"Error: %@", error);
}
Gives me a null message
Thanks.
...
So I have a project that has some content being displayed in a WebView and I want to stick above that. I want the header to scroll with the WebView content. Now, WebView generally wants to do it's own scroll handling but you can tell it not to using:
[[webView mainFrame] setAllowsScrolling:NO];
which successfully makes the WebView's...
Hi,
I am using the Cocoa JSON framework ( http://code.google.com/p/json-framework/ ) to communicate with an API.
The problem is that the API returns a dictionary if there is an error but returns an array of the results if it works.
Is there a good way to detect if the JSONValue is an array or a dictionary?
Thanks.
...
Hello,
I'm very new to cocoa touch and am stuck on a problem that doesn't seem to have a google solution. I have added a view to my application, and this view has a button on it. When the button is pressed I want the callback to perform an operation.
My problem is that the callback isn't being called. I created the view in Interface...
I need to create a tab view programatically using objective C and cocoa but I can't find any good resources showing how to do this. Can anyone suggest something?
...
Hello,
I have 2 applications that I use with Aquatic Prime. One is an application just with the Aquatic Prime framework, and the other is an application that I've been working on that has been incorporated with the Aquatic Prime framework. The first application I mentioned before has its SDK set to 10.5 with the architecture to 32-bit. ...
I'm encountering a very annoying error using Core Data on Mac OS X 10.5.
All entities have classes in my application which share the same names.
Up to this point, I've done 5 migrations without problems.
I'm using the XML data store.
I've got V5 of my data model with 13 entities, 4 of which are abstract. It looks like this:
What I d...
I have a tableview. One of the columns in the tableview uses an NSLevelIndicatorCell.
I want to be able to allow the user to edit the warn and critical values for the level indicator such that when they enter a value into a a "warning level" textbox, it changes the warn value of the level indicators being displayed in ALL of the tablev...