Hello. This is something I've really never seen but, I downloaded the source code of the sine wave example at http://www.audiosynth.com/sinewavedemo.html .
It is in an old Project Builder Project format, and I want to compile it with Xcode (GCC). However, Xcode gives me 11415 compile errors. The first few are (all in the precompilation ...
I am working through Aaron Hillegass' Cocoa Programming for Mac OS X and am doing the challenge for Chapter 18. Basically, the challenge is to write an app that can draw ovals using your mouse, and then additionally, add saving/loading and undo support. I'm trying to think of a good class design for this app that follows MVC. Here's what...
NSArray* address = [NSArray arrayWithArray:[detailItem addressArray]];
NSLog(@"address = %@", address);
NSString* addressToString = @"";
int arrayCount = [address count];
for (int i = 0; i < arrayCount; i++) {
addressToString = [addressToString stringByAppendingString:[address objectAtIndex:i]];
if (i == arrayCount -1) {
...
Suppose I'm calling class method + (NSStatusBar *)systemStatusBar:
NSStatusBar *sB;
sB=[NSStatusBar systemStatusBar];
My question is what's the best way to trace that class method call and find out what it is calling in terms of other methods and arguments?
Does this entail advanced disassembly beyond what XCode provides?
Thanks
...
I'm creating a pop up menu programmatically and updating it with the delegate method menuNeedsUpdate:(NSMenu *) menu and then displaying it using the popUpMenuPositioningItem:nil atLocation:mouseLoc inView:nil method.
It works fine as far as mouse control is concerned. However, when using the keyboard (letters or arrow keys), I've notic...
Cocoa has a plethora of integer masks and codes. For instance, NSCommandKeyMask or NSF1FunctionKey, which are clearly defined and documented in the headers.
However, some can be archaic and when accessing accessibility attributes, for instance to get the glyph (AXMenuItemCmdGlyph), you're given an integer number like 111, which represen...
I have a document-based application but I am not using undo. How do I change the status of my window to be 'dirty' and certain times?
Thanks.
...
I have class called AppController which contains a mutable array of Person objects called people. Each person simply has an NSString and a float.
I also have an NSArrayController whose contentArray is bound to the people array in AppController. Then I have the usual setup of a table view bound to the array controller to show a list of ...
Hi, I would to use the NSSpeechRecognition but this Appkit Framework was not available in iPhone os frameworks.
This is available in systems/library/frameworks/Appkit.framework. Is there other way to make use of AppKit for NSSpeechRecognitio in iPhone?
Thank you.
ZaldzBugz
...
I have the following code in a stand-alone Cocoa test app:
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
NSView *contentView = [window contentView];
NSTextStorage *textStorage = [NSTextStorage new];
NSLayoutManager *layoutManager = [NSLayoutManager new];
NSTextContainer *textContainer = [NSText...
Hi,
Just wondering if there's a way to keep track of what website the user is browsing to via Cocoa or Webkit?
Sort of like the TrackTime.app?
Thanks
...
A simple question here for many of you. I have an indeterminate NSProgressIndicator which I start and stop many times in my code. Does it reset when you call restart it, or do you have to manually do that? If you do have to do it manually, how would I go about doing it?
Many thanks,
jrtc27
...
Hi,
I'm trying to show a pop up menu on mouse down on a button. The button should appear pressed while mouse down, and be "un pressed" on mouse up regardless of any of the menu item been selected. Similar to the Expose/Space Preference panel "+" button for adding application.
So far I tried 3 methods:
Sent action when button is clic...
Hi,
I register for notification NSPopUpButtonWillPopUpNotification in order to change the pop up menu before it is shown. The new pop up menu consist of running Application list with respected icons. When the application is selected, it calls a @selector method.
After selection completes, the button have the image of the selected appl...
I am using an NSTokenField as a way for users to enter tags. Everything works fine and it hooks up with CoreData managing the tags both when the user adds or deletes a tag.
I recently added logic so that the NSTokenField would resize vertically as the user adds tags and they break to the next line using Andrew Bowman's IFVerticallyExpan...
I extract nodes from an XML document by calling -nodesForXPath:error:. Now i wonder if it guarantees, that the nodes are returned in the same order as they appear from top to bottom in the document (it's crucial in my case).
My XML looks something like this and i retrieve the b tags with the XPath query:
<a>
<b>
...
</b...
I need to handle HTTP URLs that begin with a certain domain with my app, because it points to a REST source. The web service however is not under my control, so i can't easily introduce a custom url scheme to open the links with my app.
Is there a way to intercept and handle such URLs in a Cocoa app?
Example: http://static.domain.name/...
I'd like to override the default system control tint for my app to be always NSGraphiteControlTint. The following code doesn't seem to work though. Any suggestions?
NSButton *button = [window standardWindowButton:NSWindowCloseButton];
[[button cell] setControlTint:NSGraphiteControlTint];
Regards,
Erik
...
How can I get album artwork, song name, album name and artist name from an audio file? I need to display this without the use of iTunes. Thanks.
...
Hi!, I have 5 NSTableView's instances that have the same contextual menu. When I get the message that the menu has been clicked I need to know which table sent it. I've checked the NSMenu documentation but I don't seem to find a way to check which of the tables opened the menu..
I'm thinking of subclassing NSTableView and send a message...