开发者

Web control in bada not loading if created with UiBuilder

I'm trying to display a webpage inside the web control, when I create the control programmatically all works perfectly, but when I create the control using the Ui Builder (XML) and then get the control and instruct it to load a url:

__pWebControl = static_cast<Web*>(GetControl(L"IDC_WEB1"));
__pWebControl->L开发者_JS百科oadUrl("http://www.google.es");

it just shows a blank page, like nothing has done. (Note: I've tried to call form->RequestDraw() with no success either)

Thanks.


Did you try waiting about two seconds before the redraw?

I've been using Osp::Web::Controls::Web in my apps extensively to display any kind of (non-editable, formatted) text. I ended up having to wait about a second or two before refreshing the entire frame to see any content in it.

OnTimerExpired(Osp::Base::Runtime::Timer& timer)
{
    m_pFrame->RequestRedraw();
    delete pTimerImp;
}

the timer is set like this:

pTimerImp = new Timer;
pTimerImp->Construct(*this);
pTimerImp->Start(2000);

Redrawing without waiting has always resulted in empty Web's on both WQVGA (slower) and WVGA (faster) models under both 1.1 (WQVGA) and 1.0/1.2 (WVGA).

Have you tried doing the same trick? It may help.


Have you tried to use Reload() after LoadUrl()?

I use SDK 2.0.3 and there is a WebControl which works quite well, so if you still have this problem, try the new SDK Version.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜