×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jan 2008
    Location
    India
    Posts
    14

    BrCtlInterface: how to stop browser control while it is loading url

    Hi,

    I am using browser control api to show web pages from url in my application.
    When I open a url with browser(BrCtlInterface) & the BrCtlInterface has shown half of the page, then i switch to another view.

    Here, in browserView:oDeactivate(), i close the BrCtlInterface and remove all the observers.
    here, the application crashes after some time.
    If I dont close the BrCtlInterface then the application works fine.

    I think its cause is that when the framework recieves further data from previous connection then it tries to pass the data to BrCtlInterface, which has already closed by the time data arrived.

    If someone can help me how to cancel the previously called LoadUrlL() before successfully closing the BrCtlInterface?

    Please help.

    Thanks,
    Animesh

  2. #2
    Registered User
    Join Date
    Jan 2008
    Location
    India
    Posts
    14

    Re: BrCtlInterface: how to stop browser control while it is loading url

    Hi,

    I try to clarify my earlier post a bit more:

    I need to close the BrCtlInterface & all the incomplete request associated with it.
    I do this using following code:-

    //code - start
    if ( iBrCtlInterface)
    {
    LOG->WriteLineL(_L("deleting iBrCtlInterface....."));

    iBrCtlInterface->HandleCommandL(TBrCtlDefs::ECommandCancelFetch + iCommandBase);

    iBrCtlInterface->HandleCommandL(TBrCtlDefs::ECommandDisconnect + iCommandBase);

    iBrCtlInterface->ClearCache();
    iBrCtlInterface->RemoveLoadEventObserver(iBrCtlSampleAppLoadEventObserver);

    iBrCtlInterface->RemoveStateChangeObserver(iBrCtlSampleAppStateChangeObserver);
    delete iBrCtlInterface;
    iBrCtlInterface = NULL;
    }
    //rest of the code to delete the observers

    //code - end

    But even after cancelling earlier incomplete request(ECommandCancelFetch) & unloading HTTP (ECommandDisconnect), the application crashes.
    The above commands doesn't seems to be working.

    I am using S60 3rd Ed. FP1 device(OS v9.2).

    Has anyone successfully achieved it, PLEASE help.


    Thanks,
    Animesh.

Similar Threads

  1. A browser control issue.
    By cchheenn0914 in forum Symbian
    Replies: 1
    Last Post: 2009-07-03, 12:31
  2. Replies: 1
    Last Post: 2008-11-06, 19:54
  3. Browser Control API & JavaScript
    By fagiano in forum Symbian
    Replies: 0
    Last Post: 2007-09-07, 15:39
  4. Web browser as a control in my C++ App
    By natocm in forum Symbian User Interface
    Replies: 0
    Last Post: 2004-03-03, 16:38

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×