Method code for $message_frob.eval_ctext()

[Turn off line numbering]
  1: arg this, vars;
  2: var key, new, temp, t, list, vars, okey, keys;
  3: 
  4: new = .new();
  5: vars = vars.add('this, sender());
  6: if (dict_contains(this, "general"))
  7:     vars = vars.add("$general", "general");
  8: if (vars['varkeys]) {
  9:     for temp in (vars['varkeys]) {
 10:         okey = temp[2];
 11:         key = temp[1] + "." + (| vars[temp[2]].objname() |);
 12:         if (dict_contains(this, key)) {
 13:             this = dict_add(this, temp[1], this[key]);
 14:             this = dict_del(this, key);
 15:         }
 16:     }
 17:     for key in (dict_keys(this)) {
 18:         okey = "$" + key;
 19:         if (dict_contains(vars, okey) || dict_contains(vars, key)) {
 20:             temp = this[key].set_var('this, vars['this]).eval_ctext();
 21:             new = new.add_entry((| vars[okey] |) || vars[key], temp);
 22:         }
 23:     }
 24: } else {
 25:     for key in (dict_keys(this)) {
 26:         temp = this[key].set_var('this, vars['this]).eval_ctext();
 27:         new = new.add_entry((| vars["$" + key] |) || vars[key], temp);
 28:     }
 29: }
 30: return new;

// Created 27-Mar-1995 as a part of ColdCore, see: @help Credit

Tlon