The apex script node needs to be set up in a specific way in order to compile the output. Here Im am using the log viewer to view the debug output from apex.
works, but ApexGraphHandle. autocomplete doesn't show that function, which makes it very difficult to discover Object oriented syntax, especially since that function is not even in apex.graph, but in apex.graphutils module but even functions from apex.graph module don't show up in autocomplete, like the mentioned findFirstNode() is this a known current autocomplete limitation similar to variables not being to show autocomplete at all?
thanks for your inputs. I was missing one thing for my code to work fine. I roughly understand the syntax now and was missing that the function was asking for the graph itself to properly find the items in an ApexNodeIDArray.
By the way, is this the correct way to append strings, when I try to use the somestring.add(), which is available within the graph nodes, I get an error telling me that there is no add function available?
Thanks a lot, i really appreciate how helpful the community is.
tamte ApexGraphHandle. autocomplete doesn't show that function, which makes it very difficult to discover Object oriented syntax, especially since that function is not even in apex.graph, but in apex.graphutils module
This is hard unfortunately because the types of the variables being completed are not known: The parameter code editor doesn't run any of the code being typed in. This is the same if you did something like "geo = hou.Geometry(); geo.<complete>" in a regular Python SOP. It only works if you're in a Python Shell where we've actually executed "geo = hou.Geometry()".
tamte but even functions from apex.graph module don't show up in autocomplete, like the mentioned findFirstNode() is this a known current autocomplete limitation similar to variables not being to show autocomplete at all?
This is a separate issue that should have been fixed in 20.5.482. Are you in an earlier build?
edward This is hard unfortunately because the types of the variables being completed are not known: The parameter code editor doesn't run any of the code being typed in. This is the same if you did something like "geo = hou.Geometry(); geo.<complete>" in a regular Python SOP. It only works if you're in a Python Shell where we've actually executed "geo = hou.Geometry()".
I don't believe it's the same issue since in APEX script we use type hints quite a lot (if not all the time as it tends to complain if they are not provided, suggesting that APEX Script aims to emulate strongly typed language) so I believe the types can be assumed ahead of time in case the hints are clearly provided to aid with helpful autocomplete
tamte I believe the types can be assumed ahead of time in case the hints are clearly provided to aid with helpful autocomplete
That still requires parsing everything in the parm to determine the types. Perhaps not insurmountable but that is why they don't autocomplete anyways.
tamte I am in 20.5.487
Hmm, I just tried this and it works in my 20.5.491 (just my development builds are updated nightly). I did: "g = apex.graph.find" and the menu that came up included findFirstNode().
edward Hmm, I just tried this and it works in my 20.5.491 (just my development builds are updated nightly). I did: "g = apex.graph.find" and the menu that came up included findFirstNode().
apex.graph.find and apex.graphutils.node will show autocomplete I'm talking about Object oriented access to those function from the type itself ApexGraphHandle. or does that run into similar parsing issues as if I wanted to autocomplete from variable with such type as a hint?
tamte I'm talking about Object oriented access to those function from the type itself ApexGraphHandle. or does that run into similar parsing issues as if I wanted to autocomplete from variable with such type as a hint?
Ah sorry, for some reason, when I was looking at this before, the GIF didn't show (maybe it was because of Safari?). It seems that findFirstNode() is misplaced for autocompletion for the object-based syntax. It's currently put as a method for ApexNodeID when it should be a method for ApexGraphHandle. I'll look into this, thanks!