In my application, i have to detect all the songs and BPM of those songs. Detect the songs are finished now I have to detect BPM of songs.
Does anyone tell me that how can I detect BPM of each song by programming in Cocoa.
Thanks,
Haresh.
...
There is probably a very simple solution for this but I can't get it working.
I have got multiple classes in my Cocoa file. In one of the classes class1 I create a variable that I need to use in another class class2 as well. Is there a simple way to import this variable in class2?
...
Hi all,
I'm curious, how do most of you folks handle errors such as HTTP Forbidden or 5xx type requests from a server? Or say an exception is thrown in one of your UIViewControllers? Do you typically bubble up the error to the App Delegate and handle generic "window" level errors at that point? Do you couple errors directly into the UIV...
I need to be able to format an existing NSString into a different date format. NSDateFormatter has dateFromString and stringFromDate methods, but no stringFromString. Is it possible to take a date that I have in the form of an NSString and reformat it using something similar to:
NSDateFormatter *dateFormatter = [[NSDateFormatter all...
I have the following delegate method of NSURLConnection
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
NSLog(@"DONE, Receive bytes: %d", [webData length]);
NSString *theXML = [[NSString alloc]initWithBytes:[webData mutableBytes] length:[webData length] encoding:NSUTF8StringEncoding];
//NSLog(theXML);
[theXML ...
I have created an NSMutableArray in the implementation of my class loginController. The mutable array contains a set of strings. I want to pass the mutable array with its objects to other classes within my cocoa-project. What is the best way to pass the array?
...
I'm trying to pass an NSArray containing strings for use in another class than the one in which it is generated. Therefore I have made it a property as following:
loginController.h
#import <Cocoa/Cocoa.h>
@interface loginController : NSObject {
NSArray *myArray;
}
@property (nonatomic, retain) NSArray * myArray;
@end
log...
What is the best way to get the size (width and height) of an NSBitmapImageRep?
This is what I'm doing now:
NSBitmapImageRep *bitmap;
NSInteger samplesPerPixel = [bitmap samplesPerPixel];
NSInteger bytesPerPlane = [bitmap bytesPerPlane];
NSInteger bytesPerRow = [bitmap bytesPerRow];
NSInteger numberOfPlanes = [bitmap numberOfPlanes];
...
I'm trying to convert a string of numbers, entered by the user, into a sexy string like Phone.app on the iPhone. Here is the code I'm using, which doesn't work (no special format comes out) and after a certain number of digits it just starts adding "0" to the end of the string.
NSNumberFormatter *formatter = [[NSNumberFormatter alloc] i...
By default, a Cocoa-Python application uses the default Python runtime which is version 2.5. How can I configure my Xcode project so that it would use the newer Python 3.0 runtime? I tried replacing the Python.framework included in the project with the newer version but it did not work.
And another thing, are PyObjc modules compatible w...
I'm developing a Cocoa/Objective C application that reads the active document from any application using AppScript. I've done this part successfully, but it would be really good to be able to tell for sure whether the application is document-based or not.
The obvious approach is to look at the AXDocument attribute of the active window w...
I find Apple's documentation quite limited on AudioFileStreamSeek and I cannot find any examples of actual usage anywhere. I have a working streaming audio player, but I just can't seem to get AudioFileStreamSeek to work as advertised...
Any help tips or a little example would be greatly appreciated!
...
Apple's String Format Specifiers document claims,
The format specifiers supported by the NSString formatting methods and CFString formatting functions follow the IEEE printf specification; … You can also use these format specifiers with the NSLog function.
But, while the printf specification defines %C as an equivalent for %lc and ...
This is a beginner level question in which I'm curious if this is a valid use of a pointer in a statement such as:
NSMutableDictionary *foo = [bar mutableCopy];
I get confused when that is valid versus when I'd need to do the following:
NSMutableDictionary *foo = [[NSMutableDictionary alloc] initWithCapacity:0];
foo = [bar mutableCo...
I've been told Java is not the greatest pick to follow an MVC architecture. I believe I've seen some Java framework solutions to ease this roadbump. However, I a bit confused on why this is. More specifically, why Java's attempt at MVC is often mocked as a "wannabe" approach. I come from a ObjC background (w/ Cocoa of course) and would l...
Hello all,
I'm using an UITextView to hold static content (in Chinese, which means that the characters are all fixed width). I want to let users click on a character in the text and bring up dictionary information for that character. I know all of the issues surrounding the lack of copy and paste and all that, but I'm hoping that there ...
I recently switched to emacs for my code editing, and it mostly works well.
However, for Objective-C I find myself missing Xcode's autocomplete feature as I have trouble remembering the long function names such as
- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)windowStyle backing:(NSBackingStoreType)bufferingType d...
I am trying to get the "remaining chars notice" to show up within my rounded NSTextField and I got it with two NSTextFields with help of the Interface Builder and it already looks like that:
But when I write a little bit more it looks like that:
The only thing I could think of is to subclass NSTextField and do something with it so ...
Is it possible using NSArrayController to bind a NSTextField's value to a particular item in the array? In particular, I want to bind to a property on the first item in the array, and show nothing if the array is empty.
Using arrangedObjects.command shows just "(" -- presumably it's trying to show a multi-line string with comma-separat...
Any way to have a NSButton title to wrap when it's width is longer than the button width, instead of getting clipped?
I'm trying to have a radio button with a text that can be long and have multiple lines. One way I thought about having it work is to have an NSButton of type NSRadioButton but can't get multiple lines of text to work.
...