----- Original Message -----
From: "Howdy-Tzi" <[EMAIL PROTECTED]>


> At 10:39 -0500 06/12/2002, [EMAIL PROTECTED] wrote:
>
> >Ok so I've got a few nested proplists where the property is spelled
wrong.
> >I can get the property via gAreas[1].getPropAt(1), but there's no
> >setPropat?
>
> That's correct. It's a lack that I've felt a few times myself. To
> work around it you basically have to rebuild the list with corrected
> prop values.

Why rebuild the entire list? It's quite an easy problem to solve, actually.
The workaround function is only two lines!

on renameProp lst, oldName, newName
  lst[ newName ] = lst[ oldName ]
  lst.deleteProp( oldName )
end

> If you wanted to I suppose you could convert the list to a string,
> then correct the spelling of the flooey term, then pass the list
> through a value filter again. I don't know if that would be faster or
> not but it might be the way I'd go about doing it.

I would expect that method would be extremely slow, plus it would choke on
objects. It could also get a bit out of hand with large nested lists.

- Robert

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to