Script Limits

Mark Talluto lists at canelasoftware.com
Thu Aug 7 13:07:01 EDT 2003


On Thursday, August 7, 2003, at 09:44 AM, Richard Gaskin wrote:

> Mark Talluto wrote:
>
>> In my case, I usually am updating code to controls with the set the
>> script of....   There is no other way to use the same control with new
>> code.
>
> While I agree that the proposed change to script limits is likely more 
> of a
> problem in itself than a solution, there is at lease one other 
> alternative
> for your scenario.
>
> Rather than writing self-modifying code you could set a property in the
> object and handle the various behaviors in a backscript using a switch
> block:
>
>   on MySpecialBehavior
>    switch the uBehaviorClass of the target
>     case "Something"
>       doSomnething
>       break
>     case "SomethingElse"
>       doSomethingElse
>       break
>    end switch
>   end MySpecialBehavior
>
> The overhead of the switch block is a fraction of a millisecond and 
> allows
> you to centralize your code into a common library.  This may simplify
> debugging, and likely simplify maintenance as well should you ever 
> need to
> alter the behavior.
>
>

Good idea Richard!  I would need to have the ability to  "set the 
script of...." one more time to update all their controls to use this 
new method though.  I better not delete my copy of MC 2.5 just yet.  I 
have yet to use the frontscript/backscript features.  I need to do some 
reading.  It has been on my to do list for some time.

Best regards,
Mark Talluto
http://www.canelasoftware.com




More information about the metacard mailing list