Preference for Keeping Saved Empty Button Scripts Empty

Mike Kerner MikeKerner at roadrunner.com
Mon Jun 19 14:07:18 EDT 2017


and a visual indicator that an object has a script might be nice, too.  A
certain tool that some of your colleagues use does that with a filled-in
top-left corner triangle.  You can look in the project browser to see which
objects have scripts assined, but that is certainly not ideal.  You could
also go the Levure route, where you assign scripts via behaviors from
script-only stacks, and you stop using the script editor for anything but
debugging.

On Mon, Jun 19, 2017 at 11:19 AM, Sannyasin Brahmanathaswami via
use-livecode <use-livecode at lists.runrev.com> wrote:

> I wrote support "complaining" that after I clear the
>
> on mouseup
>
> end mouseUp
>
> that is inserted in button scripts by default, apply, close, save. Then
> later if one inadvertently opens the script of that button, the script is
> reinserted. Panos replied this is the default behavior….gave me a hack to
>
> " edit the script of stack "revSEUtilities" at 1097"
>
> and remove the l nes that inserted that automatically. For this to persist
> you have to get hands dirty changing permission in the bundle, save the
> stack etc…then of course on upgrade.. that's gone…  Quite a hack
>
> Now that I'm slowly mastering the separation of code from GUI, I find
> myself more and more leaving buttons empty and then using, farther up the
> hierarchy (in a behavior, or back script)
>
> -------------
> on mouseup
>    put the short name of the target into tMouseEvent
> switch tMouseEvent
>    case "whatever
>    break
> end switch
> end mouseup
> -----------------
>
> of course if your button ends up with
>
> on mouseup
> end mouseup
>
> and you don't pass… your script appears "dead"   as it never gets the
> target msg.
>
> This same thing is also happening to widget that I remove the scripts from
> completely.  which is even more irritating, since in someone's infinite
> wisdom they assumed  we always want to toggle the hilite of the widget.
> This is so persistent that I have come not to a) set the color of the
> widget b) set the hilite color the same so that if that Toggle command gets
> back in there.. nothing happens, visually, because if you save the stack
> after the highlight is toggle it is "stuck" with the hilite color.  (a
> gotcha for newbies too)
>
> so, does it make sense to request a feature enhancement to add a
> preference to *not* insert any handler in buttons/widgets, whose scripts
> are empty if inadvertently opened?  there would need to be a way to
> differentiate between one newly created vs one that was previously
> instantiated, whose script had been emptied and saved
>
> BR
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."



More information about the use-livecode mailing list