Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TreeView再SetData后,用Data函数得到的指针总是错的。TreeNode的地址总是在改变,尽管里面的Instance指针是不变的 #194

Open
luxiao9999 opened this issue Mar 7, 2024 · 1 comment

Comments

@luxiao9999
Copy link

No description provided.

@ying32
Copy link
Owner

ying32 commented Mar 7, 2024

如果你这setdata是放的一个go的指针那大概率就会错乱。我一般的解决方法是创建个map,保存这个对象,将对象的指针作为key来存储,然后再将这个对象地址设置到TTreeNode的Data里。取出时直接用这个key在map里查。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants