<table><tr><td style="">amankumargupta created this revision.<br />amankumargupta added a reviewer: GCompris: Improvements.<br />amankumargupta added a project: GCompris: Improvements.<br />Restricted Application added a subscriber: KDE Edu.<br />Restricted Application added a project: KDE Edu.<br />amankumargupta requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D12425">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>This diff mainly focuses on generalizing the object creation, destroying and accessing process of the instruction objects while executing the user's code.</p>

<p>Previously, the  object creation and destroying code for both didn't follow the same process/behaviour. In this diff, the code have been refactored to have same behaviour and the other changes which are very important for the extension for **programmingMaze loops* activity.</p>

<p>Now we maintain two look-up tables for main and procedure respectively and we create the instructions for each at the starting of the levels and they can be accessed to execute the instruction when needed, and destroyed at the end of the level (which was previously done only for procedure).</p>

<p>This is certainly better, more readible, and most importantly having the code to follow the same behaviour for both.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R2 GCompris</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D12425">https://phabricator.kde.org/D12425</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/activities/programmingMaze/Dataset.qml<br />
src/activities/programmingMaze/ProgrammingMaze.qml<br />
src/activities/programmingMaze/instructions/Procedure.qml<br />
src/activities/programmingMaze/programmingMaze.js</div></div></div><br /><div><strong>To: </strong>amankumargupta, GCompris: Improvements<br /><strong>Cc: </strong>KDE Edu, GCompris: Improvements, himanshuvishwakarma, harrymecwan, ganeshredcobra, nityanandkumar, echarruau, rahulyadav, narvaez, scagarwal, apol, timotheegiet, hkaelberer, jjazeix, bcoudoin<br /></div>