Closed ankushbhardwxj closed 4 years ago
@RAJAGOPALAN-GANGADHARAN Look at the event dispatcher function in this commit. I tried a separate condition for editor. When we run the function, we can transfer the contents or code of a respective file to the RunningTasks constructor, as this.code = code
. But when I tried to pass it as a prop to the appInstaller it didnt work. This is because appInstaller was loaded at the beginning of loading the DOM. So there's basically no way our Editor can get the prop because it was already loaded up a long time ago.
One solution can be to modify the existing eventdispatcher. Otherwise we need to create a separate launcher inside the handleClick function
in explorer.js
. When a file is clicked, we should be able to launch the icon on the taskbar , and then the window , and then the code editor inside of window.
I would prefer the second one because I feel it would be cleaner.
@RAJAGOPALAN-GANGADHARAN Which one would you like ? If so, please try to write the syntax in the comments.
Also, if you want to do it in a later issue, We can merge this PR for now 👍 The current behaviour is as follows:
@RAJAGOPALAN-GANGADHARAN Bro, it just works flawlessly. Ready to be merged 👍 👍 Also if a file is empty nothing gets passed as prop, which is cool.
@RAJAGOPALAN-GANGADHARAN made the required changes. Now it works perfectly.
fixes #44 Currently we are in a position that when we click the File, it fires up the code editor. However we have a problem with the event dispatcher which will be fixed in a new issue & PR.