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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ivan-shaban
Copy link

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

@PrimaryFeather
Copy link
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
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 [email protected]
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
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