What steps will reproduce the problem?
1.
add to FBTestPluginAPI.cpp this code
registerMethod("getData", make_method(this, &FBTestPluginAPI::getData));
[...]
FB::VariantMap FBTestPluginAPI::getData()
{
FB::VariantMap map;
map["Name"] = "Richard Bateman";
map["Location"] = "Somewhere in Utah";
map["EyeColor"] = "Hazel";
map["HairColor"] = "Brown";
FB::VariantMap kids;
kids["1"] = "Caleb";
kids["2"] = "Unknown";
kids["10"] = "Ok, I only have one, but I'm filling space";
map["Kids"] = kids;
return map;
}
2.
change function in FBControl.html:
function load() {
a = plugin().getData();
console.log(plugin().getObjectKeys(a)); // EyeColor,HairColor,Kids,Location,Name
// console.log(plugin().getObjectKeys(a["Kids"])); // Exception rised in IE
(: Invalid argument conversion from class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > to class
boost::shared_ptr<class FB::BrowserObjectAPI> at index 1)
for (i in a["Kids"]) {
console.log(i); // in NPAPI worked; IE never come here
// google-chrome printed in console:
//["EyeColor", "HairColor", "Kids", "Location", "Name"]
//1
//2
//10
}
}
What is the expected output? What do you see instead?
expected output like in NPAPI based browsers
["EyeColor", "HairColor", "Kids", "Location", "Name"]
["1", "10", "2"]
1
2
10
Original issue reported on code.google.com by bignikita on 24 Sep 2010 at 2:13
Original issue reported on code.google.com by
bignikita
on 24 Sep 2010 at 2:13