void wxPropertyValue::Delete(wxPropertyValue *node)
{
wxPropertyValue *expr = GetFirst();
-
+
wxPropertyValue *previous = NULL;
while (expr && (expr != node))
{
{
if (previous)
previous->m_next = expr->m_next;
-
+
// If node was the first in the list,
// make the list point to the NEXT one.
if (GetFirst() == expr)
case wxPropertyValueStringPtr:
return new wxPropertyValue(m_value.stringPtr);
- case wxPropertyValueNull:
-#ifdef __X__
- cerr << "Should never get here!\n";
-#endif
+ case wxPropertyValueNull:
+ wxFAIL_MSG( _T("Should never get here!\n" ) );
break;
}
return NULL;
case wxPropertyValueReal:
(*this) = copyFrom.RealValue();
return ;
-
+
case wxPropertyValueString:
(*this) = wxString(copyFrom.StringValue());
return ;
-
+
case wxPropertyValuebool:
(*this) = copyFrom.BoolValue();
return ;
case wxPropertyValueStringPtr:
{
wxChar** s = copyFrom.StringValuePtr();
+
+#if 0
+ // what is this? are you trying to assign a bool or a string? VA can't figure it out..
+#if defined(__VISAGECPP__) || defined( __VISUALC__ )
+ (*this) = s;
+#else
+ (*this) = s != 0;
+#endif
+#endif // if 0
+
+ // TODO: check if this is right. MB
+ //
(*this) = s;
+
return ;
}
-
+
case wxPropertyValueList:
{
m_value.first = NULL;
}
return;
}
- case wxPropertyValueNull:
-#ifdef __X__
- cerr << "Should never get here!\n";
-#endif
+ case wxPropertyValueNull:
+ wxFAIL_MSG( _T("Should never get here!\n" ) );
break;
}
}
stream.Append( _T(" ") );
node->WritePropertyType(stream);
node = node->m_next;
- if (node)
+ if (node)
stream.Append( _T(",\n" ) );
first = FALSE;
}
{
expr->WritePropertyType(stream);
expr = expr->m_next;
- if (expr)
+ if (expr)
stream.Append( _T(", ") );
}
stream.Append( _T("]") );
else
*m_value.stringPtr = NULL;
}
-
+
m_clientData = NULL;
m_next = NULL;
m_last = NULL;
/*
* A property (name plus value)
*/
-
+
IMPLEMENT_DYNAMIC_CLASS(wxProperty, wxObject)
wxProperty::wxProperty(void)
/*
* Base property view class
*/
-
+
IMPLEMENT_DYNAMIC_CLASS(wxPropertyView, wxEvtHandler)
wxPropertyView::wxPropertyView(long flags)
{
if (property->GetValidator())
return property->GetValidator();
-
+
wxNode *node = m_validatorRegistryList.First();
while (node)
{
}
bool wxPropertySheet::HasProperty(const wxString& name) const
-{
- return (GetProperty(name)?TRUE:FALSE);
+{
+ return (GetProperty(name)?TRUE:FALSE);
}
// Clear all properties
wxProperty *prop = (wxProperty *)node->Data();
prop->GetValue().SetModified(flag);
node = node->Next();
- }
+ }
}
/*
{
BeginFind();
wxNode *node;
- while ((node = Next()))
+ while ((node = Next()) != NULL)
{
delete (wxPropertyValidator *)node->Data();
}