Jump to content

"GetNodePath" is undefined


Go to solution Solved by Josh,

Recommended Posts

Posted

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?

Posted

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.

Posted

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.

  • Solution
Posted

Documentation is updated now. Thanks for reporting this issue!

  • Thanks 1

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

  • Josh locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...