selectedText from a palette?

MisterX b.xavier at internet.lu
Thu Sep 9 11:56:13 EDT 2004


the flashing I dont experience on windows. I use the
mousedown message to avoid the flash but I pass the mousedown.

I also put in a lock screen just to make sure it's overkill. You
never know ;)

> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com
> [mailto:use-revolution-bounces at lists.runrev.com]On Behalf Of
> depstein at att.net
> Sent: Thursday, September 09, 2004 17:13
> To: use-revolution at lists.runrev.com
> Subject: Re: selectedText from a palette?
>
>
> Rich Layne wrote:
>
> > I trying to make an application that has most of it’s functionality on
> > a palette-- a bunch of different buttons that will do different stuff
> > to the main data stack. Most things work, but handlers that involve the
> > “selectedText” don’t seem to make it to the main stack, (which is the
> > topStack.)
>
> My experience using Metacard 2.5 is that when you click on a palette
> the selection in the topStack is lost, so the selectedText is empty.
> I use these handlers in my palette's script as a way of recording and
> restoring the selection:
>
> on mouseEnter
>   global chunkStore
>   get the selectedChunk
>   if it is empty then put empty into chunkStore else put it && "of"
> && word -2 to -1 of the long id of the selectedField into chunkStore
> end mouseEnter
>
> on mouseDown
>   global chunkStore
>   if chunkStore is not empty then do "select" && chunkStore
> end mouseDown
>
> So on mouseUp, the selection is where you want it and references to
> it should work properly.
>
> There is a slight flashing associated with the selection being lost
> and restored, so I'd be interested to hear other methods.
>
> David Epstein
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution



More information about the use-livecode mailing list