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

Is it safe to extend native classes #29

Closed
cancerberoSgx opened this issue Sep 18, 2019 · 1 comment
Closed

Is it safe to extend native classes #29

cancerberoSgx opened this issue Sep 18, 2019 · 1 comment

Comments

@cancerberoSgx
Copy link

Since I think those objects are part of the binding I wander if it's safe to implement things like

class MyPanel extends gui.Container {
constructor(){
//instantiate children, pass data, declare layout rules, here,
}
someEventHandlers(){
this.perhapsAccessingChildrenOrParent()
}
}
What about the rest of View subclasses. Should I be careful of overriding some method ? I hardly will need to do so but any comment is most appreciated.

@cancerberoSgx
Copy link
Author

I'm closing this since gui components are not classes or at least they are not meant to be extended. (I'm getting "The constructor of this class can not be used." when calling super() in class constructor

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

No branches or pull requests

1 participant