Should be simple: rename a stack that contains behavior buttons?

Geoff Canyon gcanyon at gmail.com
Wed Jan 7 09:41:39 EST 2015


On Wed, Jan 7, 2015 at 3:01 AM, Scott Rossi <scott at tactilemedia.com> wrote:

> You don’t really say what the “bad things” are.


Sorry, I was being lazy -- I was trying to rename Navigator using Navigator
itself to do the work. Of course, as a plugin, there were no debugging
messages being given, so all I knew was that it was falling into a hole and
getting stuck. I rewrote the thing as a button script in a stack (below)
and it worked.

on mouseUp
   put the controlIDs of cd "display" of stack "revNavigator" into cIDList

   repeat for each line cID in cIDList
      put the long id of control id cID of cd "display" of stack
"revNavigator" into tID
      if the behavior of tID is empty then next repeat
      put word 3 of the behavior of tID into tB
      set the behavior of tID to the long id of btn id tB of stack
"revnavigator"
   end repeat
end mouseUp



More information about the use-livecode mailing list