All pastes #940699 Raw Edit

Something

public text v1 · immutable
·published 2008-03-13 05:41 UTC
rendered paste body
This might make it more clear;

 

Both infoPanel and ‘painter’ (Which is probably the wrong word for the object we want but bear with me) operate on Status and have a datasource

 

 

So we move that to a base class “StatusItem”

 

We create two things that inherit from status, ‘infoPanel’ and ‘Painter’

 

Later if we want to make something new that uses Status. We just inherit from StatusItem again

 

<infoPanel>

 <inherits  = “statusItem”/>

<infoPanel>

 

<painter>

 <inherits  = “statusItem”/>

</painter>

 

<statusItem id=”statusItem”>

  <dataSource>RFM.Something </dataSource>

  <dataMember> Status </dataMember>

</statusItem>