-CYExpression *CYBox::Replace(CYContext &context) {
- return $C1($M($V("Instance"), $S("box")), value_);
+CYTarget *CYObjCDictionary::Replace(CYContext &context) {
+ CYList<CYElement> keys;
+ CYList<CYElement> values;
+ size_t count(0);
+
+ CYForEach (pair, pairs_) {
+ keys->*$ CYElementValue(pair->key_);
+ values->*$ CYElementValue(pair->value_);
+ ++count;
+ }
+
+ return $ CYSendDirect($V("NSDictionary"), $C_($ CYWord("dictionaryWithObjects"), $ CYArray(values), $C_($ CYWord("forKeys"), $ CYArray(keys), $C_($ CYWord("count"), $D(count)))));