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

Getting started documentation? #10

Open
ahctangU opened this issue Oct 11, 2021 · 4 comments
Open

Getting started documentation? #10

ahctangU opened this issue Oct 11, 2021 · 4 comments

Comments

@ahctangU
Copy link

There's a lot of documentation regarding advanced features, but it is a little ridiculous there is no documentation anywhere on how to even initialize the basic tree structure.

Maybe, I'm dumb, but I can't even build the tree let alone try the advanced signaling features.

@rcoreilly
Copy link
Member

good point! see the ki/node_test.go file for some examples -- e.g.,

	parent := NodeEmbed{}
	parent.InitName(&parent, "par1")
	typ := reflect.TypeOf(parent)
	child := parent.AddNewChild(typ, "child1")

will add to README.md.

In GoGi there are methods like AddNewButton etc that call AddNewChild with a specific type.

@ahctangU
Copy link
Author

Thanks for the quick reply!

Some additional help with how to do BFS and DFS traversal would also be immensely helpful. The function KiToMyNode(k) doesn't actually exist, but I am assuming that means I need to do some runtime type assertion to get my original type back.

@rcoreilly
Copy link
Member

yep you need to write that method or its equivalent.. simple example per above is now in README

@ahctangU
Copy link
Author

Thank you so much for the great library. This is a life saver.

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