Jump to content

"GetNodePath" is undefined


decay
 Share

Go to solution Solved by Josh,

Recommended Posts

This issue is in Ultra App Maker.

I am attempting to follow this tutorial https://www.ultraengine.com/learn/CPP/FileBrowser

And in each instance my code uses GetNodePath visual studio has no idea what that is. I tried looking it up in the documentation and online but couldn't find anything to figure this out.

Everything else is working fine, so I'm not sure why GetNodePath doesn't work. I assume I would have to find an alternative to GetNodePath but I'm not able to find one. 
Are the tutorials deprecated slightly?

Link to comment
Share on other sites

Thanks for pointing this out. I don't see the function defined anywhere in the code, so I think when the final code was being broken apart, that section accidently got omitted. I will see about fixing it today.

  • Like 1
  • Upvote 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Okay here is the missing function:

WString GetNodePath(shared_ptr<Widget> node)
{
    WString path;
    std::list<WString> list;
    while (true)
    {
        list.push_front(node->text);
        node = node->GetParent();
        if (node == NULL) break;
        if (node->As<TreeViewNode>() == NULL) break;
    }
    for (auto s : list)
    {
        if (!path.empty()) path += L"/";
        path += s;
    }
    return path;
}

 

  • Upvote 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

  • Josh locked this topic
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...