Script Limits

Mark Talluto lists at canelasoftware.com
Fri Aug 8 03:06:30 EDT 2003


On Thursday, August 7, 2003, at 01:16 PM, Richard Gaskin wrote:

> Mark Talluto wrote:
>
>> 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.
>
> Bring your questions to the next revDevCon and let's see if we can 
> shorten
> that learning cycle.  :)
>
>

This grasshopper has much to learn.  I think I will be able to attend.  
Be forewarned....I come with many questions.


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




More information about the metacard mailing list