The long id of the target just points to the filed itself not to anything specific inside the field (i.e. field id 1004 of card id 1002 of stack "Untitled 1"). What I need is the char 23 to char 30 of the field.

ChickChar only gives me the char number clicked on but the the entire linked phrase. Is there a way to get the start and end chars of a linked textStyle?

Bill Vlahos

On Nov 11, 2006, at 3:09 PM, Ken Ray wrote:

On 11/11/06 4:37 PM, "Bill Vlahos" <[EMAIL PROTECTED]> wrote:

The following handler in the locked field will give me the grouped text
itself:
on linkClicked theText
   put theText
end linkClicked

...but it won't tell me
1. Which group it was in the field (can I identify multiple linked
texts in a field)?
2. How do I replace the original text group? (I.e. put varText into
group 2 of field "form")
3. How do I keep the replaced text also as a group?

You should be able to use "the target"... here's how this would work:

on linkClicked pText
  put the long id of the target into tTarget
  ask "Replacement:"
  if it <> "" then
    do "put it into" && tTarget
    set the textStyle of char 1 to \
       length(the text of tTarget) of tTarget to link
  end if
end linkClicked

Have fun!

Ken Ray
Sons of Thunder Software, Inc.
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to