I wanted to ask why as well. You can put all the scripts necessary in a card, 
and if you need to know the actual object the user interacted with use the 
target command. 

Eg.

Local lTargetID

On mouseUp
   Put the long id of the target into lTargetID
   
   /*
   Your script here
   */
End mouseUp

Bob S


> On Jul 20, 2023, at 5:52 PM, Richard Gaskin via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Paul Dupuis wrote:
>> So in the instances where you have a script that creates an object
>> and then sets the script of that object (example below), what is you
>> best practice for having the script in a script and still be readable?
>  
> Why?
>  
> Among other concerns (robustness, debugging, maintenance), setting the script 
> of an object requires turning off script encryption.
>  
> Dick Kriesel wrote:
>> 
> 
> Hi, Paul. The best way to set the script may be not to; that is, instead
>> set the new object’s behavior to a button that contains the readable script.
>  
> ^ this.
>  
> Simple, clean, with-the-grain.
>  
> Know the engine.
> Trust the engine.
> Use the engine.
>  
> --  
> Richard Gaskin
> Fourth World System

_______________________________________________
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

Reply via email to