2
0

Help text update for type.

[FIXED]     MP-12: Help doesn't always properly update for element type.
This commit is contained in:
Maarten Billemont 2012-03-11 15:29:55 +01:00
parent 0c536ef640
commit dc8b6aa86c

View File

@ -221,14 +221,17 @@
[NSURLRequest requestWithURL: [NSURLRequest requestWithURL:
[NSURL URLWithString:[NSString stringWithFormat:@"#%@", chapter] relativeToURL: [NSURL URLWithString:[NSString stringWithFormat:@"#%@", chapter] relativeToURL:
[[NSBundle mainBundle] URLForResource:@"help" withExtension:@"html"]]]]; [[NSBundle mainBundle] URLForResource:@"help" withExtension:@"html"]]]];
NSString *error = [self.helpView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"setClass('%@');",
ClassNameFromMPElementType(self.activeElement.type)]];
if (error.length)
err(@"setClass: %@", error);
}); });
} }
- (void)webViewDidFinishLoad:(UIWebView *)webView {
NSString *error = [self.helpView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"setClass('%@');",
ClassNameFromMPElementType(self.activeElement.type)]];
if (error.length)
err(@"helpView.setClass: %@", error);
}
- (void)showContentTip:(NSString *)message withIcon:(UIImageView *)icon { - (void)showContentTip:(NSString *)message withIcon:(UIImageView *)icon {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{