Search Results

Search found 4 results on 1 pages for 'jammur'.

Page 1/1 | 1 

  • BNRPersistence on the iPhone, and NSDocument

    - by jammur
    I'm trying to get BNRPersistence running in an iPhone app, but I'm having a problem that I have no idea how to solve. Keep in mind I'm relatively new to iPhone dev. The problem is that BNRStoreDocument subclasses NSDocument, which exists in the Cocoa framework and thus isn't available on the iPhone. So obviously I'm getting compile errors that it can't find NSDocument. The developer of BNRPersistence states that it works on the iPhone, so I'm sure there a solution, I just don't what it is. Any help would be greatly appreciated!

    Read the article

  • How can I break from a method prematurely that's being called by NSTimer

    - by jammur
    Basically I'm writing a metronome app, but I'm using a sound file that, depending on the BPM, might not be finished playing when the "play" method is called again. For example, if the sound file is 0.5 seconds long, but the BPM is 200, the "play" method needs to be called every 0.3 seconds. I'm not overly familiar with NSTimer, but it appears that if it is supposed to fire before the previous invocation has completed, it doesn't, and just waits for the next time around. I could be completely wrong about that though. What I need to do is have the previous invocation end prematurely, and have the "play" method called again when the time is supposed to fire. Any help would be appreciated!

    Read the article

  • UIWebView not evaluating javascript properly

    - by jammur
    I'm trying to run some javascript against a UIWebView but it's doesn't seem to be working. For example, here is a snippet of html I'm using to test: <html><body><h1>Hello World!</h1><p>It's me.</p></body></html> If I run the following javascript against it, the return value is 0, when it should be 1. var elements = document.getElementsByTagName("h1"); elements.length; Here's the objc code I'm using for the webview. 'parser' is a string containing the above javascript: [webView loadHTMLString:@"<html><body><h1>Hello World!</h1><p>It's me.</p></body></html>" baseURL:nil]; NSString *markupResult = [webView stringByEvaluatingJavaScriptFromString:parser];

    Read the article

1