* Modify BMessageValueNode to use delayed child creation flag.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42334 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent 2011-06-28 00:20:59 +00:00
parent abacf1bd3b
commit a2d074a765
2 changed files with 2 additions and 10 deletions

View File

@ -93,7 +93,6 @@ BMessageValueNode::BMessageValueNode(ValueNodeChild* nodeChild,
:
ValueNode(nodeChild),
fType(type),
fValid(false),
fMessage()
{
fType->AcquireReference();
@ -291,9 +290,6 @@ BMessageValueNode::ResolvedLocationAndValue(ValueLoader* valueLoader,
if (error != B_OK)
return error;
fValid = true;
CreateChildren();
return B_OK;
}
@ -301,11 +297,6 @@ BMessageValueNode::ResolvedLocationAndValue(ValueLoader* valueLoader,
status_t
BMessageValueNode::CreateChildren()
{
// delay child creation until our location / value has been resolved
// since we otherwise have no idea as to what value nodes to present
if (!fValid)
return B_BAD_VALUE;
if (!fChildren.IsEmpty())
return B_OK;

View File

@ -24,6 +24,8 @@ public:
ValueLocation*& _location,
Value*& _value);
virtual bool ChildCreationNeedsValue() const
{ return true; }
virtual status_t CreateChildren();
virtual int32 CountChildren() const;
virtual ValueNodeChild* ChildAt(int32 index) const;
@ -40,7 +42,6 @@ private:
private:
Type* fType;
bool fValid;
BMessage fMessage;
ChildNodeList fChildren;
};