wxVariant wxPGProperty::GetDefaultValue() const
{
- wxVariant defVal = GetAttribute(wxS("DefaultValue"));
+ wxVariant defVal = GetAttribute(wxPG_ATTR_DEFAULT_VALUE);
if ( !defVal.IsNull() )
return defVal;
{
wxVariant variant = m_attributes.FindValue(name);
- return wxPGVariantToInt(variant, defVal);
+ if ( variant.IsNull() )
+ return defVal;
+
+ return variant.GetLong();
}
double wxPGProperty::GetAttributeAsDouble( const wxString& name, double defVal ) const
{
- double retVal;
wxVariant variant = m_attributes.FindValue(name);
- if ( wxPGVariantToDouble(variant, &retVal) )
- return retVal;
+ if ( variant.IsNull() )
+ return defVal;
- return defVal;
+ return variant.GetDouble();
}
wxVariant wxPGProperty::GetAttributesAsList() const
}
if ( allChildrenSpecified )
- ChildChanged(*value, i, childValue);
+ {
+ *value = ChildChanged(*value, i, childValue);
+ }
+
n++;
if ( n == (unsigned int)list.GetCount() )
break;
/*
if ( current )
+ {
wxLogDebug(wxT("%s::GetItemAtY(%i) -> %s"),this->GetLabel().c_str(),y,current->GetLabel().c_str());
+ }
else
+ {
wxLogDebug(wxT("%s::GetItemAtY(%i) -> NULL"),this->GetLabel().c_str(),y);
+ }
*/
return (wxPGProperty*) result;
}
}
-void wxPGProperty::ChildChanged( wxVariant& WXUNUSED(thisValue),
- int WXUNUSED(childIndex),
- wxVariant& WXUNUSED(childValue) ) const
+wxVariant wxPGProperty::ChildChanged( wxVariant& WXUNUSED(thisValue),
+ int WXUNUSED(childIndex),
+ wxVariant& WXUNUSED(childValue) ) const
{
+ return wxNullVariant;
}
bool wxPGProperty::AreAllChildrenSpecified( wxVariant* pendingList ) const
{
AllocExclusive();
- wxASSERT( m_data->m_refCount != 0xFFFFFFF );
+ wxASSERT( m_data->GetRefCount() != -1 );
m_data->m_items.erase(m_data->m_items.begin()+nIndex,
m_data->m_items.begin()+nIndex+count);
}
{
EnsureData();
- if ( m_data->m_refCount != 1 )
+ if ( m_data->GetRefCount() != 1 )
{
wxPGChoicesData* data = new wxPGChoicesData();
data->CopyDataFrom(m_data);
if ( data != wxPGChoicesEmptyData )
{
m_data = data;
- data->m_refCount++;
+ data->IncRef();
}
}