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

DNU #wantSteps on method remove #12595

Closed
MarcusDenker opened this issue Feb 8, 2023 · 3 comments · Fixed by #12782
Closed

DNU #wantSteps on method remove #12595

MarcusDenker opened this issue Feb 8, 2023 · 3 comments · Fixed by #12782

Comments

@MarcusDenker
Copy link
Member

Bug description
When removing a method from the method browser --> DNU as #wantSteps is send to a non-morph

1 implementors of #acceptVisitorNeverFinishes:
2 remove that method with cmd-x
3 see DNU

wantSteps should check if the model is a morph or a model?

@MarcusDenker MarcusDenker changed the title DNU #wants DNU #wantSteps Feb 8, 2023
@MarcusDenker MarcusDenker changed the title DNU #wantSteps DNU #wantSteps on method remove Feb 9, 2023
@MarcusDenker
Copy link
Member Author

Sadly this does not work:

wantsSteps
	"Return true if the model wants its view to be stepped.  For an open system window, we give the model to offer an opinion"

	^ isCollapsed not and: [ model isNotNil and: [ (model respondsTo: #wantsSteps) and: [model wantsSteps ] ] ]

as the deprecated method #wantsSteps in Object means the "model respondsTo: #wantsSteps" is always true

@hernanmd
Copy link
Member

hernanmd commented Feb 9, 2023

Since #wantsSteps is only a Morphic thing we could just ask if model is a Morph?

wantsSteps
	"Return true if the model wants its view to be stepped.  For an open system window, we give the model to offer an opinion"

	^ isCollapsed not and: [ model isNotNil and: [ model isMorph and: [ model wantsSteps ] ] ]

@jecisc
Copy link
Member

jecisc commented Feb 15, 2023

This is not only on Morph but also Model

jecisc added a commit to jecisc/pharo that referenced this issue Feb 15, 2023
The deprecated calls seems to happen when the model of a window is a collection and not an actual model

Fixes pharo-project#12595
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants