﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	mlocked
8020	UIUtilDisp is some strange....	sunny an	stuartm	"{{{
template <typename ErrorDispatch = ETPrintWarning>
struct UIUtilDisp
{
    template <typename ContainerType, typename UIType>
    static bool Assign(ContainerType *container, UIType *&item,
                       const QString &name, bool *err = NULL)
    {
        if (!container)
        {
            if (err)
                *err |= ErrorDispatch::Container(name);
            else
                ErrorDispatch::Container(name);
            return true;
        }

        item = dynamic_cast<UIType *>(container->GetChild(name));

        if (item)
            return false;
        
        /* from here, item had NULL definitely. Where err value is set from? */

        if (err)
            *err |= ErrorDispatch::Child(container->objectName(), name);
        else
            ErrorDispatch::Child(container->objectName(), name);
        return true;
    }
};

}}}

above code snippet is in lib/libmythui/mythuiutls.h

In following codes, event though GetChild(""ex"") failed, err get false.[[BR]]
But I think that err should have get true after run UIUtilE::Assign. 

    bool err = false;[[BR]]
    UIUtilE::Assign(this, m_example, ""ex"", &err);
 

"	defect	closed	minor	0.24	MythTV - User Interface Library	0.22	medium	Invalid	Assign		0
