List of handlers

Peter M. Brigham, MD pmbrig at gmail.com
Sat Sep 10 07:26:24 EDT 2011


On Sep 9, 2011, at 11:56 PM, Phil Davis wrote:

> Hi Peter,
> 
> Actually the 'filter' command I described will only include the 'end' statements that start at char 1 of a line. Normally, only 'end <handler>' statements would be in that category. (I'm assuming the coder used a script editor like LC's which indents for readability.) But if the script code outside of any handler, then your scenario could certainly happen.

Ah, right.

> Phil
> 
> 
> On 9/9/11 7:09 PM, Peter M. Brigham, MD wrote:
>> The filter with "end*" will pick up "end if" and "end repeat" and "end try" as well.
>> -- first:
>> replace "end if" with empty in tList
>> replace "end repeat" with empty in tList
>> replace "end try" with empty in tList
>> -- then
>> filter tList with "end*"
>> replace cr&  "end " with cr in tList
>> 
>> -- Peter
>> 
>> Peter M. Brigham
>> pmbrig at gmail.com
>> http://home.comcast.net/~pmbrig
>> 
>> 
>> On Sep 9, 2011, at 8:33 PM, Phil Davis wrote:
>> 
>>> Or try this:
>>> 
>>>   put script of<your control>  into tList
>>>   filter tList with "end " -- EVERY handler ends this way
>>>   replace (cr&  "end ") with cr in tList -- remove 'end' from each line
>>>   sort lines of tList -- if you like
>>>   put tList
>>> 
>>> 
>>> Phil Davis

-- Peter

Peter M. Brigham
pmbrig at gmail.com
http://home.comcast.net/~pmbrig





More information about the use-livecode mailing list