cogentcore / core

A free and open source framework for building powerful, fast, and elegant 2D and 3D apps that run on macOS, Windows, Linux, iOS, Android, and the Web with a single pure Go codebase, allowing you to Code Once, Run Everywhere.
http://cogentcore.org/core
BSD 3-Clause "New" or "Revised" License
1.31k stars 71 forks source link

Rename SelIdx to SelectedIndex and clean up ki slice functions #935

Closed ddkwork closed 3 months ago

ddkwork commented 3 months ago

A little bit do not understand why node has so many walk methods, the use is very confusing, in general is not walk all nodes or walk nodes with children two scenarios?

ddkwork commented 3 months ago

Ok, I seem to get it, the purpose is to improve the efficiency of the walk

---Original--- From: @.> Date: Sat, Mar 16, 2024 02:05 AM To: @.>; Cc: @.**@.>; Subject: Re: [cogentcore/core] clean ki (PR #935)

@kkoreilly approved this pull request.

All of your changes are good, thanks! Here are the different walk functions we have and why we need them:

WalkUp: walk up all of your parents, starting with you

WalkUpParent: walk up all of your parents, starting with your parent

WalkPre: depth-first walk down, starting with you

WalkPreLevel: depth-first walk down, starting with you, keeping track of level

WalkPost: depth-first walk down, doing you after everyone else

WalkBreadth: breadth-first walk down

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>