What I discovered is that a field (used for another feature) in my rTools general catchall plugin butts in and prevents this code from seeing the selectedText of the topStack. Indeed, if a paste a field in your TextToolBar stack (which I love, BTW), your stack fails as well. And the solution . . . wait for it . . . use the ol Richard Gaskin maneuver and set the TraversalOn of the field to false.
Thanks again, Richard! Cheers, Roger > On Aug 22, 2016, at 9:38 PM, Roger Guay <i...@mac.com> wrote: > > No, mine is indeed set to palette yet does not work and your’s works just > fine. I’ll report back when I figure out why. > > Thanks for your patience > >> On Aug 22, 2016, at 8:42 PM, Richard Gaskin <ambassa...@fourthworld.com> >> wrote: >> >> Roger wrote: >> >>> I take it back. I thought I had it working but alas, not so much. >>> I can’t make it work for a button in a palette stack (a plugin) >>> and selectedText from the Script Editor of the topStack. Here is >>> my button script: >>> >>> on mouseUp >>> set the defaultstack to the topstack >>> put the selectedtext into tText >>> if the first char of tText is not quote then put quote before tText >>> if the last char of tText is not quote then put quote after tText >>> put tText into the selectedtext >>> end mouseUp >>> >>> The traversalOn of this button is indeed unchecked. When I click >>> the button, the selectedText in the Script Editor goes unhilited, >>> and nothing else happens. Funny thing is, I could swear I had it >>> working before my previous post??? >> _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode