where I put my scripts

David Vaughan drvaughan55 at mac.com
Fri May 3 17:11:01 EDT 2002


On Friday, May 3, 2002, at 11:41 , Steve Messimer wrote:

> Hey Dar,
>
> Question: Where do I put my scripts.
>
> Short Answer: pretty much where ever it makes sense. ;-)
>
snip

> This is the way I learned to do it.  I would also be interested to hear 
> how
> others approach this.

Dar

Sarah stated my practices as well as I could so I'll just condense it a 
little further into a couple of basic principles which seem to cover my 
needs and result in code to which I can return:

Looking at the message path, place each script in the lowest-ranked 
object in which it can be placed once to achieve its end.

Have one script call another only to provide a common or higher function 
or information to the existing script, or to break down a task into 
modular components, applying the first rule to each such component.

Reasons:
- Ease of understanding scope
- Ease of debugging and modification
- Speed (trivial in RR)
- Flexibility to overload functions based on context, without 
interminable switches
- Modularity and information hiding
- Portability of objects and stacks to new projects or as the base for 
them

regards
David

>
> Steve
>
>
> _______________________________________________
> 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