@tbpassin thanks for your observation that the script works. Occasionally I 
use the script to locate a Gnx that appears in a console ouput.

>From Leo's glossary on Gnx:
 *Such gnx’s permanently and uniquely identify nodes. Gnx’s have the form:*

*id.yyyymmddhhmmssid.yyyymmddhhmmss.n*

So it seemed reasonable to me that if I enter such a Gnx that g.findGnx 
would work.

On Wednesday, July 19, 2023 at 6:07:43 AM UTC+10 [email protected] wrote:

> I didn't word that right. I meant that the string returned by the dialog 
> isn't a gnx string that can be found.  In my test case, the gnx in the 
> clipboard started with "*gnx:*" When I manually removed the "*gnx:*" 
> prefix, @Lewis's script ran correctly. 
>
> On Tuesday, July 18, 2023 at 3:58:56 PM UTC-4 Thomas Passin wrote:
>
>> The problem here is not with findGnx() or es_clickable_link().  The 
>> problem is that  g.app.gui.runAskOkCancelStringDialog(c,'SEARCH Node by 
>> GNX',"Enter search GNX: ") is failing to find an existing gnx*.*  
>> Checking to see if it has returned None or not will prevent a exception, 
>> but the failure is a bug.
>>
>> This statement is based on the one  test case I ran, in which I got the 
>> gnx into the clipboard and pasted it from there into the dialog.
>> On Tuesday, July 18, 2023 at 9:20:47 AM UTC-4 Edward K. Ream wrote:
>>
>>> On Tue, Jul 18, 2023 at 7:11 AM lewis <[email protected]> wrote:
>>>
>>> Have you used 
>>>> *p0 = g.findGnx(GNX_ID, c)  # moves to position p0 *
>>>> to replicate the issue?
>>>>
>>>
>>> No. Why should I?  The problem is with GNX_ID.
>>>
>>> execute-script with the following works for me:
>>>
>>> print(p)
>>> prev = p.back()
>>> gnx = prev.gnx
>>> p0 = g.findGnx(gnx, c)  # moves to position p0 
>>> print(p0)
>>>
>>> The result:
>>>
>>> <pos 2813234759936 childIndex: 7 lvl: 0 key: 2813208689856:7 --- 
>>> response re script error>
>>> <pos 2813234779584 childIndex: 7 lvl: 0 key: 2813208689856:7 --- 
>>> response re script error>
>>> <pos 2813235231360 childIndex: 7 lvl: 0 key: 2813208689856:7 --- 
>>> response re script error>
>>> <pos 2815272710784 childIndex: 6 lvl: 0 key: 2813207467584:6 Recent code>
>>>
>>> This is *your* scripting problem, not mine.
>>>
>>> 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/d75ffa41-6ab0-4528-b5d1-252436ad3fb1n%40googlegroups.com.

Reply via email to