Skip to end of metadata
Go to start of metadata

void FB::JSAPIAuto::SetProperty ( int  idx,
const variant value 
) [virtual]

Sets the value of an indexed property.

This can be used for providing array-style access on your object. For example, the following will result in a call to SetProperty with idx = 12:

       document.getElementById("plugin")[12] = "property value";
Parameters:
idx Zero-based index of the property to set the value of.
value The new property value.

Implements FB::JSAPI.

Definition at line 297 of file JSAPIAuto.cpp.

References registerAttribute().

00298 {
00299     if (!m_valid)
00300         throw object_invalidated();
00301 
00302     boost::recursive_mutex::scoped_lock lock(m_zoneMutex);
00303 
00304     std::string id(boost::lexical_cast<std::string>(idx));
00305     if (m_allowDynamicAttributes || (m_attributes.find(id) != m_attributes.end() && !m_attributes[id].readonly)) {
00306         registerAttribute(id, value);
00307     } else {
00308         throw invalid_member(FB::variant(idx).convert_cast<std::string>());
00309     }
00310 }

Here is the call graph for this function:


Generated on 19 Jun 2013 for FireBreath by  doxygen 1.6.1
Labels
  • None