Index: cpp/frams/vm/classes/collectionobj.cpp
===================================================================
--- cpp/frams/vm/classes/collectionobj.cpp	(revision 464)
+++ cpp/frams/vm/classes/collectionobj.cpp	(revision 478)
@@ -49,5 +49,5 @@
 ParamEntry dictionary_paramtab[]=
 {
-{"Dictionary",1,10,"Dictionary","Dictionary associates stored values with string keys "
+{"Dictionary",1,11,"Dictionary","Dictionary associates stored values with string keys "
  "(\"key\" is the first argument in get/set/remove functions). Integer key can be "
  "used to enumerate all elements (note that while iterating, the elements are returned in no particular order).\n"
@@ -76,4 +76,6 @@
 {"toString",0,PARAM_READONLY | PARAM_NOSTATIC,"Textual form","s",GETONLY(toString),},
 {"clone",0,PARAM_NOSTATIC,"Create a clone","p oDictionary()",PROCEDURE(p_clone),"The resulting clone is a shallow copy (contains the same object references as the original). A deep copy can be obtained through serialization: String.deserialize(String.serialize(object));"},
+{"assign",0,PARAM_NOSTATIC,"Assign from another object","p(x)",PROCEDURE(p_assign),"Replaces current dictionary with dictionary contents from another object."},
+
 {0,0,0,},
 };
@@ -372,25 +374,26 @@
 }
 
+ExtValue DictionaryObject::get(SString key)
+{
+ExtValue *val=(ExtValue*)hash.get(key);
+if (val)
+	return *val;
+return ExtValue::empty();
+}
+
+ExtValue DictionaryObject::get(int index)
+{
+HashEntryIterator* iter=getIndexIterator(index);
+if (iter && (*iter)->value)
+	return *((ExtValue*)(*iter)->value);
+return ExtValue::empty();
+}
+
 void DictionaryObject::p_get(PARAMPROCARGS)
 {
 if ((args->type==TInt)||(args->type==TDouble))
-	{
-	HashEntryIterator* iter=getIndexIterator(args->getInt());
-	if (iter && (*iter)->value)
-		{
-		*ret=*((ExtValue*)(*iter)->value);
-		return;
-		}
-	}
-else
-	{
-	ExtValue *val=(ExtValue*)hash.get(args[0].getString());
-	if (val)
-		{
-		*ret=*val;
-		return;
-		}
-	}
-*ret=ExtValue();
+	*ret=get(args->getInt());
+else
+	*ret=get(args[0].getString());
 }
 
@@ -406,9 +409,16 @@
 }
 
+ExtValue DictionaryObject::set(SString key,ExtValue new_value)
+{
+ExtValue ret;
+ExtValue *new_ext=(new_value.getType()==TUnknown) ? NULL : new ExtValue(new_value);
+ExtValue *old_ext=(ExtValue*)hash.put(key,new_ext);
+if (old_ext) { ret=*old_ext; delete old_ext;}
+return ret;
+}
+
 void DictionaryObject::p_set(PARAMPROCARGS)
 {
-ExtValue *newval=(args[0].getType()==TUnknown)?0:new ExtValue(args[0]);
-ExtValue *oldval=(ExtValue*)hash.put(args[1].getString(),newval);
-if (oldval) {*ret=*oldval; delete oldval;} else *ret=ExtValue();
+*ret=set(args[1].getString(),args[0]);
 }
 
@@ -461,13 +471,27 @@
 }
 
+void DictionaryObject::copyFrom(DictionaryObject *other)
+{
+for(HashEntryIterator it(other->hash);it.isValid();it++)
+	{
+	ExtValue *v=(ExtValue*)it->value;
+	hash.put(it->key,v?new ExtValue(*v):NULL);
+	}
+}
+
 void DictionaryObject::p_clone(PARAMPROCARGS)
 {
 DictionaryObject *c=new DictionaryObject;
-for(HashEntryIterator it(hash);it.isValid();it++)
-	{
-	ExtValue *v=(ExtValue*)it->value;
-	c->hash.put(it->key,v?new ExtValue(*v):NULL);
-	}
+c->copyFrom(this);
 ret->setObject(ExtObject(&par,c));
+}
+
+void DictionaryObject::p_assign(PARAMPROCARGS)
+{
+clear();
+DictionaryObject *other=DictionaryObject::fromObject(args[0].getObject(),false);
+if (other)
+		copyFrom(other);
+ret->setEmpty();
 }
 
Index: cpp/frams/vm/classes/collectionobj.h
===================================================================
--- cpp/frams/vm/classes/collectionobj.h	(revision 464)
+++ cpp/frams/vm/classes/collectionobj.h	(revision 478)
@@ -72,5 +72,10 @@
 PARAMGETDEF(toString);
 PARAMPROCDEF(p_clone);
+PARAMPROCDEF(p_assign);
 #undef STATRICKCLASS
+ExtValue get(SString key);
+ExtValue get(int index);
+ExtValue set(SString key,ExtValue new_value);
+void copyFrom(DictionaryObject *other);
 SString serialize(SerializationFormat format) const;
 static void p_new(void*,ExtValue*args,ExtValue*ret)
