Odd error messages when using WebView

  • Hello,

    I just finished upgrading an app from Tiger to Leopard and I am getting a bunch of errors (listed at the bottom of this message) when I load html in a WebView.

    I get the same errors regardless if I load file with html or just plain ext with no html markup.

    The html renders just fine.

    Also when I load web pages from external sites I don't get the error messages when the page is loaded just when I click on a link.

    This is the code I am using to load the html:

    - (void)_locateElementHelpTip
    {
        NSBundle *aBundle = [NSBundle mainBundle];
        NSString *aPath = [aBundle pathForResource: [self elementHelpTip] ofType: @"html" inDirectory: @"ElementTipHelp"];
        NSString *message = @"<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"><html><head><link rel=\"stylesheet\" type=\"text/css\" href=\"MainStyle.css\"><title>Not Found Page</title></head><body><h2>Document Not found!</h2><h3><a href=\"index.html\">Index</a></h3></body></html>";
        NSURL *baseURL = [NSURL fileURLWithPath: [aBundle pathForResource: @"index" ofType: @"html" inDirectory: @"ElementTipHelp"]];

        if(aPath == nil)
        {
            [[webView mainFrame] loadHTMLString: message baseURL: baseURL];
        else {
            NSURL *url = [NSURL fileURLWithPath: aPath];
            if(url != nil)
                [[webView mainFrame] loadRequest: [NSURLRequest requestWithURL: url]];
            else
                [[webView mainFrame] loadHTMLString: message baseURL: baseURL];
        }
    }

    Any ideas?

    Tue Nov 13 18:16:29 MyHostName MyAppName[20733] <Error>: CGContextSetFillColorWithColor: invalid context
    Tue Nov 13 18:16:29 MyHostName MyAppName[20733] <Error>: CGContextSetStrokeColorWithColor: invalid context
    Tue Nov 13 18:16:29 MyHostName MyAppName[20733] <Error>: CGContextSetTextMatrix: invalid context
    Tue Nov 13 18:16:29 MyHostName MyAppName[20733] <Error>: CGContextSetFont: invalid context
    Tue Nov 13 18:16:29 MyHostName MyAppName[20733] <Error>: CGContextSetFontSize: invalid context
    Tue Nov 13 18:16:29 MyHostName MyAppName[20733] <Error>: CGContextGetShouldSmoothFonts: invalid context
    Tue Nov 13 18:16:29 MyHostName MyAppName[20733] <Error>: CGContextSetFontRenderingStyle: invalid context
    Tue Nov 13 18:16:29 MyHostName MyAppName[20733] <Error>: CGContextSetStyle: invalid context
    Tue Nov 13 18:16:29 MyHostName MyAppName[20733] <Error>: CGContextSetCharacterSpacing: invalid context
    Tue Nov 13 18:16:29 MyHostName MyAppName[20733] <Error>: CGContextSetTextPosition: invalid context
    Tue Nov 13 18:16:29 MyHostName MyAppName[20733] <Error>: CGContextShowGlyphsWithAdvances: invalid context
    Tue Nov 13 18:16:29 MyHostName MyAppName[20733] <Error>: CGContextSetFillColorWithColor: invalid context
    Tue Nov 13 18:16:29 MyHostName MyAppName[20733] <Error>: CGContextSetStrokeColorWithColor: invalid context
    Tue Nov 13 18:16:29 MyHostName MyAppName[20733] <Error>: CGContextSetTextMatrix: invalid context
    Tue Nov 13 18:16:29 MyHostName MyAppName[20733] <Error>: CGContextSetFont: invalid context
    Tue Nov 13 18:16:29 MyHostName MyAppName[20733] <Error>: CGContextSetFontSize: invalid context
    Tue Nov 13 18:16:29 MyHostName MyAppName[20733] <Error>: CGContextGetShouldSmoothFonts: invalid context
    Tue Nov 13 18:16:29 MyHostName MyAppName[20733] <Error>: CGContextSetFontRenderingStyle: invalid context
    Tue Nov 13 18:16:29 MyHostName MyAppName[20733] <Error>: CGContextSetFillColorWithColor: invalid context
    Tue Nov 13 18:16:29 MyHostName MyAppName[20733] <Error>: CGContextSetStrokeColorWithColor: invalid context
    Tue Nov 13 18:16:29 MyHostName MyAppName[20733] <Error>: CGContextSaveGState: invalid context
    Tue Nov 13 18:16:29 MyHostName MyAppName[20733] <Error>: CGContextSetStyle: invalid context
    Tue Nov 13 18:16:29 MyHostName MyAppName[20733] <Error>: CGContextSetTextPosition: invalid context
    Tue Nov 13 18:16:29 MyHostName MyAppName[20733] <Error>: CGContextShowGlyphsWithAdvances: invalid context
    Tue Nov 13 18:16:29 MyHostName MyAppName[20733] <Error>: CGContextRestoreGState: invalid context

    Jerry Porter
    IT Distribution MS 34-202
    Lincoln Financial Group
    One Commerce Square
    2005 Market Street
    Philadelphia, PA 19103
    (215) 255-7031

          ____________________________________________________________________________________
    Get easy, one-click access to your favorites.
    Make Yahoo! your homepage.
    http://www.yahoo.com/r/hs
    _______________________________________________
    Do not post admin requests to the list. They will be ignored.
    Xcode-users mailing list      (<Xcode-users...>)
    Help/Unsubscribe/Update your Subscription:
    http://lists.apple.com/mailman/options/xcode-users/<jep9816...>

    This email sent to <jep9816...>

          ____________________________________________________________________________________
    Be a better pen pal.
    Text or chat with friends inside Yahoo! Mail. See how.  http://overview.mail.yahoo.com/
previous month november 2007 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today