In my previous email I was pointing the finger at g.handleUnl doing something wrong for SegundoBob's use case. However, I played with that a little bit and it seems to handle links to clones with the same parent just fine. Now I'm suspecting c.vnode2allPositions is not appropriate for the use case.
Try pasting these nodes and use ctrl-b on either of the 'child' clones. Then change which line is commented out and use ctrl-b again. In both cases the same position is selected. IOW, it looks to me like even though c.vnode2allPositions is returning two positions, they both point to the same position in the outline. The purpose of vnode2allPositions must be different than I expect. <?xml version="1.0" encoding="utf-8"?> <!-- Created by Leo: http://leoeditor.com/leo_toc.html --> <leo_file xmlns:leo="http://leoeditor.com/namespaces/leo-python-editor/1.1" > <leo_header file_format="2"/> <vnodes> <v t="btheado.20191008074512.1"><vh>test</vh> <v t="btheado.20191008074524.1"><vh>child</vh></v> <v t="btheado.20191008074524.1"></v> </v> </vnodes> <tnodes> <t tx="btheado.20191008074512.1">@language python</t> <t tx="btheado.20191008074524.1"># Try ctrl-b with each of these lines and it will select the same position c.selectPosition(c.vnode2allPositions(p.v)[0]) #c.selectPosition(c.vnode2allPositions(p.v)[1]) </t> </tnodes> </leo_file> On Tue, Oct 8, 2019 at 3:59 AM Edward K. Ream <[email protected]> wrote: > On Mon, Oct 7, 2019 at 5:49 PM Segundo Bob <[email protected]> wrote: > > Brian is right. Edward, I think your fix does not fix the problem. >> > > Please let me know what code you want, and i'll put it in. Better yet, > you could do it yourself. > > Edward > > -- > You received this message because you are subscribed to the Google Groups > "leo-editor" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/leo-editor/CAMF8tS0DCt4GyhBQ4EG-Ujoj3EuXDuHuorWHYDwsztQnTHRcSw%40mail.gmail.com > <https://groups.google.com/d/msgid/leo-editor/CAMF8tS0DCt4GyhBQ4EG-Ujoj3EuXDuHuorWHYDwsztQnTHRcSw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/CAO5X8CwTJ9LwDip591ou4Ga9CTzaAH5B7b_zfoYe3ceR5r9EEg%40mail.gmail.com.
