[Distilled from this question, with less informality.]
What are some things a new Cocoa programmer should write as sample projects, outside of the hand-holding of a tutorial?
Let's have one project idea per answer. If you have multiple ideas to suggest, post multiple answers.
It'll help for you to also list what Cocoa concepts your pr...
Is there a way for xcode to launch an application with an app URL?
I've read the answer to this question http://stackoverflow.com/questions/1239000/debugging-app-when-launched-by-push-notification, and it works great for single tests.
I'm trying to write unit tests for launching the app with lots of different URLs, and using the previo...
Hi,
How could I extract a part of an NSString before certain word(s):
For example:
If the keyword set of 'separators' is an NSArray of the following words "Series" and "documentary"
and if the NSStrings where
"Chain two Series documents" <---- I'd like to extract "Chain two"
"Chain documentary documents" <---- I'd like to extract ...
If I create a new instance of a class with IB I can't send messages to it because I don't know its name. I have asked several people and they always say 'you just use files owner' but that doesn't answer my question. What is the instances name?
...
Sorry for long description, however the questions aren't so easy...
My project written without GC. Recently I found a memory leak that I can't find. I did use new Xcode Analyzer without a result. I did read my code line by line and verified all alloc/release/copy/autorelease/mutableCopy/retain and pools... - still nothing.
Preamble: St...
Hi, well the question is the one I put in the title: "Should I define overloaded inherited method in the header file in ObjC?"
Thanks
UPDATE: I was wondering this because I will make my project's documentation using Doxygen, and maybe is better to declare overloaded inherited method because of the documentation. For example for method ...
I've taken the existing code from this project, and very happy with it so far.
I'm now however in a position where I need to make use of some third-party sensors which I've purchased from hitechnic, such as an accelerometer, a gyroscope, and a 3D compass - to mention a few.
I'm not sure where to start now, but what I need to do is add ...
How would I create custom scroll bars with cocoa?
...
I want to alter the anchorPoint, but keep the view in the same place.
I've tried NSLog-ing self.layer.position and self.center and they both stay the same regardless of changes to the anchorPoint. Yet my view moves!
Any tips on how to do this?
self.layer.anchorPoint = CGPointMake(0.5, 0.5);
NSLog(@"center point: %f %f", self.layer.posi...
hi
i want to know how to play a movie in Cocoa application
...
I am trying to run the following code:
1. NSURL *checkLicenseURL = [NSURL URLWithString:@"check_license.php?accesskey=&license_key="];
// call server API
2. NSError *err = nil;
3. NSXMLDocument *xmlResult = [[NSXMLDocument alloc] initWithContentsOfURL:checkLicenseURL options:NSXMLDocumentTidyXML error:&err];
But when looking at variab...
I have the following code:
AXWindowController *controller = [[AXWindowController alloc]
initWithWindowNibName:@"ActivateWindow"];
[controller showWindow:nil];
How do I use controller to make changes to the window ActivateWindow (eg. changing text on the window, etc.)? Step by step instructions would be appreciated. Thanks!
...
Although it won't happen often, there are a couple of cases where my Cocoa application will allocate very large amounts of memory, enough to make me worry about malloc failing. What is the best way to handle this sort of failure in a Cocoa application? I've heard that Exceptions are generally discouraged in this development environment...
hey
i am trying to create a new user playlist using the cocoa scripting bridge, but cannot seem to get it to work. i have so far:
iTunesApplication *iTunes = [SBApplication
applicationWithBundleIdentifier:@"com.apple.iTunes"];
SBElementArray *iSources = [iTunes sources];
iTunesSource *library = nil;
for (i...
I have a piece of software that just entered beta. A Japanese version of Mac OS X runs it fine, but a German beta tester gets a message that loosely translates to "Cannot run program because it is not supported on this type of Mac computer."
It is Intel and 10.6 only, but that is what the beta tester has. He tells me that the error sho...
Hi,
I am trying to find a word inside a phrase (NSString).
For this I've exploded the components of the phrase into individual substrings and now I am trying to compare them to the word I am looking for, but it doesn't work.
What would be the correct approach for this and fix for the software below?
NSString *myString = @"Mi Programa...
I'm new to Obj-C/Cocoa programming, and I'm having an issue trying to dynamically add menu items to an NSMenu instance and have the items action selector already set upon insertion.
I can, add the dynamic menu items fine, but the action selector doesn't trigger when the item is clicked via the menu.
The first line below is the line of ...
I want to put a little calendar in the bottom corner of my application. I have checked out the Amber Framework, but have not figured out how to build it. I have also checked out Logan Rockmore's calendar, but when it is minimized, it does not work.
Does anyone have any suggestions?
...
I have the following code:
@interface AXWindowController : NSWindowController {
IBOutlet NSTextField *text;
IBOutlet NSTextField *otherText;
}
- (void) setText: (NSString *)input;
- (void) setOtherText;
@end
@implementation AXWindowController
- (void) setText: (NSString *)input
{
[text setStringValue:input];
}
- (void) setOther...
I'm reading NSFileHandleReadCompletionNotification messages from the NSNotificationCenter to receive messages from an NSTask. The problem is that the command line program I'm calling is relatively slow to output lines, and it seems that the NSFileHandleReadCompletionNotification message gets posted relatively infrequently (I guess when t...