Changing array key text

Brian Milby brian at milby7.com
Mon Jun 24 22:00:43 EDT 2019


Close, here's the actual code (part of setArrayKeyOnPath):

      put xArray[item 1 of pPath] into tSubArray
      delete variable xArray[item 1 of pPath]
      put tSubArray into xArray[pKey]

I didn't specify the first step in my original answer.  I only knew about
this because I had been looking at that code a while back trying to change
some things about how the PI worked for custom properties.  I think a
couple of improvements made it in.

On Mon, Jun 24, 2019 at 8:36 PM Mark Wieder via use-livecode <
use-livecode at lists.runrev.com> wrote:

> On 6/24/19 12:37 PM, Brian Milby via use-livecode wrote:
> > I’m pretty sure the PI deletes the old key and creates a new key with
> the existing value.
>
> I'm pretty sure (in this post-facts world I haven't actually looked)
> it's the other way around: copy the existing contents into the new key,
> *then* delete the old key.
>
> --
>   Mark Wieder
>   ahsoftware at gmail.com
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list