Re: Search for node by GNX with g.findGnx

2023-07-18 Thread Edward K. Ream
On Tue, Jul 18, 2023 at 4:08 PM Thomas Passin wrote: > I think that findGnx() should work whether or not the string starts with > the "gnx:" prefix. > That would be another function. I'm not going to change anything just because people are confused. Why are we discussing this? Copy a gnx-base u

Re: Search for node by GNX with g.findGnx

2023-07-18 Thread Thomas Passin
I think that findGnx() should work whether or not the string starts with the "gnx:" prefix. On Tuesday, July 18, 2023 at 4:16:31 PM UTC-4 Edward K. Ream wrote: > On Tue, Jul 18, 2023 at 3:07 PM Thomas Passin wrote: > >> I didn't word that right. I meant that the string returned by the dialog >

Re: Search for node by GNX with g.findGnx

2023-07-18 Thread Edward K. Ream
On Tue, Jul 18, 2023 at 3:07 PM Thomas Passin 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

Re: Search for node by GNX with g.findGnx

2023-07-18 Thread Thomas Passin
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 UT

Re: Search for node by GNX with g.findGnx

2023-07-18 Thread Thomas Passin
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 i

Re: Search for node by GNX with g.findGnx

2023-07-18 Thread Edward K. Ream
On Tue, Jul 18, 2023 at 7:11 AM lewis 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(gn

Re: Search for node by GNX with g.findGnx

2023-07-18 Thread lewis
On Tuesday, July 18, 2023 at 9:33:33 PM UTC+10 Edward K. Ream wrote: GNX_ID may not be correct, but that depends on what you entered. I know that the GNX_ID is correct as I have used (p.v.gnx) to get the GNX. The following @button script works for me, regardless of p (or p.b): g.es_clickable_

Re: Search for node by GNX with g.findGnx

2023-07-18 Thread Edward K. Ream
On Tue, Jul 18, 2023 at 6:15 AM lewis wrote: > Using this script to search for a node by a Gnx: > > > > *GNX_ID: str = g.app.gui.runAskOkCancelStringDialog(c,'SEARCH Node by > GNX',"Enter search GNX: ").strip()p0 = g.findGnx(GNX_ID, c) # moves to > position p0 g.es_clickable_link(c, p0, 0, (p0.h

Search for node by GNX with g.findGnx

2023-07-18 Thread lewis
Using this script to search for a node by a Gnx: *GNX_ID: str = g.app.gui.runAskOkCancelStringDialog(c,'SEARCH Node by GNX',"Enter search GNX: ").strip()p0 = g.findGnx(GNX_ID, c) # moves to position p0 g.es_clickable_link(c, p0, 0, (p0.h)) # clickable-link, use p.h* If the node matching GN