Index: cpp/frams/_demos/serial_test.cpp
===================================================================
--- cpp/frams/_demos/serial_test.cpp	(revision 170)
+++ cpp/frams/_demos/serial_test.cpp	(revision 171)
@@ -44,5 +44,5 @@
 			return;
 			}
-		VectorObject *vec=VectorObject::fromObject(v->getObject());
+		VectorObject *vec=VectorObject::fromObject(v->getObject(),false);
 		if (vec)
 			{
@@ -52,5 +52,5 @@
 			return;
 			}
-		DictionaryObject *dict=DictionaryObject::fromObject(v->getObject());
+		DictionaryObject *dict=DictionaryObject::fromObject(v->getObject(),false);
 		if (dict)
 			{
Index: cpp/frams/util/extvalue.cpp
===================================================================
--- cpp/frams/util/extvalue.cpp	(revision 170)
+++ cpp/frams/util/extvalue.cpp	(revision 171)
@@ -56,5 +56,5 @@
 if (!(subtype&1)) return false;
 if (dbobject->refcount==1) return false;
-VectorObject* v=VectorObject::fromObject(*this);
+VectorObject* v=VectorObject::fromObject(*this,false);
 if (v)
 	{
@@ -72,5 +72,5 @@
 }
 
-void* ExtObject::getTarget(const char* classname, bool through_barrier) const
+void* ExtObject::getTarget(const char* classname, bool through_barrier, bool warn) const
 {
 if (!strcmp(interfaceName(),classname))
@@ -81,7 +81,13 @@
 	BarrierObject *bo=BarrierObject::fromObject(*this);
 	if (bo)
-		return bo->getSourceObject().getTarget(classname);
+		return bo->getSourceObject().getTarget(classname,true,warn);
 	}
 #endif
+
+if (warn)
+	{
+	FMprintf("ExtValue","getObjectTarget",FMLV_WARN,"%s object expected, %s found",classname,interfaceName());
+	}
+
 return NULL;
 }
@@ -173,8 +179,8 @@
 
 if (isEmpty()) return SString();
-VectorObject *vec=VectorObject::fromObject(*this);
+VectorObject *vec=VectorObject::fromObject(*this,false);
 if (vec)
 	return vec->serialize();
-DictionaryObject *dic=DictionaryObject::fromObject(*this);
+DictionaryObject *dic=DictionaryObject::fromObject(*this,false);
 if (dic)
 	return dic->serialize();
@@ -215,4 +221,21 @@
 ///////////////////////////////////////
 
+void *ExtValue::getObjectTarget(const char* classname,bool warn) const
+{
+if (type!=TObj)
+	{
+	if (warn)
+		{
+		SString tmp=getString();
+		if (tmp.len()>30) tmp=tmp.substr(0,30)+"...";
+		if (type==TString) tmp=SString("\"")+tmp+SString("\"");
+		FMprintf("ExtValue","getObjectTarget",FMLV_WARN,"%s object expected, %s found",classname,(const char*)tmp);
+		}
+	return NULL;
+	}
+
+return getObject().getTarget(classname,true,warn);
+}
+
 void ExtValue::set(const ExtValue& src)
 {
@@ -326,6 +349,6 @@
 	case TObj:
 		{
-		VectorObject *vec=VectorObject::fromObject(getObject());
-		VectorObject *vec2=VectorObject::fromObject(src.getObject());
+		VectorObject *vec=VectorObject::fromObject(getObject(),false);
+		VectorObject *vec2=VectorObject::fromObject(src.getObject(),false);
 		if (vec && vec2)
 			{
@@ -368,5 +391,5 @@
 	case TObj:
 		{
-		VectorObject *vec=VectorObject::fromObject(getObject());
+		VectorObject *vec=VectorObject::fromObject(getObject(),false);
 		if (vec)
 			{
@@ -532,5 +555,5 @@
 	case TString:
 	{
-	VectorObject *vec=VectorObject::fromObject(src.getObject());
+	VectorObject *vec=VectorObject::fromObject(src.getObject(),false);
 	if (vec)
 		sdata()=format(sdata(),(const ExtValue**)&vec->data.getref(0),vec->data.size());
@@ -815,5 +838,5 @@
 	if (cls && (tmp.getType()!=TUnknown) && (tmp.getType()!=TInvalid))
 		{
-		VectorObject *vec=VectorObject::fromObject(tmp.getObject());
+		VectorObject *vec=VectorObject::fromObject(tmp.getObject(),false);
 		if (vec)
 			{
@@ -826,5 +849,5 @@
 				}
 			}
-		DictionaryObject *dic=DictionaryObject::fromObject(tmp.getObject());
+		DictionaryObject *dic=DictionaryObject::fromObject(tmp.getObject(),false);
 		if (dic)
 			{
Index: cpp/frams/util/extvalue.h
===================================================================
--- cpp/frams/util/extvalue.h	(revision 170)
+++ cpp/frams/util/extvalue.h	(revision 171)
@@ -58,5 +58,5 @@
 bool matchesInterfaceName(ParamInterface* pi) const {return !strcmp(interfaceName(),pi->getName());}
 void* getTarget() const {return (subtype&1)?dbobject:object;}
-void* getTarget(const char* classname, bool through_barrier=true) const;
+void* getTarget(const char* classname, bool through_barrier=true, bool warn=true) const;
 void setEmpty() {decref();subtype=0;param=NULL;object=NULL;}
 int isEmpty() const {return !param;}
@@ -142,5 +142,5 @@
 bool makeUnique() {return (type==TObj) && odata().makeUnique();} //< @return false if nothing has changed
 ExtPType getType() {return type;}
-void *getObjectTarget(const char* classname) {return (type==TObj)?getObject().getTarget(classname):0;}
+void *getObjectTarget(const char* classname,bool warn=true) const;
 void setInt(long v) {if (type!=TInt) setri(v); else idata()=v;}
 void setDouble(double v) {if (type!=TDouble) setrd(v); else ddata()=v;}
Index: cpp/frams/vm/classes/3dobject.cpp
===================================================================
--- cpp/frams/vm/classes/3dobject.cpp	(revision 170)
+++ cpp/frams/vm/classes/3dobject.cpp	(revision 171)
@@ -193,7 +193,5 @@
 Pt3D_Ext* Pt3D_Ext::fromObject(const ExtValue& v)
 {
-if (v.type!=TObj) return 0;
-const ExtObject& o=v.getObject();
-return (Pt3D_Ext*)o.getTarget(getStaticParam().getName());
+return (Pt3D_Ext*)v.getObjectTarget(getStaticParam().getName());
 }
 
@@ -444,7 +442,5 @@
 Orient_Ext* Orient_Ext::fromObject(const ExtValue& v)
 {
-if (v.type!=TObj) return 0;
-const ExtObject& o=v.getObject();
-return (Orient_Ext*)o.getTarget(getStaticParam().getName());
+return (Orient_Ext*)v.getObjectTarget(getStaticParam().getName());
 }
 
@@ -573,6 +569,4 @@
 ReferenceObj* ReferenceObj::fromObject(const ExtValue& v)
 {
-if (v.type!=TObj) return 0;
-const ExtObject& o=v.getObject();
-return (ReferenceObj*)o.getTarget(getStaticParam().getName());
-}
+return (ReferenceObj*)v.getObjectTarget(getStaticParam().getName());
+}
Index: cpp/frams/vm/classes/collectionobj.cpp
===================================================================
--- cpp/frams/vm/classes/collectionobj.cpp	(revision 170)
+++ cpp/frams/vm/classes/collectionobj.cpp	(revision 171)
@@ -266,7 +266,7 @@
 }
 
-VectorObject* VectorObject::fromObject(const ExtObject& o)
-{
-return (VectorObject*)o.getTarget(par.getName());
+VectorObject* VectorObject::fromObject(const ExtObject& o, bool warn)
+{
+return (VectorObject*)o.getTarget(par.getName(),true,warn);
 }
 
@@ -424,7 +424,7 @@
 }
 
-DictionaryObject* DictionaryObject::fromObject(const ExtObject& o)
-{
-return (DictionaryObject*)o.getTarget(par.getName());
+DictionaryObject* DictionaryObject::fromObject(const ExtObject& o, bool warn)
+{
+return (DictionaryObject*)o.getTarget(par.getName(), true, warn);
 }
 
Index: cpp/frams/vm/classes/collectionobj.h
===================================================================
--- cpp/frams/vm/classes/collectionobj.h	(revision 170)
+++ cpp/frams/vm/classes/collectionobj.h	(revision 171)
@@ -44,5 +44,5 @@
 ExtObject makeObject() {return ExtObject(&par,this);}
 
-static VectorObject* fromObject(const ExtObject& o);
+static VectorObject* fromObject(const ExtObject& o, bool warn=true);
 };
 
@@ -74,5 +74,5 @@
 static void p_new(void*,ExtValue*args,ExtValue*ret)
 	{ret->setObject(ExtObject(&par,new DictionaryObject));}
-static DictionaryObject* fromObject(const ExtObject& v);
+static DictionaryObject* fromObject(const ExtObject& v, bool warn=true);
 ExtObject makeObject() {return ExtObject(&par,this);}
 };
Index: cpp/frams/vm/classes/genoobj.cpp
===================================================================
--- cpp/frams/vm/classes/genoobj.cpp	(revision 170)
+++ cpp/frams/vm/classes/genoobj.cpp	(revision 171)
@@ -107,9 +107,6 @@
 }
 
-Geno* GenoObj::fromObject(const ExtValue& v)
+Geno* GenoObj::fromObject(const ExtValue& v, bool warn)
 {
-if (v.type!=TObj) return 0;
-const ExtObject& o=v.getObject();
-//if ((o.param!=&getStaticParam())&&(o.param!=&getDynamicParam())) return 0;
-return (Geno*)o.getTarget(getStaticParam().getName());
+return (Geno*)v.getObjectTarget(getStaticParam().getName(), warn);
 }
Index: cpp/frams/vm/classes/genoobj.h
===================================================================
--- cpp/frams/vm/classes/genoobj.h	(revision 170)
+++ cpp/frams/vm/classes/genoobj.h	(revision 171)
@@ -33,5 +33,5 @@
 static ExtObject makeDynamicObject(Geno* g);
 static ExtObject makeDynamicObjectAndDecRef(Geno* g);
-static Geno* fromObject(const ExtValue& v);
+static Geno* fromObject(const ExtValue& v, bool warn=true);
 static ParamInterface* getInterface();
 
