J
John Mas
Having read up about interfaces i have a rough idea about the hows but still
a little unsure of why or when.
if i have a class with a number of properties and public routines could i
and should i be using interfaces to define what are the mandatory ones.
My actual scenario is a child form that can be used to either add a new
record or edit an existing record. So I have a friend variable m_State
which i set from the parent form to be either _addNew or _edit. If i'm
editing the form i need to populate it with specific data so i am using
another friend variable m_iResID. So in this scenario if i have opted to
edit i need to ensure that the m_iResID is also set so would i put the two
into an interface?
I know that it is a slightly clumsy example and i could do it differently
but the main thing is to understand why and when about interfaces.
Cheers
John
a little unsure of why or when.
if i have a class with a number of properties and public routines could i
and should i be using interfaces to define what are the mandatory ones.
My actual scenario is a child form that can be used to either add a new
record or edit an existing record. So I have a friend variable m_State
which i set from the parent form to be either _addNew or _edit. If i'm
editing the form i need to populate it with specific data so i am using
another friend variable m_iResID. So in this scenario if i have opted to
edit i need to ensure that the m_iResID is also set so would i put the two
into an interface?
I know that it is a slightly clumsy example and i could do it differently
but the main thing is to understand why and when about interfaces.
Cheers
John