Indirect Chunk References

Ken Ray kray at sonsothunder.com
Fri Jan 7 10:12:35 EST 2005


On 1/7/05 8:32 AM, "Jim Carwardine" <JimCarwardine at OwnYourFuture-net.com>
wrote:

> Hi Folks... Maybe I'm looking at this app too long.  I do this kind of code
> all the time and I can't figure out what I doing wrong.  I'm having trouble
> with referencing a chunk.  I keep getting the actual chunk expression in my
> stack label, not the selected line it's supposed to reference.  Here's my
> handler...

I think it's because you're using the "selectedLine" instead of the
"selectedText"... 'selectedLine' returns a chunk expression; 'selectedText'
returns the highlighted text. So since you don't need any object descriptor
code, this would leave:

on eventManager theEvent
    if theEvent is empty then set the label of this stack to "New Event"
    else set the label of this stack to theEvent
end eventManager

HTH,

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the use-livecode mailing list