Languages

Menu
Sites
Language
Cant use Web::LoadData

I cant use Web::LoadData (const Tizen::Base::String &baseUrl, const Tizen::Base::ByteBuffer &content, const Tizen::Base::String &mime, const Tizen::Base::String &encoding="UTF-8")
Can you give me example use it?
Thanks.

Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

3 Replies
john Smith
Hi, You can use LoadData() using Tizen::Web::Controls::Web. Create instance of the mention class. String url = "https://www.google.com" String buf; Creates a buffer memory using Tizen::Base::ByteBuffers. The supported format is "UTF-8"; __pWeb->LoadData(url,buf, str, "UTF-8");
Kien Vu
Thanks, It's worked I can load web because url not correct, it need "http://". Now, I have new problem, i cant show picture from resource or app on web: pWeb = new Web(); pWeb->Construct(this->GetClientAreaBounds()); this->AddControl(*pWeb); String txt = ""; ByteBuffer *b = StringUtil::StringToUtf8N(txt); pWeb->LoadData("http://"+App::GetInstance()->GetAppResourcePath()+L"index.html", *b, String(L"text/html"),String(L"UTF-8"));
john Smith
Hi, You can n't use directly while you are accessing LoadData method.You have to specified file:/// +"content". String str(L"file:///"+App::GetInstance()->GetAppResourcePath()+L"index.html");