Closed DanielBullimore closed 4 years ago
This is a much bigger issue than it seems. I think becuase the strType property of the super class is private, its decendants can't over right it. Even though logically if decendant inherits strType it should be private var of decendant.
So I have tried using public strType, and it worked as expected.
I'm not going to implement public strType just yet. It makes no sense to be able to change an objects type after it has been decared. Rather im going to try implement an optional parameterized decaration of OO([strType]) so if string type is passed at declaration time the instances strType will be set. otherwise strType will be 'oomutiny'.
hence this.Parent = OO; this.Parent('OoPoint')
...
parameterized OO parent works with private strType. How ever I then ran the test files for O.O.Master class which resulted in a plathoria of errors.
all the errors in testing O.O.Master were cuased by comparing strDecendantType === "undefined" where it should have been typeof(strDecendant) === "undefined"
Every time a feature is tested the results of that test must be recorded here in a test results register. Dont forget to place post refactor notes as comments on this issue.
Details
Feature ID: 0.1 Feature Name: Point Feature Type: object class Test Number: 1 Testing Phase: 1 Date Tested: 11/01/20
Test Notes and Error Details:
Instance failed to initialise as decendent of OO, despite overwriting strType after calling this.parent(), Initialise() still has strType = 'oomutiny'. as a result rayOO['OoPoint'] is undefined: [http://localhost:7700/oomutiny/OO.class.js:224] Uncaught TypeError: Cannot read property 'length' of undefined
Post refactor notes: