Skip to content

Add feature to gets DO's children recursively (optional).#709

Open
ivan-shaban wants to merge 1 commit into
Gamua:masterfrom
ivan-shaban:feature/recursively-children-search
Open

Add feature to gets DO's children recursively (optional).#709
ivan-shaban wants to merge 1 commit into
Gamua:masterfrom
ivan-shaban:feature/recursively-children-search

Conversation

@ivan-shaban

Copy link
Copy Markdown

Example: parent.getChildByName("child1.child2.child3", true);

@PrimaryFeather

Copy link
Copy Markdown
Contributor

I'm not entirely sure about this feature — is this really necessary? After all, this could also be done via a custom utility method.

Any other opinions?

(Thanks anyway for the pull request, in any case! I appreciate the suggestion!)

@tconkling

Copy link
Copy Markdown
Contributor

I will always advocate for unnecessary features to be left to extensions :)

But also, if this were part of Starling mainline, it doesn't make sense to
parse the child names from a string - the parsing step probably makes it
slower than just passing in a varargs array of children names, and the name
separator is application-specific. If you're using a '.' in your child
names, you'd need to use a / or whatever.

On Mon, May 11, 2015 at 12:38 AM, Daniel Sperl notifications@github.com
wrote:

I'm not entirely sure about this feature — is this really necessary? After
all, this could also be done via a custom utility method.

Any other opinions?

(Thanks anyway for the pull request, in any case! I appreciate the
suggestion!)


Reply to this email directly or view it on GitHub
#709 (comment)
.

@ivan-shaban

Copy link
Copy Markdown
Author

Hi, sorry for late answer.
Yep, it is not necessary, but it is conveniently. I agreed that separator may be pulled out as argument, but on other hand we will get too many arguments, what not so good from API point.
About performane, if you don't want to search in children, performance will be the same, but if you wanna search, you will write the same code, so, imho, there is no difference.

Anyway i think that, that kind of feature will be very usefull like a part of framework, but it may has different implementation. And if you have any ideas or suggestions how to make something similar, i can easily rework it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants