[Bf-python] Clearing single scriptlink

Ken Hughes khughes at pacific.edu
Mon Mar 21 01:24:14 CET 2005


Stephen Swaney wrote:
> On Sun, Mar 20, 2005 at 05:03:41AM -0800, Gert De Roost wrote:
> 
>>Not doing this will however be a common oversight, so
>>it might be saver to get clearScriptLinks to take
>>optional arguments like this:
>>
>>clearScriptLinks("script1", "script2", "script3",...)
> 
> 
> If you are passing a variable number of arguments,
> you probably want to do it as a list:
> 
> clearScriptLinks( [ "script1", "script2", "script3" ] )
> 

This sounded cool, so I thought I'd try implementing it
(took maybe 1 1/2 hours).  But after starting to work on
it realized we need to define what it does a little more
thoroughly:
* what happens if a "script2" isn't linked?  Ignore it,
   throw an exception?
* what if a script is linked more than once? can't think
   why someone would want to do this, but it's possible.
   Delete all occurances, just the first (or last)?

Ken



More information about the Bf-python mailing list