On Mon, Mar 25, 2013 at 09:58:50AM -0400, Wayne Stambaugh wrote:
> I forgot to add that this is a text book example of why you should not
> make class members public.  When EDA_TEXT::m_Text was public,
> SCH_FIELD::GetText() was not being called because EDA_TEXT::m_Text was
> being accessed directly which bypassed the reference designator string
> manipulation.  I now remember why I never got around to encapsulating
> EDA_TEXT.

More like the dangers of mixins... EDA_TEXT can only show the literal text
it contains, but in the case of the reference that's not what should be
done. Unless you state that the reference field *always* contains the
subunit designator, of course. But then it would be a data redundancy
with the subunit id in the component :D

If this was a relational DB it would be a FIRST normal form violation...

-- 
Lorenzo Marcantonio
Logos Srl

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to