Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Programmatic WebView



I'm trying to write a unit test that needs access to a WebView.  Here's 
the code I use to create and load a URL:

     NSRect webViewRect = NSMakeRect(0, 0, 10, 10);
     WebView *webView = [[WebView alloc] initWithFrame:webViewRect 
frameName:@"frameName" groupName:@"groupName"];
	NSString *urlText = [NSString 
stringWithString:@"http://www.apple.com";];
     NSLog(@"loading URL %@", urlText);
     [[webView mainFrame] loadRequest:[NSURLRequest 
requestWithURL:[NSURL URLWithString:urlText]]];
     float progress = [webView estimatedProgress];
     NSLog(@"%f download", progress);

The code compiles and executes, but the progress of the loading never 
gets past 0.1.  Even if I put in a loop, the progress still says 0.1.  
Any thoughts as why the progress is stalled, or how I can use WebView 
in a non-GUI?
Thanks,
Brian Yamabe
_______________________________________________
webkitsdk-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webkitsdk-dev
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.