Skip to content

Commit 2b6a6a6

Browse files
author
Lars Steiger
committed
Resolved a few warnings.
1 parent cd0fec4 commit 2b6a6a6

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

Example1/AppController.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,12 @@ - (NSView *)viewWithFrame:(NSRect)frame forOrder:(FsprgOrder *)order
9191

9292
- (void)webView:(WebView *)sender didFailProvisionalLoadWithError:(NSError *)error forFrame:(WebFrame *)frame
9393
{
94-
NSRunAlertPanel(@"Alert", [error localizedDescription], @"OK", nil, nil);
94+
NSRunAlertPanel(@"Alert", @"%@", @"OK", nil, nil, [error localizedDescription]);
9595
}
9696

9797
- (void)webView:(WebView *)sender didFailLoadWithError:(NSError *)error forFrame:(WebFrame *)frame
9898
{
99-
NSRunAlertPanel(@"Alert", [error localizedDescription], @"OK", nil, nil);
99+
NSRunAlertPanel(@"Alert", @"%@", @"OK", nil, nil, [error localizedDescription]);
100100
}
101101

102102
- (void)dealloc

Example2/AppController.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ - (NSView *)viewWithFrame:(NSRect)frame forOrder:(FsprgOrder *)order
8787

8888
- (void)webView:(WebView *)sender didFailProvisionalLoadWithError:(NSError *)error forFrame:(WebFrame *)frame
8989
{
90-
NSRunAlertPanel(@"Alert", [error localizedDescription], @"OK", nil, nil);
90+
NSRunAlertPanel(@"Alert", @"%@", @"OK", nil, nil, [error localizedDescription]);
9191
}
9292

9393
- (void)webView:(WebView *)sender didFailLoadWithError:(NSError *)error forFrame:(WebFrame *)frame
9494
{
95-
NSRunAlertPanel(@"Alert", [error localizedDescription], @"OK", nil, nil);
95+
NSRunAlertPanel(@"Alert", @"%@", @"OK", nil, nil, [error localizedDescription]);
9696
}
9797

9898
- (void)dealloc

FsprgEmbeddedStore/FsprgEmbeddedStoreController.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@ - (void)resizeContentDivE
208208
if(resizableContentE == nil) {
209209
return;
210210
}
211-
212-
float windowHeight = [[self webView] frame].size.height;
211+
212+
CGFloat windowHeight = [[self webView] frame].size.height;
213213
id result = [[[self webView] windowScriptObject] evaluateWebScript:@"document.getElementsByClassName('store-page-navigation')[0].clientHeight"];
214214
if (result == [WebUndefined undefined]) {
215215
return;
@@ -219,8 +219,8 @@ - (void)resizeContentDivE
219219
DOMCSSStyleDeclaration *cssStyle = [[self webView] computedStyleForElement:resizableContentE pseudoElement:nil];
220220
float paddingTop = [[[cssStyle paddingBottom] substringToIndex:[[cssStyle paddingTop] length]-2] floatValue];
221221
float paddingBottom = [[[cssStyle paddingBottom] substringToIndex:[[cssStyle paddingBottom] length]-2] floatValue];
222-
223-
float newHeight = windowHeight - paddingTop - paddingBottom - pageNavigationHeight;
222+
223+
CGFloat newHeight = windowHeight - paddingTop - paddingBottom - pageNavigationHeight;
224224
[[resizableContentE style] setHeight:[NSString stringWithFormat:@"%fpx", newHeight]];
225225
}
226226

TestApp/AppController.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ - (NSView *)viewWithFrame:(NSRect)frame forOrder:(FsprgOrder *)order
124124
NSData *data = [NSPropertyListSerialization dataFromPropertyList:[order raw]
125125
format:NSPropertyListXMLFormat_v1_0
126126
errorDescription:&errorDesc];
127-
NSString *orderAsStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
127+
NSString *orderAsStr = [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease];
128128

129129
OrderViewController *orderViewController = [[OrderViewController alloc] initWithNibName:@"OrderView" bundle:nil];
130130
[orderViewController setRepresentedObject:orderAsStr];
@@ -136,12 +136,12 @@ - (NSView *)viewWithFrame:(NSRect)frame forOrder:(FsprgOrder *)order
136136

137137
- (void)webView:(WebView *)sender didFailProvisionalLoadWithError:(NSError *)error forFrame:(WebFrame *)frame
138138
{
139-
NSRunAlertPanel(@"Alert", [error localizedDescription], @"OK", nil, nil);
139+
NSRunAlertPanel(@"Alert", @"%@", @"OK", nil, nil, [error localizedDescription]);
140140
}
141141

142142
- (void)webView:(WebView *)sender didFailLoadWithError:(NSError *)error forFrame:(WebFrame *)frame
143143
{
144-
NSRunAlertPanel(@"Alert", [error localizedDescription], @"OK", nil, nil);
144+
NSRunAlertPanel(@"Alert", @"%@", @"OK", nil, nil, [error localizedDescription]);
145145
}
146146

147147
// NSApplicationDelegate

0 commit comments

Comments
 (0)