Skip to content

MyPresenter new VS self instantiate: MyPresenter #139

@LNUitTutor

Description

@LNUitTutor

Section 2.3 said: "Do not call new to instantiate a presenter that is part of your UI. An alternative way to instantiate presenters is to use the message instantiate: with a presenter class as an argument." Greate! But in the 12.8 we saw

MailReaderPresenter >> initializePresenters
   content := EmailPresenter new.
   noContent := NoEmailPresenter new

and in the 12.9 again

MailClientPresenter >> initializePresenters
   account := MailAccountPresenter on: self model.
   reader := MailReaderPresenter new

Why? Is it a bug? Has it any hidden meaning? It has to be clarified!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions