Editing locked or List fields

Peter Brigham MD pmbrig at gmail.com
Mon Jan 3 07:32:05 EST 2011


On Jan 3, 2011, at 4:49 AM, Sivakatirswami wrote:

> Aloha Peter:
>
> Now this what i call a Prime New Year gift!
>
> Sweet.
>
> And, yes, I do work a lot with list fields  and to make lists  
> editable I had to add this to your script
>
>      set the listBehavior of the target to not tf
>
> but then this toggles all fields to listbehavior when locked... . so  
> it required more....
>
> the problem is you can determine if a field has listbehavior when it  
> is set, but if you turn listbehavior off, then one needs a way to  
> preserve the fact that this is a list field, even when it's  
> listbehavior is off.
>
> So I added a custom prop to list fields so that they maintain their  
> list property thru the editing session.   Perhaps there is a better  
> way, but this works:
>
> by adding this to your setProp handler
>
>      if the listbehavior of the target is true then
>         set the uList of the target to true
>      end if
>      if the uList of target = true then
>         set the listBehavior of the target to not tf
>      end if

Nice. I'm revising my library handlers accordingly, since I will  
probably by using list fields in the future.

-- Peter

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






More information about the use-livecode mailing list