node.prevOncurveNode() is missing?

Hi! I just noticed that in Glyphs 3 node.nextOnCurve() changed to node.prevOncurveNode() but prevOncurveNode() is now missing. Am I using some deprecate way to get prev/next oncurves and is there a better one?

Wow, I didn’t know this method existed! Thanks for pointing it out (and I hope it’s not deprecated)

1 Like

In Glyphs 3, it’s called nextOncurveNode(). It is not deprecated.

A future Glyphs version will include previousOncurveNode(). Note that these methods tend to be slow, so avoid using them in loops or other use cases where they might get called frequently. Instead, first get the index of a node on its path and then access other nodes by changing the index.

1 Like

I ran into a very odd issue this afternoon. I sent somebody a script, and got the message back that 'GSNode' object has no attribute 'prevOnCurve'. We then checked the Method Reporter, and indeed, GSNode did not have that method. However, in the Glyphs on my computer (same Glyphs version, 3418), prevOnCurve is a method of GSNode. I then find this thread saying that that method has changed…? Why are these methods still available in my Glyphs version, but not in that of somebody else, who has the identical Glyphs version? This makes it very annoying to debug things, because at no point was I aware that I was using methods that didn’t exist in Glyphs installations of other users.

My Method Reporter shows this:

No idea why or how your Python still has old methods that have had their name changed, but I just tested in 3414 and 3418 and I don’t have the older methods either:

Maybe a script added the method. Sebastian, can you search your Script and Repo-folder for “prevOnCurve”?

How would I do this?

Open those folders in you favorite text editor and run a search over all files.