bazaar: CtrlProp and ValueAccessorEdit: some NULL inits

git-svn-id: svn://ultimatepp.org/upp/trunk@3901 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
kohait 2011-09-22 14:59:37 +00:00
parent f9476b32bb
commit 5bd126c78a
4 changed files with 5 additions and 2 deletions

View file

@ -9,7 +9,7 @@ class PropEditCtrl : public AccessorMapCtrl
{
public:
typedef PropEditCtrl CLASSNAME;
PropEditCtrl() { WhenAction = THISBACK(OnAction); }
PropEditCtrl() : ctrl(NULL) { WhenAction = THISBACK(OnAction); }
void SetCtrl(Ctrl* c) { if(ctrl != c) { ctrl = c; UpdateCtrl(); } Update(); }
Ctrl* GetCtrl() const { return ctrl; }

View file

@ -66,6 +66,7 @@ void ValueAccessorCtrl::Updated()
//
AccessorMapCtrl::AccessorMapCtrl()
: am(NULL)
{
CtrlLayout(*this);
ac.AddColumn("Property");

View file

@ -14,6 +14,8 @@ class ValueAccessorEdit : public ParentCtrl {
public:
typedef ValueAccessorEdit CLASSNAME;
typedef ValueAccessor VA;
ValueAccessorEdit() : tg(NULL) {}
//need get set data because of serialize
virtual void SetData(const Value& v) { if(!tg) return; tg->set(v); }

View file

@ -1,4 +1,4 @@
LAYOUT(ValueAccessorEditLayout, 300, 100)
ITEM(ArrayCtrl, ac, Header(false).HSizePosZ(0, 0).VSizePosZ(0, 0))
ITEM(ArrayCtrl, ac, SetLineCy(25).VertGrid(false).Header(false).HSizePosZ(0, 0).VSizePosZ(0, 0))
END_LAYOUT