Script Limits
Richard Gaskin
ambassador at fourthworld.com
Thu Aug 7 16:25:00 EDT 2003
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. :)
--
Richard Gaskin
Fourth World Media Corporation
Developer of WebMerge: Publish any database on any Web site
___________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
Tel: 323-225-3717 AIM: FourthWorldInc
More information about the metacard
mailing list