Problems with Webview in coredata framework app

  • I have a webview in a coredata framework application that when I have it
    display something through the program (eg. [[webview mainFrame]
    loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:site]]];),
    there are no errors, but the webview remains blank.  Also the
    estimatedProgress is 0.0000.

    When I do this is a regular program - without the coredata framework, it
    works perfectly.

    Thanks for any help,
    Andrew
  • On 14/01/2007, at 7:50 AM, Andrew Rodriguez wrote:

    > I have a webview in a coredata framework application that when I
    > have it
    > display something through the program (eg. [[webview mainFrame]
    > loadRequest:[NSURLRequest requestWithURL:[NSURL
    > URLWithString:site]]];),
    > there are no errors, but the webview remains blank.  Also the
    > estimatedProgress is 0.0000.
    >
    > When I do this is a regular program - without the coredata
    > framework, it
    > works perfectly.
    >
    > Thanks for any help,
    > Andrew

    Are you sure it's not something to do with modal loops?

    NSURLConnection won't work when you're running in a modal event loop
    mode.

    - Chris
  • I'm kind of new to cocoa in general, so I'm not quite sure what modal event
    loop mode is.  Could you please explain that?

    Thanks,
    Andrew

    On 1/13/07, Chris Suter <chris...> wrote:
    >
    >
    > On 14/01/2007, at 7:50 AM, Andrew Rodriguez wrote:
    >
    >> I have a webview in a coredata framework application that when I
    >> have it
    >> display something through the program (eg. [[webview mainFrame]
    >> loadRequest:[NSURLRequest requestWithURL:[NSURL
    >> URLWithString:site]]];),
    >> there are no errors, but the webview remains blank.  Also the
    >> estimatedProgress is 0.0000.
    >>
    >> When I do this is a regular program - without the coredata
    >> framework, it
    >> works perfectly.
    >>
    >> Thanks for any help,
    >> Andrew
    >
    > Are you sure it's not something to do with modal loops?
    >
    > NSURLConnection won't work when you're running in a modal event loop
    > mode.
    >
    > - Chris
    >

    --
    Andrew
  • On 14/01/2007, at 8:01 AM, Andrew Rodriguez wrote:

    > I'm kind of new to cocoa in general, so I'm not quite sure what
    > modal event loop mode is.  Could you please explain that?
    >
    > Thanks,
    > Andrew

    http://developer.apple.com/documentation/Cocoa/Conceptual/WinPanel/
    Concepts/UsingModalWindows.html

    Also have a look at:

    http://developer.apple.com/documentation/Cocoa/Reference/Foundation/
    Classes/NSRunLoop_Class/Reference/Reference.html

    The run loop will run in mode NSModalPanelRunLoopMode when you have a
    modal window.

    The problem is that NSURLConnection uses the run loop but it doesn't
    work if you're in NSModalPanelRunLoopMode (and possibly other modes).

    - Chris
  • What is the content of the NSString site? If you do not escape the string
    with percent escape characters this would be the expected behaviour (blank
    webview). Change the line to:

    [[webview mainFrame]
        loadRequest:[NSURLRequest
        requestWithURL:[NSURL
        URLWithString:[site
    stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]]];

    and see what happens.

    --
    Julio Cesar Silva dos Santos
    <jcssantos01...>

    2007/1/13, Andrew Rodriguez <nitromaster101...>:
    >
    > I have a webview in a coredata framework application that when I have it
    > display something through the program (eg. [[webview mainFrame]
    > loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:site]]];),
    > there are no errors, but the webview remains blank.  Also the
    > estimatedProgress is 0.0000.
    >
    > When I do this is a regular program - without the coredata framework, it
    > works perfectly.
    >
    > Thanks for any help,
    > Andrew
previous month january 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 31        
Go to today