I have a need to render and display charts (bar charts for now, but more types may be needed later) in an iPhone app I'm working on. I've done some looking around and it doesn't look like there are any really good, mature charting libraries for iPhone yet. I've also looked for something written for Cocoa on the Mac that can be adapted, b...
I have a simple document-based Cocoa app that acts as a viewer for .wav files, to do a bit of frequency analysis. I'd like to be able to export the data gleaned from opened files to CSVs for further analysis in other programs.
The document-based application framework in Cocoa lets you override
- (NSData *)dataOfType:(NSString *)typeNam...
We want to write to "foo.txt" in a given directory. If "foo.txt" already exists, we want to write to "foo-1.txt", and so on.
There are a few code snippets around that try and answer this question, but none are quite satisfactory. E.g. this solution at CocoaDev uses NSFileManager to test if a path exists to create a safe path. However, t...
I am playing with a little Cocoa Apps I wrote where I add objects of a class Person to a NSMutableArray. When I try to access an object that is beyond the array limit all I get is an "beyond bounds" message on the console.
In fact I expected something worse. I expected the app to crash! But it doesn't.
I am not sure if this is a good o...
I have an XCode project built as a Cocoa single document application (it's not a Python-Cocoa application, that is not what I want).
All the documentation I found assumes I want to create a Cocoa application with code written in Python and this is not the case - I want a standard Cocoa application that calls a method out of a Python cla...
I'm subclassing NSUserDefaults in my application. A side effect of this is I can't use [NSUserDefaults sharedUserDefaults], I have to have a class method to provide my own static defaults object. This isn't been a problem in code, but it's proving tricky now that I'm hooking up the preferences UI with bindings.
The shared NSUserDefaults...
Hi:
we're trying to implement an article detail view for an RSS-like application. The windows has a UIScrollView that contains a UITextView (which is the title), a UIButton (which opens a gallery), and a UIWebView (with the body). The idea is that all these elements scroll together...
The problem is that whenever we have a body over 1...
My friend wants me to turn his Cocoa application into a firefox plugin. The application takes the URL of the site where the data is to be downloaded from, and downloads it, taking the load off of the browser. My question is, since firefox plugins are written in javascript (I think), and the application is written in objective C, is this ...
My App Uses Coredata and Displays Data in a table, one column has a checkbox and one has the title. What i want it to do is that when the checkbox gets checked it deletes the row instead of people having using the Remove/Minus button. The reason I want this is because my app is a Task Management app.
...
I imagine it is just an int, but I want to verify.
Thanks
Corey
...
I'd like to map a key to move the cursor in the XCode up by ten lines. Of course, I want another one to move down too. The key mapping would ideally be something like 'Control-Alt-P'.
Is there a way to achieve this in XCode without resorting to Automator?
Ashley has the answer below, the formatting was a little different as the pro...
Hello all,
I have an XML document which contains an element that is over 90,000 characters in length*.
NSXMLNode* node = ...;
NSString* val = [node stringValue]; // this is not the full contents of the node!
The second line only gives me 80k or so. This is obviously not what I want, so I'd appreciate some suggestions. Is NSXMLNode b...
In my Core Data model, I've got a relationship called listItems which links to several listItem entities, each with a stringValue attribute. I've created a control which is essentially a list of NSTextFields, one for each list item. The control is bound to listItems properly, and I've set it up so that pressing the return key creates a n...
When I adjust the size of the text field using a divider, if the text is not selected it stretches like this.
...
Hello,
Is there a method that returns all the keys for an object conforming to the NSKeyValueCoding protocol?
Something along the lines of [object getPropertyKeys] that would return an NSArray of NSString objects. It would work for any KVC-compliant object. Does such a method exist? I haven't found anything in searching the Apple docs ...
I've got a NSDate that represents a specific time. The format of that date is hhmmss. I want to add an NSInterval value (specified in seconds) to that time value.
Example:
NSDate = 123000
NSTimeInterval = 3600
Added together = 133000
What is the best way to do this?
Thanks.
...
I'm working on an application that operates entirely in landscape mode (UIStatusBarHidden=YES and UIInterfaceOrientation=UIInterfaceOrientationLandscapeRight). I'm using a NavigationController, with my rootViewController (MainViewController) setup like this:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfac...
In Cocoa, I've setup two NSThreads, one producer and one consumer.
The producer appends data to an NSMutableData, and the receiver opens an NSInputStream from that data and reads in chunks.
The producer thread writes a lot faster than the consumer processes, which is OK. But the producer only produces a finite amount of work, then exits...
Hello!
How do I learn currently selected keyboard layout / input language?
I was playing with NSInputManager but wasn’t able to achieve anything.
[NSInputManager currentInputManager]
returns (null) (as reported with %@) and thus
[[NSInputManager currentInputManager] localizedInputManagerName]
It would be the best for me to just g...
On which technological basis would you implement a multimedia app, which has to meet the following requirements:
Platforms: Windows XP/Vista, Mac OS X, Linux (nice to have)
Should play audio (mp3) and video (H.264 would be great) from local disk
I looked into things like Cocotron which is a cross-platform Objective-C API similar to C...