I'm working with a WebView. If I place this call in my -awakeFromNib:
[myWebView setMainFrameURL:@"http://www.google.com"];
I get the behavior I want. Google's homepage displays in my WebView. But, I need to set the main frame's URL in another method from a mutable array containing NSStrings.
This method call
[myWebView setMainFrame...
I have a UIImage (Cocoa Touch). From that, I'm happy to get a CGImage or anything else you'd like that's available. I'd like to write this function:
- (int)getRGBAFromImage:(UIImage *)image atX:(int)xx andY:(int)yy {
// [...]
// What do I want to read about to help
// me fill in this bit, here?
// [...]
int result = (red << 2...
How do you encode and decode a CGPoint struct using NSCoder?
...
Following the advice in the Core Data Programming Guide's Core Data Performance page
regarding storage of BLOBs, I've chosen to store binary data for my
NSPersistenDocument-based app (Leopard-only, if that makes a
difference) in an external file (separate from the document Core Data
data store) and keeping an archived NDAlias reference t...
So QTMovies have QTMovieDidEndNotification, but no QTMovieDidStartNotification. How can I be notified when a QTMovie starts playing?
...
Hi, I'm building a app that needs to perform calculations on money.
I wonder how to properly use NSDecimalNumber, especially how to initialize it from integers, floats & doubles?
I only found it easy to use the -decimalNumberWithString: method. The -initWith... methods are discouraged so that only left the ones with mantissa, but never...
I'm having some problems displaying the contents of one NSArrayController in two windows defined in different XIBs.
In my main window (in MainMenu.xib), I have an NSTableView which is bound to an NSArrayController
In my second XIB, I have another window that contains an NSTableView. I created a new NSArrayController, and bound the tabl...
I'm developing an app for the iPhone, but I guess the question is the same on the Mac.
What is your approach to debug the state of your application after it has been launched by its URL scheme?
...
NSMutableArray *a1 = [[NSMutableArray alloc] init];
NSMutableArray *a2 = [NSMutableArray array];
TempObj *obj = [[TempObj alloc] init]; //assume this line is repeated for each obj
[a1 addObject:obj];
[a1 addObject:obj2];
[a1 addObject:obj3];
[a1 addObject:obj4];
[obj release];
[obj2 release];
[obj3 release];
[obj4 release];
[a1 releas...
I am using a "spinner" NSProgressIndicator in my cocoa app:
I would like to display it in a different color so that it will show up well on a dark background:
How would I go about doing this? My last resort would be to write my own custom NSView subclass that renders a custom animation, but I'm not even sure where to start on that ...
I'm seeking a library, or bit of code I can incorporate into a Cocoa project where I can turn a stream of text with ansi color control codes into an attributed string. There are many projects that do this, but having examined their code they're either messy or overly complex. Has anyone an idea of a simple piece of code, or library, or...
How do I pass HTML code contained in a NSString directly into WebKit. I'm looking for something similar to:
[aNSTextField setString:@"foo"];
Would it be as simple as something like that? Or would I have to resort to something like saving the text to a file and then accessing it with a file:// url?
...
There are Mac GUI applications which provide a front-end to more geeky commandline tools (often included as a part of the application package). I would like to look at what is happening under the hood of such GUIs.
How to "attach" to an application, monitor it for calls to command line utilities and log a filename and command line param...
Hello
I currently have an array of strings, I'm getting a NSString object from this array by calling the -componentsJoinedByString: method. Example:
NSString *someString = [[NSString alloc] initWithString: [myStrings componentsJoinedByString:@","];
Since -componentsJoinedByString: returns me an NSString, I'm assuming that it is not "...
I have a Cocoa app I'm writing that has an ImageView with a TextView as a subview sitting on top of the ImageView. I have two functions, one that updates the image in the ImageView and one that updates the text in the TextView. Both of those functions work properly, but I would like the new text to fade in or cross fade from the old te...
I'm a .NET programmer (C#) and want to learn to develop for the Mac. I'm not fluent in C/C++ but know enough to get my hands dirty, so I figure Objective-C shouldn't be too difficult.
Does anyone have any good online resources they'd recommend for learning Objective-C?
...
I'm reading a post about iPhone programming and I've noticed that the talk about Objective C++, the code shown in the post looks mainly like Objective-C but there also are several snippets in C++. Is it really possible to program Cocoa from C++?
...
I am learning Cocoa and Objective-C (well, and C) to make a few Mac apps I've had floating around. I need to use Distributed Objects, but am having trouble finding simple, concise examples. Does anybody know of any?
...
I want to show a local image in the webview , How to do ? somebody has a easy demo ? thanks a lot!!!
...
I'm having trouble creating a mouseover function with an NSTableView. The idea is that (if the feature is selected in prefs) placing the mouse pointer above a particular row in an NSTabelView will display a small popup window with additional information regarding the entry in that particular row. The effect should not be immediate (as e....