edwardUL99 / StudSysCppCLI

A CLI UI for the StudSysCpp Project. This is a "dummy" project that is not used but done to practise C++ and also software engineering in terms of issues, issue tracking, issue refinement, requirements engineering, releases and also databases
GNU General Public License v3.0
0 stars 0 forks source link

Static Exam is causing issues in ExamSelectorPage #71

Closed edwardUL99 closed 4 years ago

edwardUL99 commented 4 years ago

The fact you are using a static Exam variable in editExam is causing issue #69 as once exam is initialised, whenever you try to call editExam, the exam used will ALWAYS be the same exam you used.

The static exam is required as identified by issue #45 and comments in issue #46. This is why I suggest that you replace references with pointers, This will need careful consideration of which object will take ownership of deleting these objects

Added a temporary fix with pointers, but it's only temporary as it may change depending on ownership and may not be correct as needs testing. But the fix now shows it is possible to do once ownership and deletion is sorted.

Maybe you could create an EntityManager for entities like you did with PageManager for pages