summaryrefslogtreecommitdiff
path: root/indra/llui/llview.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llview.h')
-rw-r--r--indra/llui/llview.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index ff7a1afb38..ae0df61599 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -485,7 +485,7 @@ public:
// did we find *something* with that name?
if (child)
{
- llwarns << "Found child named " << name << " but of wrong type" << llendl;
+ llwarns << "Found child named " << name << " but of wrong type " << typeid(child).name() << ", expecting " << typeid(T).name() << llendl;
}
if (create_if_missing)
{
@@ -496,6 +496,11 @@ public:
return result;
}
+ template <class T> T& getChildRef(const std::string& name, BOOL recurse = TRUE) const
+ {
+ return *getChild<T>(name, recurse, TRUE);
+ }
+
virtual LLView* getChildView(const std::string& name, BOOL recurse = TRUE, BOOL create_if_missing = TRUE) const;
template <class T> T* createDummyWidget(const std::string& name) const