Is there any "correct'" way to render classes inhereted from PRCase? Here
are the details:
I want to represent an object, say Clinic with fullDescription, address,
etc. attributes. Currently I do such things the way I saw in Pier-Blog. I.e.
I overloaded Person>>viewComponentClass to return PersonView. And there I do
something like:
renderContentOn: html
super renderContentOn: html.
self renderFullDescriptionOn: html.
self renderAddressOn: html.
self renderDoctorsOn: html
It works ofcourse, but I feel there should be another way to explain Pier
(or Magritte?) how to render Clinics as far as I described them.
And another part is about doctors. They are instances of Doctor which is
surely inhereted from PRCase and properly described. I want to give a list
of doctors in context of the clinic. Items of the list should represent some
short form of doctors, I mean show some of Doctor's attributes. And when one
of the doctors is selected I want all the information to be presented.
Now I do it just the same way:
- #renderDoctorsOn: outputs short information about each of them in
context of the clinic
- full Doctors information is rendered by DoctorView component.
The question is just the same: I feel there must be another way to do it
using metainformation I give about Doctors (and Clinics). Is there a
"canonized" one?
And one more thing: I saw people mentioned "Tutorial" but I don't know
where
to get it. Perhaps it's where all answers are already given? :)
--
Dennis Schetinin