Skip to content
This repository was archived by the owner on Aug 5, 2019. It is now read-only.

Implement Modal Remove Method #404

Open
Deanosaurus opened this issue Jul 12, 2013 · 2 comments
Open

Implement Modal Remove Method #404

Deanosaurus opened this issue Jul 12, 2013 · 2 comments

Comments

@Deanosaurus
Copy link

The inherited remove method does not target the body but the widget itself. It would be nice to have a remove similar to that of the add that detects instance of ModalFooter and otherwise directs the remove to the child widgets of the body.

@Deanosaurus
Copy link
Author

Perhaps

@Override
    public void remove(Widget w) {
        if (w instanceof ModalFooter) {
            super.remove(w);
        } else {
            body.remove(w);
        }
}

@reinert
Copy link
Contributor

reinert commented Jan 12, 2014

Could you state some use case in order to justify this need?

Notice that this change would cause some confusion with other methods dealing with inside widgets. How should getWidgetCount behave?

I do think we need to improve the treatment of ModalFooter, specially because it is used only inside Modal. Maybe it never should be public instantiated. We could find another way of better deal this widget with Modal.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants