I need a little help on the property code here.  I'm trying to get the
"text" property off an arbitrary object (that IMHO being the right way to
do 'Copy Text').  I can get a PropertyDesc from the object, but don't see
any regular way to get the matching Property, since the interface is aimed
at dialogs.  Am I missing something, or is the interface missing something?
What I do right now is:

  Focus *focus = active_focus();
  Object *obj;
  Property *textprop;
  PropDescription *plist;

  if ((focus == NULL) || (!focus->has_focus)) return;

  obj = focus->obj;

  if (obj->obj_ops.describe_props_func == NULL)
    return;

  /* This should give me the standard text property desc */
  plist = prop_desc_list_find_prop(obj->obj_obs.describe_props_func(obj),
                                   "text");

  if (plist == NULL)
    return;

  /* Now how do I go from plist to textprop? */

Thanks,
-Lars

-- 
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause) | H�rdgrim of Numenor
"I do not agree with a word that you say, but I    | Retainer of Sir Kegg
will defend to the death your right to say it."    |   of Westfield
    --Evelyn Beatrice Hall paraphrasing Voltaire   | Chaos Berserker of Khorne

Reply via email to